|
7 | 7 |
|
8 | 8 | <!-- Definition of a Shortcode HandlerContainer instance. --> |
9 | 9 | <service id="webfactory.shortcode.handler_container" class="Thunder\Shortcode\HandlerContainer\HandlerContainer"> |
10 | | - <!-- Event handler that removes <p>...</p> tag that directly wrap shortcodes. --> |
11 | | - <call method="add"> |
12 | | - <argument type="constant">\Thunder\Shortcode\Events::REPLACE_SHORTCODES</argument> |
13 | | - <argument type="service"> |
14 | | - <service class="Webfactory\ShortcodeBundle\Handler\RemoveWrappingParagraphElementsEventHandler"/> |
15 | | - </argument> |
16 | | - </call> |
17 | 10 | </service> |
18 | 11 |
|
19 | 12 | <!-- Definition of a Shortcode RegularParser instance. --> |
|
26 | 19 | <argument type="service" id="webfactory.shortcode.handler_container" /> |
27 | 20 | </service> |
28 | 21 |
|
| 22 | + <!-- Definition of a Shortcode EventContainer instance. --> |
| 23 | + <service id="webfactory.shortcode.event_container" class="Thunder\Shortcode\EventContainer\EventContainer"> |
| 24 | + <!-- Event handler that removes <p>...</p> tag that directly wrap shortcodes. --> |
| 25 | + <call method="addListener"> |
| 26 | + <argument type="constant">\Thunder\Shortcode\Events::REPLACE_SHORTCODES</argument> |
| 27 | + <argument type="service"> |
| 28 | + <service class="Webfactory\ShortcodeBundle\Handler\RemoveWrappingParagraphElementsEventHandler"/> |
| 29 | + </argument> |
| 30 | + </call> |
| 31 | + </service> |
| 32 | + |
29 | 33 | <!-- Base definition for the EmbedForShortcodeHandler with esi renderer. --> |
30 | 34 | <service abstract="true" id="webfactory.shortcode.embed_esi_for_shortcode_handler" class="Webfactory\ShortcodeBundle\Handler\EmbeddedShortcodeHandler" lazy="true"> |
31 | 35 | <argument type="service" id="fragment.handler"/> |
|
47 | 51 | <!-- Twig extension providing the |shortcodes filter. The content will be passed to the Shortcode Processor. --> |
48 | 52 | <service id="Webfactory\ShortcodeBundle\Twig\ShortcodeExtension" class="Webfactory\ShortcodeBundle\Twig\ShortcodeExtension"> |
49 | 53 | <argument type="service" id="webfactory.shortcode.processor"/> |
| 54 | + <argument type="service" id="webfactory.shortcode.event_container"/> |
50 | 55 | <tag name="twig.extension"/> |
51 | 56 | </service> |
52 | 57 |
|
|
0 commit comments