\Thelia\ActionCustomer

Summary

Methods
Properties
Constants
__construct()
create()
modify()
logout()
login()
changePassword()
getSubscribedEvents()
No public properties found
No constants found
processSuccessfullLogin()
getSecurityContext()
validateForm()
propagateFormError()
redirect()
$securityContext
N/A
No private methods found
No private properties found
N/A

Properties

$securityContext

$securityContext : \Thelia\Action\Thelia\Core\Security\SecurityContext

Type

\Thelia\Action\Thelia\Core\Security\SecurityContext

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

processSuccessfullLogin()

processSuccessfullLogin(\Thelia\Core\Event\ActionEvent $event, \Thelia\Model\Customer $user, \Thelia\Form\BaseForm $form,  $sendLoginEvent)

Stores the current user in the security context, and redirect to the success_url.

Parameters

\Thelia\Core\Event\ActionEvent $event
\Thelia\Model\Customer $user

the logged user

\Thelia\Form\BaseForm $form
$sendLoginEvent

getSecurityContext()

getSecurityContext() : \Thelia\Core\Security\SecurityContext

Return the security context, beeing sure that we're in the CONTEXT_FRONT_OFFICE context

Returns

\Thelia\Core\Security\SecurityContext

the security context

validateForm()

validateForm(\Thelia\Form\BaseForm $aBaseForm,  $expectedMethod)

Parameters

\Thelia\Form\BaseForm $aBaseForm
$expectedMethod

redirect()

redirect( $url,  $status)

Parameters

$url
$status