WellCommerce\Bundle\CoreBundle\Form\AbstractFormBuilder::dispatchOnInitEvent PHP Method

dispatchOnInitEvent() protected method

Dispatches the event after form initialization
protected dispatchOnInitEvent ( WellCommerce\Component\Form\Elements\FormInterface $form, WellCommerce\Bundle\DoctrineBundle\Entity\EntityInterface $entity = null )
$form WellCommerce\Component\Form\Elements\FormInterface
$entity WellCommerce\Bundle\DoctrineBundle\Entity\EntityInterface
    protected function dispatchOnInitEvent(FormInterface $form, EntityInterface $entity = null)
    {
        $eventName = sprintf('%s.%s', $this->alias, FormEvent::FORM_INIT_EVENT);
        $event = new FormEvent($this, $form, $entity);
        $this->eventDispatcher->dispatch($eventName, $event);
    }