APPNETOS is under active development This website and its documentation are being prepared for public launch. Content and features may change.
Select Theme
Loading

Variables

Collects runtime and application variables for templates. Exposes dynamically resolved values and accepts application-defined overrides.

Purpose

Collects runtime and application variables for templates. Exposes dynamically resolved values and accepts application-defined overrides.

Variable resolution

Properties are exposed in snake_case. Getter methods are used where available, so mapped context implementations can supply values dynamically. Runtime values include URLs, language, session state, translations, assets, UI metadata and AJAX tokens. Explicitly assigned variables can override generated entries.

Public API Reference

Core\Render\Variables

Class & Registry

Class: Core\Render\Variables

Extends: Core\Render\Variables\Base

use Core\Render\Variables;
use Core\Registry;

$variables = Registry::get(Variables::class);
Method Description
public function getAll(): array Initialize render variables controller Resolves the required shared core controllers and initializes static runtime variables such as URLs, debug state
public function get(string $key, mixed $default = null,): mixed Get runtime variable
public function set(string $key, mixed $value,): static Set runtime variable Empty variable keys are ignored.

Context implementations

APPNETOS provides application and administration implementations of this controller. Use the class mapped for the active runtime context; shared base classes describe common behavior, while concrete implementations may supply context-specific dependencies.

Dynamic UI variables

Core\Render\Variables\Base::getAll() collects css, js and ui when building render variables. UI metadata is retrieved from the active Core\Ui controller rather than stored as a fixed snapshot inside the variables controller. The timing of individual render calls depends on the rendering flow.

Twig variable Meaning
ui.bootstrap.enabled Bootstrap enabled
ui.bootstrap.version Full version, e.g. 5.3.8
ui.bootstrap.major / minor / patch Version components
ui.bootstrap_icons.enabled Bootstrap Icons enabled
ui.bootstrap_icons.version Icons version or null
ui.theme Theme identifier or null
ui.assets Additional head link attributes
ui.html_attributes Resolved root HTML attributes

Other variables include title, favicon, debug, css, js, session_id, session_timeout and ajax_token. api_debug is not a standard variable in the documented base implementation.

Next Steps

Previous

Render

Explore Render

Next

View Slots

Explore View Slots