CMS Page Bundle
Bundle extending SonataPageBundle in order to simplify the use by developers and future users, trying to not alter the original flexibility, and to give them new basic tools and views.
This bundle is part of the preconfigured CMS based on Symfony and Sonata : CMSStarter | CMSCoreBundle
SonataPageBundle
The use of this bundle require understanding of the SonataPageBundle.
Installation
Composer
composer require th3mouk/cms-page-bundle ^2.0SonataPageBundle
Install the original SonataPageBundle.
Easy extends
app/console sonata:easy-extends:generate Th3MoukCMSPageBundleUpdate Kernel
# app/AppKernel.php
...
new Th3Mouk\CMSPageBundle\Th3MoukCMSPageBundle(),
new Application\Th3Mouk\CMSPageBundle\ApplicationTh3MoukCMSPageBundle(),
...Configuration
Create the following files:
# app/config/bundles/override.yml
parameters:
#Overload PageAdmin
sonata.page.admin.page.class: Th3Mouk\CMSPageBundle\Admin\PageAdmin
#Overload PageManager
sonata.page.manager.page.class: Th3Mouk\CMSPageBundle\Entity\PageManager
#Overload Transformer otherwise additional attributes will be non-serialized
sonata.page.transformer.class: Th3Mouk\CMSPageBundle\Entity\Transformer
#Overload PageAdminController
sonata.page.admin.page.controller: Th3MoukCMSPageBundle:PageAdmin# app/config/sonata/sonata_page.yml
sonata_page:
class:
page: Application\Th3Mouk\CMSPageBundle\Entity\Page
snapshot: Application\Th3Mouk\CMSPageBundle\Entity\Snapshot
block: Application\Th3Mouk\CMSPageBundle\Entity\Block
site: Application\Th3Mouk\CMSPageBundle\Entity\SiteInclude them:
# app/config/config.yml
imports:
# Sonata Page Bundle
- { resource: sonata/sonata_page.yml }
# Override Vendors Parameters
- { resource: bundles/override.yml }Please
Feel free to improve all of this work, project or bundles.
