StorefrontSessionManager
class StorefrontSessionManager implements StorefrontSessionInterface (View source)
Properties
protected | $channel | The current channel |
|
protected Collection | $customerGroups | The collection of customer groups to use. |
|
protected Currency | $currency | The current currency |
|
protected Customer | $customer | The current customer |
Methods
Initialise the manager
{@inheritDoc}
{@inheritDoc}
{@inheritDoc}
{@inheritDoc}
Return the session key for carts.
Return the current customer.
Set the store front session customer group
Reset the customer groups
Return the current channel.
Return the current customer groups
Return the current currency.
Details
__construct(SessionManager $sessionManager, AuthManager $authManager)
Initialise the manager
forget()
{@inheritDoc}
initCustomerGroups()
{@inheritDoc}
initChannel()
{@inheritDoc}
Customer|null
initCustomer()
{@inheritDoc}
string
getSessionKey()
Return the session key for carts.
StorefrontSessionInterface
setChannel(Channel $channel)
Set the cart session channel.
StorefrontSessionInterface
setCustomer(Customer $customer)
Set the session customer.
Customer|null
getCustomer()
Return the current customer.
StorefrontSessionInterface
setCustomerGroups(Collection $customerGroups)
Set the store front session customer group
StorefrontSessionInterface
setCustomerGroup(CustomerGroup $customerGroup)
Set the Customer Group
StorefrontSessionManager
resetCustomerGroups()
Reset the customer groups
Channel
getChannel()
Return the current channel.
Collection|null
getCustomerGroups()
Return the current customer groups
StorefrontSessionInterface
setCurrency(Currency $currency)
Set the cart session currency.
Currency
getCurrency()
Return the current currency.