Skip to content

Configuration Reference

Edit this page

The CoreBundle can be configured under the cmf_core key in your application configuration. When using XML, you can use the http://cmf.symfony.com/schema/dic/core namespace.

Configuration

Some configuration settings set on the CoreBundle are forwarded as default configuration to all CMF bundles that are installed in your application. This is explicitly listed below for each configuration option that is forwarded.

persistence

phpcr

This enables the persistence driver for the PHP content repository. The default configuration is the following:

1
2
3
4
5
6
7
8
9
# app/config/config.yml
cmf_core:
    persistence:
        phpcr:
            enabled:              false
            basepath:             /cms
            manager_registry:     doctrine_phpcr
            manager_name:         ~
            translation_strategy: ~

orm

This enables the persistence driver for relational databases. The default configuration is the following:

1
2
3
4
5
6
# app/config/config.yml
cmf_core:
    persistence:
        orm:
            enabled:          false
            manager_name:     ~
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:

1
2
3
4
5
6
phpcr: ~ # use default configuration
# or
phpcr: true # straight way
# or
phpcr:
    manager: ... # or any other option under 'phpcr'

This setting is propagated as default value to all installed CMF bundles that support this setting:

  • BlockBundle
  • ContentBundle
  • CreateBundle
  • MediaBundle
  • MenuBundle
  • RoutingBundle
  • SearchBundle
  • SimpleCmsBundle
basepath

type: string default: /cms/

The basepath for CMS documents in the PHPCR tree.

This setting is propagated as default value to all installed CMF bundles that support this setting:

  • BlockBundle
  • ContentBundle
  • MediaBundle
  • MenuBundle
  • RoutingBundle
  • SearchBundle
  • SeoBundle
  • SimpleCmsBundle
manager_registry

type: string default: doctrine_phpcr

The doctrine registry from which to get the document manager. This setting only needs to be changed when configuring multiple manager registries.

This setting is propagated as default value to all installed CMF bundles that support this setting:

  • SearchBundle
  • SimpleCmsBundle
manager_name

type: string default: null

The name of the Doctrine Manager to use. null tells the manager registry to retrieve the default manager.

This setting is propagated as default value to all installed CMF bundles that support this setting:

  • BlockBundle
  • MediaBundle
  • MenuBundle
  • RoutingBundle
  • SearchBundle
  • SimpleCmsBundle
translation_strategy

type: string default: null

This setting can be used to force a specific translation strategy for all documents.

multilang

This configures the locales to use in multiple languages mode.

If the multilang option is not defined at all, the CoreBundle registers a listener for Doctrine PHPCR-ODM that modifies PHPCR-ODM metadata to remove the translatable attribute from all fields.

If multi-language is enabled, the locales will be configured as default on all installed CMF bundles that use this configuration:

  • RoutingBundle
  • SimpleCmsBundle
1
2
3
4
# app/config/config.yml
cmf_core:
    multilang:
        locales: [en, fr]

locales

type: array default: null

List of the languages that can be used with the storage.

publish_workflow

This configures whether the publish workflow should be enabled, which service to use and what role may view content not yet published. The request listener ensures only published routes and content can be accessed.

1
2
3
4
5
6
7
# app/config/config.yml
cmf_core:
    publish_workflow:
        enabled:                 true
        checker_service:         cmf_core.publish_workflow.checker.default
        view_non_published_role: ROLE_CAN_VIEW_NON_PUBLISHED
        request_listener:        true
This work, including the code samples, is licensed under a Creative Commons BY-SA 3.0 license.
TOC
    Version