承接 zorbus/page-bundle 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

zorbus/page-bundle

Composer 安装命令:

composer require zorbus/page-bundle

包简介

A Symfony2 Page bundle

README 文档

README

This bundles allows to create web pages through an admin area powered by Sonata Admin. Data is store on a relation database (only supports Doctrine ORM).

A page consists of a theme (a twig template) and several blocks (provided by the ZorbusBlockBundle).

In app/config.yml

Enable the cmf routing and the doctrine bundles on AppKernel.php:

public function registerBundles()
{
    $bundles = array(
        ...,
        new Zorbus\PageBundle\ZorbusPageBundle(),
        new Zorbus\BlockBundle\ZorbusBlockBundle(),
        new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(),
        new Symfony\Cmf\Bundle\RoutingBundle\CmfRoutingBundle(),
    );
}

Add configuration to load the page router.

cmf_routing:
    chain:
        routers_by_id:
            zorbus.page.router: 300
            router.default: 100

Add configuration to enable the doctrine extensions:

stof_doctrine_extensions:
    default_locale: %locale%
    orm:
        default:
            timestampable: true
            sluggable: true
            tree: true
            sortable: true

The entity repositories must extend the provided ones in the model.

zorbus_page:
    entities:
        page: Acme\DemoBundle:Page
        page_block: Acme\DemoBundle:PageBlock
        block: Acme\DemoBundle:Block

Add configuration to point to the entities, replacing the interface. They should extend the provided models.

doctrine:
    orm:
        resolve_target_entities:
            Zorbus\PageBundle\Model\PageInterface: Acme\DemoBundle\Entity\Page
            Zorbus\PageBundle\Model\PageBlockInterface: Acme\DemoBundle\Entity\PageBlock
            Zorbus\BlockBundle\Model\BlockInterface: Acme\DemoBundle\Entity\Block

In app/routing.yml

zorbus_page:
    resource: "@ZorbusPageBundle/Controller"
    type: annotation
    prefix: /

Update the database

Use the doctrine migrations or update the schema straight away:

$ php app/console doctrine:schema:update --force

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2012-10-21

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固