url_for()
Generate a URL for a route or resource.
url_for(mixed $routeOrResource[, mixed $options = [] ]) : string
In Symfony mode this is provided by the Url helper.
In standalone mode we handle the most common patterns:
- String URL: returned as-is
- Named route "@name?params": resolved via sfContext routing (if available)
- Array with 'module'+'action': generates /module/action
- Array with object + 'module': generates /module/slug
Parameters
-
$routeOrResource
: mixed
-
-
$options
: mixed
= []
-
_resolve_named_route()
Resolve a named route (@name?params) to a URL.
_resolve_named_route(string $route) : string
Parameters
-
$route
: string
-
link_to()
Generate an HTML anchor tag.
link_to(string $text[, string|array<string|int, mixed> $url = '' ][, array<string|int, mixed> $options = [] ]) : string
Parameters
-
$text
: string
-
-
$url
: string|array<string|int, mixed>
= ''
-
-
$options
: array<string|int, mixed>
= []
-
include_partial()
Render and output a partial template.
include_partial(string $templateName[, array<string|int, mixed> $vars = [] ]) : void
Parameters
-
$templateName
: string
-
"module/partial" or just "_partial"
-
$vars
: array<string|int, mixed>
= []
-
get_partial()
Render a partial template and return as string.
get_partial(string $templateName[, array<string|int, mixed> $vars = [] ]) : string
Parameters
-
$templateName
: string
-
"module/partial" or just "_partial"
-
$vars
: array<string|int, mixed>
= []
-
include_component()
Render and output a component (action + template).
include_component(string $module, string $component[, array<string|int, mixed> $vars = [] ]) : void
Parameters
-
$module
: string
-
-
$component
: string
-
-
$vars
: array<string|int, mixed>
= []
-
get_component()
Render a component and return as string.
get_component(string $module, string $component[, array<string|int, mixed> $vars = [] ]) : string
Parameters
-
$module
: string
-
-
$component
: string
-
-
$vars
: array<string|int, mixed>
= []
-
slot()
Start capturing content for a named slot.
slot(mixed $name) : void
Parameters
-
$name
: mixed
-
end_slot()
End the current slot capture.
end_slot() : void
has_slot()
Check if a named slot has content.
has_slot(mixed $name) : bool
Parameters
-
$name
: mixed
-
get_slot()
Get the content of a named slot.
get_slot(mixed $name[, mixed $default = '' ]) : string
Parameters
-
$name
: mixed
-
-
$default
: mixed
= ''
-
include_slot()
Output a named slot.
include_slot(mixed $name) : bool
Parameters
-
$name
: mixed
-
content_tag()
Generate an HTML content tag.
content_tag(string $tag[, string $content = '' ][, array<string|int, mixed>|string $options = [] ]) : string
Parameters
-
$tag
: string
-
Tag name (e.g., 'div', 'span')
-
$content
: string
= ''
-
-
$options
: array<string|int, mixed>|string
= []
-
tag()
Generate a self-closing HTML tag.
tag(string $tag[, array<string|int, mixed>|string $options = [] ]) : string
Parameters
-
$tag
: string
-
Tag name (e.g., 'br', 'hr', 'img')
-
$options
: array<string|int, mixed>|string
= []
-
image_tag()
Generate an <img> tag.
image_tag(mixed $source[, mixed $options = [] ]) : string
Parameters
-
$source
: mixed
-
-
$options
: mixed
= []
-
_tag_options()
Convert options array to HTML attribute string.
_tag_options(mixed $options) : string
Parameters
-
$options
: mixed
-
use_helper()
Load a helper group. No-op in standalone mode.
use_helper(mixed ...$helpers) : void
Parameters
-
$helpers
: mixed
-
use_stylesheet()
Add a stylesheet to the response. No-op in standalone (assets handled by layout).
use_stylesheet(mixed $css[, mixed $position = '' ][, mixed $options = [] ]) : void
Parameters
-
$css
: mixed
-
-
$position
: mixed
= ''
-
-
$options
: mixed
= []
-
use_javascript()
Add a JavaScript to the response. No-op in standalone.
use_javascript(mixed $js[, mixed $position = '' ][, mixed $options = [] ]) : void
Parameters
-
$js
: mixed
-
-
$position
: mixed
= ''
-
-
$options
: mixed
= []
-
Format a date value.
format_date(mixed $date[, string $format = 'f' ][, string $culture = null ]) : string
Parameters
-
$date
: mixed
-
Date string, timestamp, or DateTime object
-
$format
: string
= 'f'
-
Format string ('f' = full, 'D' = medium, 'p' = pattern, or PHP date format)
-
$culture
: string
= null
-
Culture code (unused in standalone — uses PHP locale)
Format a number.
format_number(mixed $number[, mixed $culture = null ]) : string
Parameters
-
$number
: mixed
-
-
$culture
: mixed
= null
-
_compute_public_path()
Compute a public path for an asset.
_compute_public_path(mixed $source[, mixed $dir = '' ][, mixed $ext = '' ]) : string
Parameters
-
$source
: mixed
-
-
$dir
: mixed
= ''
-
-
$ext
: mixed
= ''
-
esc_entities()
Escape HTML entities.
esc_entities(mixed $value) : string
Parameters
-
$value
: mixed
-
esc_raw()
Return value without escaping (identity function).
esc_raw(mixed $value) : mixed
Parameters
-
$value
: mixed
-
csrf_field()
Render a hidden input field containing the CSRF token.
csrf_field() : string
csrf_token()
Get the current CSRF token string.
csrf_token() : string
Render a meta tag containing the CSRF token for JS access.
csrf_meta() : string
__()
__(string $text[, array<string|int, mixed> $args = [] ][, string $catalogue = 'messages' ]) : string
Parameters
-
$text
: string
-
-
$args
: array<string|int, mixed>
= []
-
-
$catalogue
: string
= 'messages'
-
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>
= []
-
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.
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
slot()
slot(mixed $name) : mixed
Parameters
-
$name
: mixed
-
end_slot()
end_slot() : mixed
get_slot()
get_slot(mixed $name[, mixed $default = '' ]) : mixed
Parameters
-
$name
: mixed
-
-
$default
: mixed
= ''
-
has_slot()
has_slot(mixed $name) : mixed
Parameters
-
$name
: mixed
-
include_slot()
include_slot(mixed $name) : mixed
Parameters
-
$name
: mixed
-
decorate_with()
decorate_with(mixed $layout) : mixed
Parameters
-
$layout
: mixed
-
url_for()
url_for(mixed $params[, mixed $absolute = false ]) : mixed
Parameters
-
$params
: mixed
-
-
$absolute
: mixed
= false
-
link_to()
link_to(mixed $text, mixed $url[, mixed $options = [] ]) : mixed
Parameters
-
$text
: mixed
-
-
$url
: mixed
-
-
$options
: mixed
= []
-
esc_specialchars()
esc_specialchars(mixed $value) : mixed
Parameters
-
$value
: mixed
-
esc_entities()
esc_entities(mixed $value) : mixed
Parameters
-
$value
: mixed
-
esc_raw()
esc_raw(mixed $value) : mixed
Parameters
-
$value
: mixed
-
format_number(mixed $number[, mixed $decimals = 0 ]) : mixed
Parameters
-
$number
: mixed
-
-
$decimals
: mixed
= 0
-
format_date(mixed $date[, mixed $format = 'f' ]) : mixed
Parameters
-
$date
: mixed
-
-
$format
: mixed
= 'f'
-
use_helper()
use_helper(mixed ...$helpers) : mixed
Parameters
-
$helpers
: mixed
-
use_stylesheet()
use_stylesheet(mixed $stylesheet[, mixed $position = '' ][, mixed $options = [] ]) : mixed
Parameters
-
$stylesheet
: mixed
-
-
$position
: mixed
= ''
-
-
$options
: mixed
= []
-
use_javascript()
use_javascript(mixed $javascript[, mixed $position = '' ][, mixed $options = [] ]) : mixed
Parameters
-
$javascript
: mixed
-
-
$position
: mixed
= ''
-
-
$options
: mixed
= []
-
javascript_tag()
javascript_tag(mixed $content) : mixed
Parameters
-
$content
: mixed
-
image_tag()
image_tag(mixed $src[, mixed $options = [] ]) : mixed
Parameters
-
$src
: mixed
-
-
$options
: mixed
= []
-
public_path()
public_path(mixed $file) : mixed
Parameters
-
$file
: mixed
-
get_partial()
get_partial(mixed $name[, mixed $vars = [] ]) : mixed
Parameters
-
$name
: mixed
-
-
$vars
: mixed
= []
-
include_partial()
include_partial(mixed $name[, mixed $vars = [] ]) : mixed
Parameters
-
$name
: mixed
-
-
$vars
: mixed
= []
-
get_component()
get_component(mixed $module, mixed $component[, mixed $vars = [] ]) : mixed
Parameters
-
$module
: mixed
-
-
$component
: mixed
-
-
$vars
: mixed
= []
-
include_component()
include_component(mixed $module, mixed $component[, mixed $vars = [] ]) : mixed
Parameters
-
$module
: mixed
-
-
$component
: mixed
-
-
$vars
: mixed
= []
-
get_component_slot()
get_component_slot(mixed $name) : mixed
Parameters
-
$name
: mixed
-
include_component_slot()
include_component_slot(mixed $name) : mixed
Parameters
-
$name
: mixed
-
include_title()
include_title() : mixed
__()
__(mixed $text[, mixed $args = [] ][, mixed $catalogue = 'messages' ]) : mixed
Parameters
-
$text
: mixed
-
-
$args
: mixed
= []
-
-
$catalogue
: mixed
= 'messages'
-
render_field()
Minimal standalone shim for render_field().
render_field(mixed $field[, mixed $resource = null ][, array<string|int, mixed> $options = [] ]) : mixed
In full Symfony mode, this renders a form field with label/error/help.
In standalone Heratio mode, we output a basic Bootstrap 5 form group.
Parameters
-
$field
: mixed
-
-
$resource
: mixed
= null
-
-
$options
: array<string|int, mixed>
= []
-
render_show()
Minimal standalone shim for render_show().
render_show(mixed $label, mixed $value[, array<string|int, mixed> $options = [] ]) : mixed
Parameters
-
$label
: mixed
-
-
$value
: mixed
-
-
$options
: array<string|int, mixed>
= []
-
render_show_repository()
render_show_repository(mixed $label, mixed $resource) : mixed
Parameters
-
$label
: mixed
-
-
$resource
: mixed
-
render_value()
render_value(mixed $value) : mixed
Parameters
-
$value
: mixed
-
render_value_inline()
render_value_inline(mixed $value) : mixed
Parameters
-
$value
: mixed
-
render_value_html()
render_value_html(mixed $value) : mixed
Parameters
-
$value
: mixed
-
get_search_i18n()
Extract an i18n field from a search result document (ES or DB row).
get_search_i18n(mixed $doc, mixed $field[, mixed $options = [] ]) : mixed
Tries culture-specific nested field, direct field, then any-language fallback.
Parameters
-
$doc
: mixed
-
-
$field
: mixed
-
-
$options
: mixed
= []
-
check_field_visibility()
check_field_visibility(mixed $fieldName[, mixed $options = [] ]) : mixed
Parameters
-
$fieldName
: mixed
-
-
$options
: mixed
= []
-
format_script(mixed $script_iso[, mixed $culture = null ]) : mixed
Parameters
-
$script_iso
: mixed
-
-
$culture
: mixed
= null
-
strip_markdown()
strip_markdown(mixed $text) : mixed
Parameters
-
$text
: mixed
-
render_title()
Minimal standalone shim for render_title().
render_title(mixed $resource[, mixed $showUntitled = true ]) : mixed
In full Symfony mode, this renders entity title with escaping/truncation.
In standalone Heratio mode, we call __toString() with HTML escaping.
Parameters
-
$resource
: mixed
-
-
$showUntitled
: mixed
= true
-
Format an ISO 639 language code as a human-readable name.
format_language(mixed $language_iso[, mixed $culture = null ]) : mixed
In full Symfony mode, this delegates to sfCultureInfo. In standalone
mode, we use a built-in lookup of common language codes.
Parameters
-
$language_iso
: mixed
-
-
$culture
: mixed
= null
-
format_country(mixed $country_iso[, mixed $culture = null ]) : mixed
Parameters
-
$country_iso
: mixed
-
-
$culture
: mixed
= null
-
csrf_field()
Render a hidden input field containing the CSRF token.
csrf_field() : string
csrf_token()
Get the current CSRF token string.
csrf_token() : string
Render a meta tag containing the CSRF token for JS access.
csrf_meta() : string
render_b5_field()
render_b5_field(mixed $field[, mixed $translation = null ][, mixed $options = [] ]) : mixed
Parameters
-
$field
: mixed
-
-
$translation
: mixed
= null
-
-
$options
: mixed
= []
-
render_b5_show_field_css_classes()
render_b5_show_field_css_classes([mixed $options = [] ]) : mixed
Parameters
-
$options
: mixed
= []
-
render_b5_show_subfield_css_classes()
render_b5_show_subfield_css_classes([mixed $options = [] ]) : mixed
Parameters
-
$options
: mixed
= []
-
render_b5_show()
render_b5_show(mixed $label, mixed $value[, mixed $options = [] ]) : mixed
Parameters
-
$label
: mixed
-
-
$value
: mixed
-
-
$options
: mixed
= []
-
render_b5_show_container()
render_b5_show_container(mixed $tag, mixed $content[, mixed $cssClasses = '' ][, mixed $options = [] ]) : mixed
Parameters
-
$tag
: mixed
-
-
$content
: mixed
-
-
$cssClasses
: mixed
= ''
-
-
$options
: mixed
= []
-
render_b5_show_label_css_classes()
render_b5_show_label_css_classes([mixed $options = [] ]) : mixed
Parameters
-
$options
: mixed
= []
-
render_b5_show_label()
render_b5_show_label(mixed $label[, mixed $options = [] ]) : mixed
Parameters
-
$label
: mixed
-
-
$options
: mixed
= []
-
render_b5_show_value_css_classes()
render_b5_show_value_css_classes([mixed $options = [] ]) : mixed
Parameters
-
$options
: mixed
= []
-
render_b5_show_value()
render_b5_show_value(mixed $value[, mixed $options = [] ]) : mixed
Parameters
-
$value
: mixed
-
-
$options
: mixed
= []
-
render_b5_section_heading()
render_b5_section_heading(mixed $text[, mixed $condition = false ][, mixed $url = null ][, mixed $linkOptions = [] ]) : mixed
Parameters
-
$text
: mixed
-
-
$condition
: mixed
= false
-
-
$url
: mixed
= null
-
-
$linkOptions
: mixed
= []
-
render_b5_show_list_css_classes()
render_b5_show_list_css_classes([mixed $options = [] ]) : mixed
Parameters
-
$options
: mixed
= []
-
add_paragraphs_and_linebreaks()
add_paragraphs_and_linebreaks(mixed $value) : mixed
Parameters
-
$value
: mixed
-
hr_filesize()
hr_filesize(mixed $val) : mixed
Parameters
-
$val
: mixed
-
render_treeview_node()
render_treeview_node(mixed $item[, array<string|int, mixed> $classes = [] ][, array<string|int, mixed> $options = [] ]) : mixed
Parameters
-
$item
: mixed
-
-
$classes
: array<string|int, mixed>
= []
-
-
$options
: array<string|int, mixed>
= []
-
render_b5_treeview_node()
render_b5_treeview_node(mixed $item[, array<string|int, mixed> $classes = [] ][, array<string|int, mixed> $options = [] ]) : mixed
Parameters
-
$item
: mixed
-
-
$classes
: array<string|int, mixed>
= []
-
-
$options
: array<string|int, mixed>
= []
-
is_using_cli()
is_using_cli() : mixed
get_search_creation_details()
get_search_creation_details(mixed $hit[, mixed $culture = null ]) : mixed
Parameters
-
$hit
: mixed
-
-
$culture
: mixed
= null
-
render_autocomplete_string()
render_autocomplete_string(mixed $hit) : mixed
Parameters
-
$hit
: mixed
-
escape_dc()
escape_dc(mixed $text) : mixed
Parameters
-
$text
: mixed
-
render_search_result_date()
render_search_result_date(mixed $date) : mixed
Parameters
-
$date
: mixed
-