GlobalContext

Context class with data, required on all views in the shop.

Namespace

Ceres\Contexts

Implements
Properties
Type Name Description

array

$params

Passthrough variables from the controller.

CeresConfig

$ceresConfig

The configuration for the shop.

Request

$request

The http request.

string

$lang

The language code of the current language.

string

$metaLang

Deprecated: since 5.0.20 will be removed in 6.0.0

bool

$forceNoIndex

Defines if the meta data should have the attrribute content set to "NOINDEX".

array

$template

Deprecated: since 5.0.20 will be removed in 6.0.0

string

$templateName

Deprecated: since 5.0.20 will be removed in 6.0.0

array

$categories

Categories for the navigation.

array

$categoryBreadcrumbs

List of all parent categories including current category.

array

$notifications

List of all notifications stored in the session.

array

$basket

The basket object.

WebstoreConfiguration

$webstoreConfig

The webstore configuration.

array

$currencyData

The name and the symbol for the currently selected currency.

bool

$showNetPrices

Defines if net prices should be shown.

string

$homepageURL

Deprecated: since 4.3 Use ShopUrls::$home instead

string

$splitItemBundle

Represents the system setting for splitting bundles.

``

$templateEvent

Deprecated: since 4.5 Use ShopUrls::getTemplateType() instead

bool

$isShopBuilder

Defines if the shop is opened in ShopBuilder mode.

bool

$isSafeMode

Defines if the shop is loaded in safe mode.

array

$bodyClasses

Array of CSS classes to apply to the body.

string

$buildHash

Hash of the latest plugin deployment.

string

$assetName

Key for the assets to be loaded.

Methods
public init($params)
Parameters

Type

Name

Description

``

$params

public getParam($key, $defaultValue = null):string

Get value from $params, filtered by the key.

Parameters

Type

Name

Description

string | int

$key

Key to search for in the $params.

mixed

$defaultValue

Optional: If set, the method will return the $defaultValue, when there is no value for the given $key. (Default: null)