集成/页面捆绑

提供用户在集成网站上创建页面的可能性,并与网站捆绑结合进行前端编辑


README

此捆绑包提供页面管理功能

需求

  • 查看 composer.json 中的 require 部分

功能

  • 页面管理

文档

安装

按照以下步骤安装此捆绑包

使用 composer 安装

$ php composer.phar require integrated/page-bundle:~0.3

启用捆绑包

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

导入路由

# app/config/routing.yml
integrated_page:
    resource: @IntegratedPageBundle/Resources/config/routing.xml
    prefix: "/admin"

使用 contentType 页面

为了使 contentType 页面生效,您需要将控制器定义为服务(示例可以在 Resources/config/controllers.xml 中找到)。

在服务中,您需要通过添加标签 "integrated_page" 来将控制器标记为 contentType 控制器。此外,此标签中需要 "class" 属性。默认情况下,将调用 contentType 控制器的 showAction,但您也可以在 "controller_actions" 属性中定义一个或多个动作。

一些示例

<tag name="integrated_page.contenttype_controller" class="Integrated\Bundle\ContentBundle\Document\Content\Article"/>
<tag name="integrated_page.contenttype_controller" class="Integrated\Bundle\ContentBundle\Document\Content\Relation\Company" controller_actions="fooAction, showAction"/>

当您创建或更改 contentType 或渠道时,contentType 页面将自动创建。必须启用 contentType 的渠道,否则不会创建任何页面。对于多个渠道,将为每个渠道创建一个页面。

许可证

此捆绑包位于 MIT 许可证之下。请参阅捆绑包中的完整许可证。

LICENSE

贡献

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

关于

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