定制 tangoman/truncate-html-bundle 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

tangoman/truncate-html-bundle

Composer 安装命令:

composer require tangoman/truncate-html-bundle

包简介

Symfony Truncate Html Twig Extention Bundle

README 文档

README

Tangoman TruncateHtml Twig Service truncates html keeping tags.

How to install

With composer

$ composer require tangoman/truncate-html-bundle

Enable the bundle

Don't forget to enable the bundle in the kernel:

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new TangoMan\TruncateHtml\TangoManTruncateHtml(),
    );
}

You don't have to add TangoMan CallbackBundle to the service.yml of your project. twig.extension.truncate_html service should load automatically.

How to use

Inside your views:

    <p>
        {{ post.html|truncatehtml }}
    </p>

Note

If you find any bug please report here : Issues

License

Copyright (c) 2018 Matthias Morin

License Distributed under the MIT license.

If you like TangoMan TruncateHtml please star! And follow me on GitHub: TangoMan75 ... And check my other cool projects.

tangoman.free.fr

统计信息

  • 总下载量: 249
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-08-17

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固