English spoken conference

Configuration Reference

1.3 version
Maintained Unmaintained
1.2

Configuration Reference

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

Note

To use this bundle with the tree provided by SonataDoctrinePHPCRAdminBundle, you do not need to provide any configuration here.

Configuration

persistence

phpcr

This defines the persistence driver. The default configuration of persistence is the following configuration:

  • YAML
    1
    2
    3
    4
    5
    cmf_tree_browser:
        persistence:
            phpcr:
                enabled:      false
                session_name: default
    
  • XML
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    <?xml version="1.0" charset="UTF-8" ?>
    <container xmlns="http://symfony.com/schema/dic/services">
    
        <config xmlns="http://cmf.symfony.com/schema/dic/treebrowser">
            <persistence>
                <phpcr
                    enabled="false"
                    session-name="default"
                />
            </persistence>
        </config>
    
    </container>
    
  • PHP
    1
    2
    3
    4
    5
    6
    7
    8
    $container->loadFromExtension('cmf_tree_browser', array(
        'persistence' => array(
            'phpcr' => array(
                'enabled'      => false,
                'session_name' => 'default',
            ),
        ),
    ));
    
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'
            ),
        ),
    ));
    
session_name

type: string default: default

The name of the PHPCR connection to use.

This work, including the code samples, is licensed under a Creative Commons BY-SA 3.0 license.