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" />

Using YAML:

        class: ...myExtensionClass...
            - { name: twital.extension }

Using PHP:


    ->register('my.extension', '...myExtensionClass...')

Once you have added one of this configurations to your bundle, your extension should be available.