Heratio Framework API Reference

API Documentation

Table of Contents

Namespaces

AtomExtensions
AtomFramework
AtoM

Classes

sfAction
sfActions
sfComponent
sfComponents
sfError404Exception
sfException
sfInitializationException
sfConfigurationException
sfParseException
sfParameterHolder
sfStopException
BasePeer
Criteria
CriterionStub
Stub for Propel's Criterion object, used in OR grouping.
arB5WidgetFormSchemaFormatter
arWidgetFormInputFileEditable
arB5WidgetFormInputFileEditable
arWidgetFormSelectRadio
arWidgetFormUploadQuota
sfValidatedFile
QubitValidatorPassword
QubitValidatorAccessionIdentifier
QubitValidatorActorDescriptionIdentifier
QubitValidatorUrl
QubitValidatorForbiddenValues
QubitValidatorCountable
QubitWidgetFormInputMany
QubitWidgetFormSchemaFormatterList
sfForm
sfFormField
sfValidatorBase
sfValidator
sfValidatorString
sfValidatorInteger
sfValidatorNumber
sfValidatorPass
sfValidatorBoolean
sfValidatorChoice
sfValidatorDate
sfValidatorUrl
sfValidatorEmail
sfValidatorRegex
sfValidatorCallback
sfValidatorFile
sfValidatorAnd
sfValidatorOr
sfValidatorI18nChoiceLanguage
QubitValidatorCountable
QubitValidatorDates
QubitValidatorForbiddenValues
QubitValidatorMenuName
QubitValidatorMimeType
QubitValidatorPassword
QubitValidatorUrl
sfValidatorError
sfValidatorErrorSchema
sfValidatorSchema
sfValidatorSchemaCompare
sfWidget
sfWidgetForm
sfWidgetFormInput
sfWidgetFormInputText
sfWidgetFormInputHidden
sfWidgetFormInputPassword
sfWidgetFormInputCheckbox
sfWidgetFormInputFile
sfWidgetFormSelect
sfWidgetFormTextarea
sfWidgetFormChoice
sfWidgetFormSelectRadio
sfWidgetFormI18nChoiceLanguage
QubitWidgetFormInputMany
sfWidgetFormSchema
sfWidgetFormSchemaFormatter
sfWidgetFormSchemaFormatterTable
sfWidgetFormSchemaFormatterList
Propel
Propel ORM Shim — Standalone replacement for Propel 1.4.
QubitActorI18n
QubitPhysicalObjectI18n
QubitInformationObjectI18n
QubitRepositoryI18n
QubitTermI18n
QubitEventI18n
QubitAccessionI18n
QubitNoteI18n
QubitContactInformationI18n
QubitSlugPeer
Qubit
QubitAccession
QubitAcl
QubitAclGroup
QubitAclPermission
QubitActor
QubitApi404Exception
API 404 Not Found Exception - Replaces QubitApi404Exception.
QubitApiBadRequestException
API Bad Request Exception - Replaces QubitApiBadRequestException.
QubitApiNotAuthorizedException
API Not Authorized Exception - Replaces QubitApiNotAuthorizedException.
QubitApiForbiddenException
API Forbidden Exception - Replaces QubitApiForbiddenException.
QubitAuditLog
QubitAuditObject
QubitBookoutObject
QubitBookoutObjectI18n
QubitCache
QubitClipboardSave
QubitClipboardSaveItem
QubitContactInformation
QubitCultureFallback
QubitDeaccession
QubitDescription
QubitDigitalObject
QubitDonor
QubitEvent
QubitFeedback
QubitFindingAid
QubitFindingAidGenerator
QubitFlatfileExport
QubitFunctionObject
QubitGrantedRight
QubitHtmlPurifier
QubitInformationObject
QubitJob
QubitLftSyncer
QubitMenu
QubitNote
QubitOai
QubitObject
QubitObjectTermRelation
QubitOtherName
QubitPager
QubitPdo
QubitPdo — Standalone PDO wrapper (Symfony-free).
QubitPhysicalObject
QubitProperty
QubitRelation
QubitRepository
QubitRequestToPublish
QubitRequestToPublishI18n
QubitRights
QubitRightsHolder
QubitSearch
QubitSearchPager
QubitSetting
QubitSlug
QubitStaticPage
QubitStatus
QubitTaxonomy
QubitTerm
QubitUser
sfEvent
sfEvent stub for standalone Heratio mode.
sfPluginConfiguration
sfPluginConfiguration stub for standalone Heratio mode.
sfSimpleAutoload
sfSimpleAutoload stub for standalone Heratio mode.
sfWebRequest
Minimal sfWebRequest shim for standalone Heratio mode.
arBaseTask
sfBaseTask
sfCommandOption
sfCommandArgument
sfFormatter
sfEventDispatcher
sfEvent
sfDatabaseManager
ProjectConfiguration
sfContext
sfCommandManager
sfCultureInfo
sfDateFormat
sfFilter
sfFilterChain
sfInflector
sfRoute
sfRequestRoute
sfObjectRoute
sfToolkit
AddActionRoute
Route class for "add" actions (/term/add, /accession/add, etc.)
AhgMetadataRoute
Extended MetadataRoute that adds GLAM sector plugins.
QubitMetadataRoute
Metadata route handler for AtoM.
sfForm
Minimal sfForm stub for standalone mode.

