class Session extends Session

extends mfony\Component\HttpFoundation\Session\Session for adding some helpers

Class Session

Methods

Lang|null
getLang( bool $forceDefault = true)

No description

setLang( Lang $lang)

No description

setCurrency( Currency $currency)

No description

getCurrency( bool $forceDefault = true)

Return current currency

getAdminEditionCurrency()

No description

setAdminEditionCurrency($currencyId)

No description

getAdminEditionLang()

No description

$this
setAdminEditionLang( Lang $lang)

No description

setCustomerUser( UserInterface $user)

No description

getCustomerUser()

No description

clearCustomerUser()

No description

setAdminUser( UserInterface $user)

No description

getAdminUser()

No description

clearAdminUser()

No description

setReturnToUrl($url)

No description

string
getReturnToUrl()

No description

$this
setSessionCart( Cart $cart = null)

Set the cart to store in the current session.

getSessionCart( EventDispatcherInterface $dispatcher = null)

Return the cart stored in the current session

clearSessionCart( EventDispatcherInterface $dispatcher)

Clear the current session cart, and store a new, empty one in the session.

Cart|null
getCart()

Return cart if it exists and is valid (checking customer)

setOrder( Order $order)

No description

getOrder()

No description

$this
setConsumedCoupons( array $couponsCode)

Set consumed coupons by the Customer

array
getConsumedCoupons()

Get Customer consumed coupons

array
getFormErrorInformation()

Get saved errored forms information

mixed
setFormErrorInformation( array $formInformation)

Save errored forms information

Details

at line 52
Lang|null getLang( bool $forceDefault = true)

Parameters

bool $forceDefault if true, the default language will be returned if no current language is defined.

Return Value

Lang|null

at line 62
setLang( Lang $lang)

Parameters

Lang $lang

at line 69
setCurrency( Currency $currency)

Parameters

Currency $currency

at line 81
Currency getCurrency( bool $forceDefault = true)

Return current currency

Parameters

bool $forceDefault if true, the default currency will be returned if no current currency is defined.

Return Value

Currency

at line 94
getAdminEditionCurrency()

at line 105
setAdminEditionCurrency($currencyId)

Parameters

$currencyId

at line 115
Lang getAdminEditionLang()

Return Value

Lang the current edition language in the back-office

at line 130
$this setAdminEditionLang( Lang $lang)

Parameters

Lang $lang the current edition language to set in the back-office

Return Value

$this

at line 139
setCustomerUser( UserInterface $user)

Parameters

UserInterface $user

at line 149
UserInterface|null getCustomerUser()

Return Value

UserInterface|null the current front office user, or null if none is legged in

at line 154
clearCustomerUser()

at line 161
setAdminUser( UserInterface $user)

Parameters

UserInterface $user

at line 168
getAdminUser()

at line 173
clearAdminUser()

at line 180
setReturnToUrl($url)

Parameters

$url

at line 191
string getReturnToUrl()

Return Value

string the return-to URL, or the index page if none is defined.

at line 205
$this setSessionCart( Cart $cart = null)

Set the cart to store in the current session.

Parameters

Cart $cart The cart to store in session

Return Value

$this

at line 226
Cart getSessionCart( EventDispatcherInterface $dispatcher = null)

Return the cart stored in the current session

Parameters

EventDispatcherInterface $dispatcher the event dispatcher, required if no cart is currently stored in the session

Return Value

Cart The cart in the current session.

at line 275
clearSessionCart( EventDispatcherInterface $dispatcher)

Clear the current session cart, and store a new, empty one in the session.

Parameters

EventDispatcherInterface $dispatcher

at line 297
Cart|null getCart()

Return cart if it exists and is valid (checking customer)

Return Value

Cart|null

at line 325
setOrder( Order $order)

Parameters

Order $order

at line 335
Order getOrder()

Return Value

Order

at line 354
$this setConsumedCoupons( array $couponsCode)

Set consumed coupons by the Customer

Parameters

array $couponsCode An array of Coupon code

Return Value

$this

at line 366
array getConsumedCoupons()

Get Customer consumed coupons

Return Value

array $couponsCode An array of Coupon code

at line 376
array getFormErrorInformation()

Get saved errored forms information

Return Value

array

at line 387
mixed setFormErrorInformation( array $formInformation)

Save errored forms information

Parameters

array $formInformation

Return Value

mixed