\Thelia\ActionBaseAction

Summary

Methods
Properties
Constants
__construct()
getDispatcher()
No public properties found
No constants found
validateForm()
propagateFormError()
$container
N/A
No private methods found
No private properties found
N/A

Properties

$container

$container : \Thelia\Action\The

Type

\Thelia\Action\The — container

Methods

__construct()

__construct(\Symfony\Component\DependencyInjection\ContainerInterface $container)

Parameters

\Symfony\Component\DependencyInjection\ContainerInterface $container

getDispatcher()

getDispatcher() : \Symfony\Component\EventDispatcher\EventDispatcherInterface

Return the event dispatcher,

Returns

\Symfony\Component\EventDispatcher\EventDispatcherInterface

validateForm()

validateForm(\Thelia\Form\BaseForm $aBaseForm, string $expectedMethod) : \Symfony\Component\Form\Form

Validate a BaseForm

Parameters

\Thelia\Form\BaseForm $aBaseForm

the form

string $expectedMethod

the expected method, POST or GET, or null for any of them

Throws

\Thelia\Action\Exception\FormValidationException

is the form contains error, or the method is not the right one

Returns

\Symfony\Component\Form\Form —

Form the symfony form object

propagateFormError()

propagateFormError(\Thelia\Form\BaseForm $aBaseForm, string $error_message, \Thelia\Core\Event\ActionEvent $event)

Propagate a form error in the action event

Parameters

\Thelia\Form\BaseForm $aBaseForm

the form

string $error_message

an error message that may be displayed to the customer

\Thelia\Core\Event\ActionEvent $event

the action event