System\Helpers\View

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.

Protected properties

protected static array $globalVarCache

Cache for global variables.

Public methods

public static array getGlobalVars()

Returns shared view variables, this should be used for simple rendering cycles. Such as content blocks and mail templates.