集成/评论包

集成评论包

0.7 2017-09-04 12:39 UTC

README

此包提供块管理功能

要求

  • 查看 composer.json 中的 require 部分

特性

  • 能够在输入字段和 tinyMCE 编辑器中添加评论

文档

安装

可以按照以下步骤安装此包

使用 composer 安装

$ php composer.phar require integrated/comment-bundle:~0.6

启用包

// app/AppKernel.php
public function registerBundles()
{
    return array(
        // ...
        new Integrated\Bundle\CommentBundle\IntegratedCommentBundle()
        // ...
    );
}

导入路由

# app/config/routing.yml
integrated_comment:
    resource: "@IntegratedCommentBundle/Resources/config/routing.xml"
    prefix: "/admin"

转义评论

使用 tinyMCE 制作的评论将被添加为源代码中的 HTML 注释,如下所示

<p>text <!--integrated-comment=0a80640f3d5e380baab6d8099aad9580-->commented text<!--end-integrated-comment--> not commented text</p>

如果你不喜欢源代码中的 HTML 注释,可以使用 twig 过滤器 "remove_comments" 过滤它

{{ content.content|remove_comments }}

许可

此包采用 MIT 许可。请参阅包中的完整许可

LICENSE

贡献

欢迎提交拉取请求。请参阅我们的 CONTRIBUTING 指南

关于

此包是 Integrated 项目的一部分。您可以在 为开发者集成 网站上了解更多关于此项目的信息。