\Thelia\Controller\FrontCartController

The defaut administration controller. Basically, display the login form if user is not yet logged in, or back-office home page if the user is logged in.

Summary

Methods
Properties
Constants
addItem()
changeItem()
deleteItem()
getDispatcher()
redirect()
No public properties found
No constants found
getCartEvent()
nullResponse()
dispatchEvent()
dispatch()
getParserContext()
getSecurityContext()
getRequest()
getSession()
validateForm()
redirectSuccess()
No protected properties found
N/A
getAddCartForm()
No private properties found
N/A

Methods

addItem()

addItem()

changeItem()

changeItem()

deleteItem()

deleteItem()

getDispatcher()

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

Return the event dispatcher,

Returns

\Symfony\Component\EventDispatcher\EventDispatcher

redirect()

redirect(string $url)

redirect request to specify url

Parameters

string $url

getCartEvent()

getCartEvent() : \Thelia\Core\Event\CartEvent

use Thelia\Cart\CartTrait for searching current cart or create a new one

Returns

\Thelia\Core\Event\CartEvent

nullResponse()

nullResponse()

Return an empty response (after an ajax request, for example)

dispatchEvent()

dispatchEvent(string $action) : \Symfony\Component\EventDispatcher\EventDispatcher

Create an action event

Parameters

string $action

Returns

\Symfony\Component\EventDispatcher\EventDispatcher

dispatch()

dispatch(string $eventName, \Thelia\Core\Event\ActionEvent $event)

Dispatch a Thelia event to modules

Parameters

string $eventName

a TheliaEvent name, as defined in TheliaEvents class

\Thelia\Core\Event\ActionEvent $event

the event

getSecurityContext()

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

Return the security context, by default in admin mode.

Parameters

$context

Returns

\Thelia\Core\Security\SecurityContext

getRequest()

getRequest() : \Symfony\Component\HttpFoundation\Request

Returns

\Symfony\Component\HttpFoundation\Request

getSession()

getSession() : \Symfony\Component\HttpFoundation\Session\SessionInterface

Returns the session from the current request

Returns

\Symfony\Component\HttpFoundation\Session\SessionInterface

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\Form\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

redirectSuccess()

redirectSuccess()

If success_url param is present in request, follow this link.

getAddCartForm()

getAddCartForm(\Symfony\Component\HttpFoundation\Request $request) : \Thelia\Form\CartAdd

Find the good way to construct the cart form

Parameters

\Symfony\Component\HttpFoundation\Request $request

Returns

\Thelia\Form\CartAdd