|
| 1 | +<?php |
| 2 | + |
| 3 | +/* |
| 4 | + * This file is part of the Symfony package. |
| 5 | + * |
| 6 | + * (c) Fabien Potencier <fabien@symfony.com> |
| 7 | + * |
| 8 | + * For the full copyright and license information, please view the LICENSE |
| 9 | + * file that was distributed with this source code. |
| 10 | + */ |
| 11 | + |
| 12 | +namespace Symfony\Component\DependencyInjection\Loader\Configurator; |
| 13 | + |
| 14 | +use Symfony\UX\Turbo\Twig\Component\TurboStreamAfterComponent; |
| 15 | +use Symfony\UX\Turbo\Twig\Component\TurboStreamAppendComponent; |
| 16 | +use Symfony\UX\Turbo\Twig\Component\TurboStreamBeforeComponent; |
| 17 | +use Symfony\UX\Turbo\Twig\Component\TurboStreamComponent; |
| 18 | +use Symfony\UX\Turbo\Twig\Component\TurboStreamPrependComponent; |
| 19 | +use Symfony\UX\Turbo\Twig\Component\TurboStreamRefreshComponent; |
| 20 | +use Symfony\UX\Turbo\Twig\Component\TurboStreamRemoveComponent; |
| 21 | +use Symfony\UX\Turbo\Twig\Component\TurboStreamReplaceComponent; |
| 22 | +use Symfony\UX\Turbo\Twig\Component\TurboStreamUpdateComponent; |
| 23 | + |
| 24 | +/* |
| 25 | + * @author Kévin Dunglas <kevin@dunglas.fr> |
| 26 | + */ |
| 27 | +return static function (ContainerConfigurator $container): void { |
| 28 | + $container->services() |
| 29 | + |
| 30 | + ->set('ux.twig_component.turbo_stream', TurboStreamComponent::class) |
| 31 | + ->tag('twig.component', [ |
| 32 | + 'key' => 'turbo-stream', |
| 33 | + 'template' => '@Turbo/components/turbo_stream.html.twig', |
| 34 | + ]) |
| 35 | + |
| 36 | + ->set('ux.twig_component.turbo_stream_after', TurboStreamAfterComponent::class) |
| 37 | + ->tag('twig.component', [ |
| 38 | + 'key' => 'turbo-stream-after', |
| 39 | + 'template' => '@Turbo/components/turbo_stream.html.twig', |
| 40 | + ]) |
| 41 | + |
| 42 | + ->set('ux.twig_component.turbo_stream_append', TurboStreamAppendComponent::class) |
| 43 | + ->tag('twig.component', [ |
| 44 | + 'key' => 'turbo-stream-append', |
| 45 | + 'template' => '@Turbo/components/turbo_stream.html.twig', |
| 46 | + ]) |
| 47 | + |
| 48 | + ->set('ux.twig_component.turbo_stream_before', TurboStreamBeforeComponent::class) |
| 49 | + ->tag('twig.component', [ |
| 50 | + 'key' => 'turbo-stream-before', |
| 51 | + 'template' => '@Turbo/components/turbo_stream.html.twig', |
| 52 | + ]) |
| 53 | + |
| 54 | + ->set('ux.twig_component.turbo_stream_prepend', TurboStreamPrependComponent::class) |
| 55 | + ->tag('twig.component', [ |
| 56 | + 'key' => 'turbo-stream-prepend', |
| 57 | + 'template' => '@Turbo/components/turbo_stream.html.twig', |
| 58 | + ]) |
| 59 | + |
| 60 | + ->set('ux.twig_component.turbo_stream_refresh', TurboStreamRefreshComponent::class) |
| 61 | + ->tag('twig.component', [ |
| 62 | + 'key' => 'turbo-stream-refresh', |
| 63 | + 'template' => '@Turbo/components/turbo_stream.html.twig', |
| 64 | + ]) |
| 65 | + |
| 66 | + ->set('ux.twig_component.turbo_stream_remove', TurboStreamRemoveComponent::class) |
| 67 | + ->tag('twig.component', [ |
| 68 | + 'key' => 'turbo-stream-remove', |
| 69 | + 'template' => '@Turbo/components/turbo_stream.html.twig', |
| 70 | + ]) |
| 71 | + |
| 72 | + ->set('ux.twig_component.turbo_stream_replace', TurboStreamReplaceComponent::class) |
| 73 | + ->tag('twig.component', [ |
| 74 | + 'key' => 'turbo-stream-replace', |
| 75 | + 'template' => '@Turbo/components/turbo_stream.html.twig', |
| 76 | + ]) |
| 77 | + |
| 78 | + ->set('ux.twig_component.turbo_stream_update', TurboStreamUpdateComponent::class) |
| 79 | + ->tag('twig.component', [ |
| 80 | + 'key' => 'turbo-stream-update', |
| 81 | + 'template' => '@Turbo/components/turbo_stream.html.twig', |
| 82 | + ]) |
| 83 | + ; |
| 84 | +}; |
0 commit comments