diff --git a/src/Repository/OutputRepository.php b/src/Repository/OutputRepository.php index de36cdf..45ca787 100644 --- a/src/Repository/OutputRepository.php +++ b/src/Repository/OutputRepository.php @@ -4,6 +4,8 @@ namespace Valantic\PimcoreFormsBundle\Repository; +use Symfony\Component\DependencyInjection\Attribute\TaggedIterator; +use Valantic\PimcoreFormsBundle\DependencyInjection\ValanticPimcoreFormsExtension; use Valantic\PimcoreFormsBundle\Exception\DuplicateOutputException; use Valantic\PimcoreFormsBundle\Exception\UnknownOutputException; use Valantic\PimcoreFormsBundle\Form\Output\OutputInterface; @@ -18,8 +20,10 @@ class OutputRepository /** * @param iterable $outputs */ - public function __construct(iterable $outputs) - { + public function __construct( + #[TaggedIterator(ValanticPimcoreFormsExtension::TAG_OUTPUT)] + iterable $outputs + ) { $this->outputs = $this->iterableToArray($outputs); } diff --git a/src/Resources/config/services.yml b/src/Resources/config/services.yml index c90a4f9..5c5b348 100644 --- a/src/Resources/config/services.yml +++ b/src/Resources/config/services.yml @@ -21,10 +21,6 @@ services: Valantic\PimcoreFormsBundle\Service\: resource: '../../Service/*' - Valantic\PimcoreFormsBundle\Repository\OutputRepository: - arguments: - - !tagged_iterator valantic.pimcore_forms.output - Valantic\PimcoreFormsBundle\Repository\InputHandlerRepository: arguments: - !tagged_iterator valantic.pimcore_forms.input_handler