DataCollectorListener example


class DataCollectorTypeExtension extends AbstractTypeExtension
{
    private DataCollectorListener $listener;

    public function __construct(FormDataCollectorInterface $dataCollector)
    {
        $this->listener = new DataCollectorListener($dataCollector);
    }

    /** * @return void */
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder->addEventSubscriber($this->listener);
    }

    public static function getExtendedTypes(): iterable
    {
Home | Imprint | This part of the site doesn't use cookies.