DependencyInjection/Compiler/FormJsPass.php
public function process(ContainerBuilder $container)
    {
        // TODO configuration / extension parameter
        $formJs = [[
            'selector' => '.file-picker',
            'path'     => 'ekyna-form/file-picker',
        ]];
        $taggedFormServices = $container->findTaggedServiceIds('form.js');

        foreach ($taggedFormServices as $service => $tagAttributes) {
            foreach ($tagAttributes as $attributes) {
                if (!array_key_exists('selector', $attributes)) {
                    throw new \InvalidArgumentException(
                        sprintf('The "selector" attributes is missing for tag "form.js" of service "%s"', $service)
                    );
                }
                if (!array_key_exists('path', $attributes)) {
                    throw new \InvalidArgumentException(
                        sprintf('The "path" attributes is missing for tag "form.js" of service "%s"', $service)
                    );
                }
                $formJs[] = [
                    'selector' => $attributes['selector'],
                    'path'     => $attributes['path'],
                ];
            }
        }

        $container->setParameter('ekyna_core.form_js', $formJs);
    }
public function process(ContainerBuilder $container)
    {
        // TODO configuration / extension parameter
        $formJs = [[
            'selector' => '.file-picker',
            'path'     => 'ekyna-form/file-picker',
        ]];
        $taggedFormServices = $container->findTaggedServiceIds('form.js');

        foreach ($taggedFormServices as $service => $tagAttributes) {
            foreach ($tagAttributes as $attributes) {
                if (!array_key_exists('selector', $attributes)) {
                    throw new \InvalidArgumentException(
                        sprintf('The "selector" attributes is missing for tag "form.js" of service "%s"', $service)
                    );
                }
                if (!array_key_exists('path', $attributes)) {
                    throw new \InvalidArgumentException(
                        sprintf('The "path" attributes is missing for tag "form.js" of service "%s"', $service)
                    );
                }
                $formJs[] = [
                    'selector' => $attributes['selector'],
                    'path'     => $attributes['path'],
                ];
            }
        }

        $container->setParameter('ekyna_core.form_js', $formJs);
    }
{@inheritDoc}