\Thelia\ActionCustomer

Summary

Methods
Properties
Constants
create()
modify()
logout()
login()
changePassword()
getSubscribedEvents()
__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

logout()

logout(\Thelia\Core\Event\ActionEvent $event)

Perform user logout. The user is redirected to the provided view, if any.

Parameters

\Thelia\Core\Event\ActionEvent $event

login()

login(\Thelia\Core\Event\ActionEvent $event)

Perform user login. On a successful login, the user is redirected to the URL found in the success_url form parameter, or / if none was found.

If login is not successfull, the same view is dispolyed again.

Parameters

\Thelia\Core\Event\ActionEvent $event

getSubscribedEvents()

getSubscribedEvents() : array

Returns an array of event names this subscriber wants to listen to.

The array keys are event names and the value can be:

  • The method name to call (priority defaults to 0)
  • An array composed of the method name to call and the priority
  • An array of arrays composed of the method names to call and respective priorities, or 0 if unset

For instance:

  • array('eventName' => 'methodName')
  • array('eventName' => array('methodName', $priority))
  • array('eventName' => array(array('methodName1', $priority), array('methodName2'))

Returns

array —

The event names to listen to

__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