Functions

url_for()  : string
Generate a URL for a route or resource.
_resolve_named_route()  : string
Resolve a named route (@name?params) to a URL.
link_to()  : string
Generate an HTML anchor tag.
include_partial()  : void
Render and output a partial template.
get_partial()  : string
Render a partial template and return as string.
include_component()  : void
Render and output a component (action + template).
get_component()  : string
Render a component and return as string.
slot()  : void
Start capturing content for a named slot.
end_slot()  : void
End the current slot capture.
has_slot()  : bool
Check if a named slot has content.
get_slot()  : string
Get the content of a named slot.
include_slot()  : bool
Output a named slot.
content_tag()  : string
Generate an HTML content tag.
tag()  : string
Generate a self-closing HTML tag.
image_tag()  : string
Generate an <img> tag.
_tag_options()  : string
Convert options array to HTML attribute string.
use_helper()  : void
Load a helper group. No-op in standalone mode.
use_stylesheet()  : void
Add a stylesheet to the response. No-op in standalone (assets handled by layout).
use_javascript()  : void
Add a JavaScript to the response. No-op in standalone.
format_date()  : string
Format a date value.
format_number()  : string
Format a number.
_compute_public_path()  : string
Compute a public path for an asset.
esc_entities()  : string
Escape HTML entities.
esc_raw()  : mixed
Return value without escaping (identity function).
csrf_field()  : string
Render a hidden input field containing the CSRF token.
csrf_token()  : string
Get the current CSRF token string.
csrf_meta()  : string
Render a meta tag containing the CSRF token for JS access.
__()  : 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.
slot()  : mixed
end_slot()  : mixed
get_slot()  : mixed
has_slot()  : mixed
include_slot()  : mixed
decorate_with()  : mixed
url_for()  : mixed
link_to()  : mixed
esc_specialchars()  : mixed
esc_entities()  : mixed
esc_raw()  : mixed
format_number()  : mixed
format_date()  : mixed
use_helper()  : mixed
use_stylesheet()  : mixed
use_javascript()  : mixed
javascript_tag()  : mixed
image_tag()  : mixed
public_path()  : mixed
get_partial()  : mixed
include_partial()  : mixed
get_component()  : mixed
include_component()  : mixed
get_component_slot()  : mixed
include_component_slot()  : mixed
include_title()  : mixed
__()  : mixed
render_field()  : mixed
Minimal standalone shim for render_field().
render_show()  : mixed
Minimal standalone shim for render_show().
render_show_repository()  : mixed
render_value()  : mixed
render_value_inline()  : mixed
render_value_html()  : mixed
get_search_i18n()  : mixed
Extract an i18n field from a search result document (ES or DB row).
check_field_visibility()  : mixed
format_script()  : mixed
strip_markdown()  : mixed
render_title()  : mixed
Minimal standalone shim for render_title().
format_language()  : mixed
Format an ISO 639 language code as a human-readable name.
format_country()  : mixed
csrf_field()  : string
Render a hidden input field containing the CSRF token.
csrf_token()  : string
Get the current CSRF token string.
csrf_meta()  : string
Render a meta tag containing the CSRF token for JS access.
render_b5_field()  : mixed
render_b5_show_field_css_classes()  : mixed
render_b5_show_subfield_css_classes()  : mixed
render_b5_show()  : mixed
render_b5_show_container()  : mixed
render_b5_show_label_css_classes()  : mixed
render_b5_show_label()  : mixed
render_b5_show_value_css_classes()  : mixed
render_b5_show_value()  : mixed
render_b5_section_heading()  : mixed
render_b5_show_list_css_classes()  : mixed
add_paragraphs_and_linebreaks()  : mixed
hr_filesize()  : mixed
render_treeview_node()  : mixed
render_b5_treeview_node()  : mixed
is_using_cli()  : mixed
get_search_creation_details()  : mixed
render_autocomplete_string()  : mixed
escape_dc()  : mixed
render_search_result_date()  : mixed

