English spoken conference

Advanced Usage

Advanced Usage

Overriding the listeners

You can change the listeners used by extending the Gedmo listeners (or the listeners of the bundle for translations) and giving the class name in the configuration.

  • YAML
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    # app/config/config.yml
    # (or config/packages/stof_doctrine_extensions.yaml if you use Flex)
    stof_doctrine_extensions:
        class:
            tree:           MyBundle\TreeListener
            timestampable:  MyBundle\TimestampableListener
            blameable:      ~
            sluggable:      ~
            translatable:   ~
            loggable:       ~
            softdeleteable: ~
            uploadable:     ~
    
  • XML
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    <!-- app/config/config.xml -->
    <!-- (or config/packages/stof_doctrine_extensions.yaml if you use Flex) -->
    <container xmlns:stof-doctrine_extensions="http://example.org/schema/dic/stof_doctrine_extensions">
        <stof-doctrine-extensions:config>
            <stof-doctrine-extensions:class
                tree="MyBundle\TreeListener"
                timestampable="MyBundle\TimestampableListener"
            />
        </stof-doctrine-extensions:config>
    </container>
    

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