高级用法
覆盖监听器
你可以通过扩展 Gedmo 监听器(或扩展包的翻译监听器)并在配置中给出类名来更改使用的监听器。
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: ~
本作品,包括代码示例,根据 Creative Commons BY-SA 3.0 许可协议授权。