Documentation

View
in package

This helper class is used to extract basic variables (scalar or array) from the global `View` Facade.

You can register these global variables with View::share.

View::share('siteName', 'OctoberCMS');

Then available globally for use in the front-end and mail templates.

Table of Contents

$globalVarCache  : array<string|int, mixed>
getGlobalVars()  : array<string|int, mixed>
Returns shared view variables, this should be used for simple rendering cycles.

Properties

$globalVarCache

protected static array<string|int, mixed> $globalVarCache

Cache for global variables.

Methods

getGlobalVars()

Returns shared view variables, this should be used for simple rendering cycles.

public static getGlobalVars() : array<string|int, mixed>

Such as content blocks and mail templates.

Return values
array<string|int, mixed>

Search results