Functions

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 = []
Return values
string

_resolve_named_route()

Resolve a named route (@name?params) to a URL.

_resolve_named_route(string $route) : string
Parameters
$route : string
Return values
string

Generate an HTML anchor tag.

link_to(string $text[, string|array<string|int, mixed> $url = '' ][, array<string|int, mixed> $options = [] ]) : string
Parameters
$text : string

Link text

$url : string|array<string|int, mixed> = ''

URL or route array

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

HTML attributes

Return values
string

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> = []

Variables to pass

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> = []

Variables to pass

Return values
string

include_component()

Render and output a component (action + template).

include_component(string $module, string $component[, array<string|int, mixed> $vars = [] ]) : void
Parameters
$module : string

Module name

$component : string

Component name

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

Variables to pass

get_component()

Render a component and return as string.

get_component(string $module, string $component[, array<string|int, mixed> $vars = [] ]) : string
Parameters
$module : string

Module name

$component : string

Component name

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

Variables to pass

Return values
string

slot()

Start capturing content for a named slot.

slot(mixed $name) : void
Parameters
$name : mixed

has_slot()

Check if a named slot has content.

has_slot(mixed $name) : bool
Parameters
$name : mixed
Return values
bool

get_slot()

Get the content of a named slot.

get_slot(mixed $name[, mixed $default = '' ]) : string
Parameters
$name : mixed
$default : mixed = ''
Return values
string

include_slot()

Output a named slot.

include_slot(mixed $name) : bool
Parameters
$name : mixed
Return values
bool

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 = ''

Tag content

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

HTML attributes

Return values
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 = []

HTML attributes

Return values
string

image_tag()

Generate an <img> tag.

image_tag(mixed $source[, mixed $options = [] ]) : string
Parameters
$source : mixed
$options : mixed = []
Return values
string

_tag_options()

Convert options array to HTML attribute string.

_tag_options(mixed $options) : string
Parameters
$options : mixed
Return values
string

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_date()

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)

Return values
string

format_number()

Format a number.

format_number(mixed $number[, mixed $culture = null ]) : string
Parameters
$number : mixed
$culture : mixed = null
Return values
string

_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 = ''
Return values
string

esc_entities()

Escape HTML entities.

esc_entities(mixed $value) : string
Parameters
$value : mixed
Return values
string

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
Return values
string

csrf_token()

Get the current CSRF token string.

csrf_token() : string
Return values
string

csrf_meta()

Render a meta tag containing the CSRF token for JS access.

csrf_meta() : string
Return values
string

__()

__(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

slot()

slot(mixed $name) : mixed
Parameters
$name : 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(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()

format_number(mixed $number[, mixed $decimals = 0 ]) : mixed
Parameters
$number : mixed
$decimals : mixed = 0

format_date()

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

__()

__(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()

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_language()

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()

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
Return values
string

csrf_token()

Get the current CSRF token string.

csrf_token() : string
Return values
string

csrf_meta()

Render a meta tag containing the CSRF token for JS access.

csrf_meta() : string
Return values
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> = []

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

        
On this page

Search results