Configuration Reference
Configuration Reference¶
Note
To focus our efforts onto a manageable number of packages, this package is currently not maintained. Security fixes and submitted bug fixes will still be released, but no new features should be expected. This bundle might have outdated documentation, there is no support from the CMF team and you should not expect bugs to be fixed.
If you want to help co-maintaining this package, tell us in a GitHub issue or in #symfony_cmf of the Symfony devs slack.
The SimpleCmsBundle can be configured under the cmf_simple_cms
key in your
application configuration. When using XML, you can use the
http://cmf.symfony.com/schema/dic/simplecms
namespace.
Configuration¶
persistence¶
phpcr
¶
This defines the persistence driver. The default configuration of persistence is the following configuration:
- YAML
1 2 3 4 5 6 7 8 9 10 11
cmf_simple_cms: persistence: phpcr: enabled: false basepath: /cms/simple manager_registry: doctrine_phpcr manager_name: ~ document_class: Symfony\Cmf\Bundle\SimpleCmsBundle\Doctrine\Phpcr\Page use_sonata_admin: auto sonata_admin: sort: false
- XML
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
<?xml version="1.0" charset="UTF-8" ?> <container xmlns="http://symfony.com/schema/dic/services"> <config xmlns="http://cmf.symfony.com/schema/dic/simplecms"> <persistence> <phpcr enabled="false" basepath="/cms/simple" manager-registery="doctrine_phpcr" manager-name="null" document-class="Symfony\Cmf\Bundle\SimpleCmsBundle\Doctrine\Phpcr\Page" use-sonata-admin="auto" > <sonata-admin sort="false" /> </phpcr> </persistence> </config> </container>
- PHP
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
$container->loadFromExtension('cmf_simple_cms', array( 'persistence' => array( 'phpcr' => array( 'enabled' => false, 'basepath' => '/cms/simple', 'manager_registry' => 'doctrine_phpcr', 'manager_name' => null, 'document_class' => 'Symfony\Cmf\Bundle\SimpleCmsBundle\Doctrine\Phpcr\Page', 'use_sonata_admin' => 'auto', 'sonata_admin' => array( 'sort' => false, ), ), ), ));
enabled
¶
type: boolean
default: false
If true
, PHPCR is enabled in the service container.
If the CoreBundle is registered, this will default to
the value of cmf_core.persistence.phpcr.enabled
.
PHPCR can be enabled by multiple ways such as:
- YAML
1 2 3 4 5 6
phpcr: ~ # use default configuration # or phpcr: true # straight way # or phpcr: manager: ... # or any other option under 'phpcr'
- XML
1 2 3 4 5 6 7 8 9 10
<persistence> <!-- use default configuration --> <phpcr /> <!-- or setting it the straight way --> <phpcr>true</phpcr> <!-- or setting an option under 'phpcr' --> <phpcr manager="..." /> </persistence>
- PHP
1 2 3 4 5 6 7 8 9 10 11 12
$container->loadFromExtension(..., array( // bundle configuration key, e.g. cmf_menu // ... 'persistence' => array( 'phpcr' => null, // use default configuration // or 'phpcr' => true, // straight way // or 'phpcr' => array( 'manager' => '...', // or any other option under 'phpcr' ), ), ));
basepath
¶
type: string
default: /cms/simple
The basepath for CMS documents in the PHPCR tree.
If the CoreBundle is registered, this will default to
the value of %cmf_core.persistence.phpcr.basepath%/simple
.
manager_registry
¶
type: string
default: doctrine_phpcr
If the CoreBundle is registered, this will default to
the value of cmf_core.persistence.phpcr.manager_registry
.
manager_name
¶
type: string
default: null
The name of the Doctrine Manager to use. null
tells the manager registry to
retrieve the default manager.
If the CoreBundle is registered, this will default to
the value of cmf_core.persistence.phpcr.manager_name
.
document_class
¶
type: string
default: 'Symfony\Cmf\Bundle\SimpleCmsBundle\Doctrine\Phpcr\Page'
The class for the pages, used by sonata admin.
use_sonata_admin
¶
type: enum
valid values: true|false|auto
default: auto
If true
, the admin classes for SimpleCmsBundle pages are activated. If set
to auto
, the admin services are activated only if the
SonataPhpcrAdminBundle is present.
If the CoreBundle is registered, this will default to the value
of cmf_core.persistence.phpcr.use_sonata_admin
.
sonata_admin.sort
¶
type: enum
valid values: false|asc|desc
default: false
If set to asc
or desc
, sonata admin will ensure that the pages are
sorted ascending or descending when storing in PHPCR. Sorting takes publication
date first, then creation date.
ivory_ckeditor
¶
This configures integration of the IvoryCKEditorBundle, so an admin can edit content using CKeditor.
- YAML
1 2 3 4
cmf_content: ivory_ckeditor: enabled: auto config_name: cmf_content
- XML
1 2 3 4 5 6 7 8 9 10 11 12
<?xml version="1.0" encoding="UTF-8" ?> <container xmlns="http://symfony.com/schema/dic/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-Instance" xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd http://cmf.symfony.com/schema/dic/content http://cmf.symfony.com/schema/dic/content/content-1.0.xsd" > <config xmlns="http://cmf.symfony.com/schema/dic/content"> <ivory-ckeditor enabled="auto" config-name="cmf_content" /> </config> </container>
- PHP
1 2 3 4 5 6
$container->loadFromExtension('cmf_content', array( 'ivory_ckeditor' => array( 'enabled' => true, 'config_name' => 'cmf_content', ), ));
enabled
¶
type: enum
valid values: true|false|auto
default: auto
Enables/disables the CKeditor integration. auto
will enable the integration
only when the IvoryCKEditorBundle is registered. false
will always disable
the integration.
config_name
¶
type: string
default: cmf_content
The name of the IvoryCKEditorBundle config set to use for the editor.
This work, including the code samples, is licensed under a Creative Commons BY-SA 3.0 license.