Symfony DI Configuration
Pacemaker uses a lot of joined observers. For a project-specific custom Symfony DI configuration, you must add its new custom observer to the existing configuration. Therefore, extending a project with additional observers, the Symfony DI configuration must also get customized and extended. |
Example
Example how to extend the services.xml
with a additional observer
Default services.xml
<service id="import_category.observer.composite.base.delete"
class="TechDivision\Import\Observers\GenericCompositeObserver">
<call method="addObserver">
<argument id="import_category.observer.normalize.path" type="service"/>
</call>
<call method="addObserver">
<argument id="import_category.observer.clear.url.rewrite" type="service"/>
</call>
<call method="addObserver">
<argument id="import_category.observer.clear.category" type="service"/>
</call>
</service>
Extended services.xml
<service id="import_category.observer.composite.base.delete"
class="TechDivision\Import\Observers\GenericCompositeObserver">
<call method="addObserver">
<argument id="import_category.observer.normalize.path" type="service"/>
</call>
<call method="addObserver">
<argument id="import_category.observer.clear.url.rewrite" type="service"/>
</call>
<call method="addObserver">
<argument id="import_category.observer.clear.category" type="service"/>
</call>
<call method="addObserver"> (1)
<argument id="import_category.observer.<customized>.<observer>" type="service"/>
</call>
</service>
1 | Add a new additional observer |