Add your own Twital extensionΒΆ
The recommended way to add your TwitalExtension to Twital
instance is registering it using the
Symfony2 dependency injection system.
You have to add your extensions as services and tag them with the twital.extension
tag.
Depending on your preferences, you can choose which syntax to adopt.
Using XML:
<service id="my.extension" class="...myExtensionClass...">
<tag name="twital.extension" />
</service>
Using YAML:
services:
my.extension:
class: ...myExtensionClass...
tags:
- { name: twital.extension }
Using PHP:
<?php
$container
->register('my.extension', '...myExtensionClass...')
->addTag('twital.extension')
;
Once you have added one of this configurations to your bundle, your extension should be available.