rofil/simple-content

简单的内容包

dev-master 2015-09-17 02:05 UTC

This package is not auto-updated.

Last update: 2024-09-28 18:42:14 UTC


README

适用于具有简单内容的网站

##安装 将 "rofil/simple-content": "dev-master" 添加到 composer.json 中,如下所示

...
    "requires": {
        ...
        "rofil/simple-content": "dev-master"
        ...
    }
...

并运行 composer update 以更新 ##注册 在 app/AppKernel.php 中注册此包,如下所示

...
    new Rofil\Simple\ContentBundle\RofilSimpleContentBundle(),
...

##路由 通过添加以下代码更新 routing.yml|xml

...
rofil_simple_content:
    resource: "@RofilSimpleContentBundle/Controller/"
    type:     annotation
    prefix:   /
...

##更新数据库模式 通过运行 symfony 命令 php app/console doctrine:schema:update --force 更新数据库模式 ##安全性 在 security.yml 中添加以下访问控制

...
    access_control:
        ...
        - { path: ^/manage/information, roles: ROLE_MANAGER }
        - { path: ^/manage/news, roles: ROLE_MANAGER }
        ...
...