Heratio Framework API Reference

blade_helpers.php

Blade template helper functions.

These bridge Symfony 1.x globals into the Blade template context. Loaded once by BladeRenderer on initialization.

Table of Contents

Functions

__()  : string
atom_url()  : string
Generate a URL from a named Symfony route.
csp_nonce_attr()  : string
Return the CSP nonce as an HTML attribute string.
ahg_config()  : mixed
Get an AtoM configuration value via ConfigService.
atom_flash()  : string|null
Get a flash message from the Symfony user session.

Functions

__()

__(string $text[, array<string|int, mixed> $args = [] ][, string $catalogue = 'messages' ]) : string
Parameters
$text : string
$args : array<string|int, mixed> = []
$catalogue : string = 'messages'
Return values
string

atom_url()

Generate a URL from a named Symfony route.

atom_url(string $route[, array<string|int, mixed> $params = [] ]) : string
Parameters
$route : string

Named route (e.g., 'ahg_vend_list')

$params : array<string|int, mixed> = []

Route parameters

Return values
string

csp_nonce_attr()

Return the CSP nonce as an HTML attribute string.

csp_nonce_attr() : string

Returns e.g. nonce="abc123" or empty string if no nonce is set.

Return values
string

ahg_config()

Get an AtoM configuration value via ConfigService.

ahg_config(string $key[, mixed $default = '' ]) : mixed

Bridge function for Blade templates — replaces direct sfConfig::get() calls. ConfigService tries app_ prefixed key first, then raw key.

Parameters
$key : string

Config key (without app_ prefix, e.g. 'ui_label_repository')

$default : mixed = ''

Default value if key not found

atom_flash()

Get a flash message from the Symfony user session.

atom_flash(string $type) : string|null
Parameters
$type : string

Flash type (notice, error, success)

Return values
string|null

        
On this page

Search results