src/DoctrineORMModule/Form/Annotation/ElementAnnotationsListener.php
protected function prepareEvent(EventInterface $event)
    {
        foreach (['elementSpec', 'inputSpec'] as $type) {
            if (! $event->getParam($type)) {
                $event->setParam($type, new ArrayObject());
            }
        }

        $elementSpec = $event->getParam('elementSpec');
        $inputSpec   = $event->getParam('inputSpec');

        if (! isset($elementSpec['spec'])) {
            $elementSpec['spec'] = [];
        }
        if (! isset($inputSpec['filters'])) {
            $inputSpec['filters'] = [];
        }
        if (! isset($inputSpec['validators'])) {
            $inputSpec['validators'] = [];
        }
    }
protected function prepareEvent(EventInterface $event)
    {
        foreach (['elementSpec', 'inputSpec'] as $type) {
            if (! $event->getParam($type)) {
                $event->setParam($type, new ArrayObject());
            }
        }

        $elementSpec = $event->getParam('elementSpec');
        $inputSpec   = $event->getParam('inputSpec');

        if (! isset($elementSpec['spec'])) {
            $elementSpec['spec'] = [];
        }
        if (! isset($inputSpec['filters'])) {
            $inputSpec['filters'] = [];
        }
        if (! isset($inputSpec['validators'])) {
            $inputSpec['validators'] = [];
        }
    }
Normalizes event setting all expected parameters.

@param EventInterface $event