AhgMetadataRoute
extends QubitMetadataRoute
in package
Extended MetadataRoute that adds GLAM sector plugins.
Falls back to ISAD when ahgThemeB5Plugin is not enabled.
Uses MetadataTemplateRegistry for dynamic template lookup. GLAM sector plugins should register via MetadataTemplateProviderInterface.
Table of Contents
Properties
- $DEFAULT_MODULES : mixed
- $METADATA_PLUGINS : mixed
- Legacy metadata plugins mapping.
- $resource : mixed
Methods
- generate() : mixed
- matchesParameters() : mixed
- matchesUrl() : mixed
- Returns an array of parameters if the $url matches this route by looking up the slug in the database, otherwise returns FALSE. These parameters are modified according to the type of resource in order to route the request to its corresponding Symfony module.
Properties
$DEFAULT_MODULES
public
static mixed
$DEFAULT_MODULES
= ['informationobject' => \false, 'term' => 'term', 'actor' => 'sfIsaarPlugin', 'repository' => 'sfIsdiahPlugin', 'function' => 'sfIsdfPlugin']
$METADATA_PLUGINS
Legacy metadata plugins mapping.
Use MetadataTemplateRegistry for dynamic lookup. Core templates are in parent::$METADATA_PLUGINS. GLAM templates register via MetadataTemplateRegistry.
public
static mixed
$METADATA_PLUGINS
= [
// Core AtoM templates (inherited from parent)
'isaar' => 'sfIsaarPlugin',
'eac' => 'sfEacPlugin',
'ead' => 'sfEadPlugin',
'isad' => 'sfIsadPlugin',
'dc' => 'sfDcPlugin',
'skos' => 'sfSkosPlugin',
'rad' => 'sfRadPlugin',
'mods' => 'sfModsPlugin',
'dacs' => 'arDacsPlugin',
'isdf' => 'sfIsdfPlugin',
// GLAM sector templates
'museum' => 'museum',
'dam' => 'dam',
'gallery' => 'gallery',
'library' => 'library',
]
$resource
public
mixed
$resource
Methods
generate()
public
generate(mixed $params[, mixed $context = [] ][, mixed $absolute = false ]) : mixed
Parameters
- $params : mixed
- $context : mixed = []
- $absolute : mixed = false
matchesParameters()
public
matchesParameters(mixed $params[, mixed $context = [] ]) : mixed
Parameters
- $params : mixed
- $context : mixed = []
matchesUrl()
Returns an array of parameters if the $url matches this route by looking up the slug in the database, otherwise returns FALSE. These parameters are modified according to the type of resource in order to route the request to its corresponding Symfony module.
public
matchesUrl(mixed $url[, mixed $context = [] ]) : mixed
Case 1: e.g. uri "/peanut-12345" (QubitInformationObject) -> Add module 'sfIsadPlugin' since that is the module that corresponds with that description (it looks at the record settings and the default application template). Case 2: e.g. uri "/repository/add" -> Replace module "repository" with "sfIsdiahPlugin". The relation is descrbied in self::$DEFAULT_MODULES
Parameters
- $url : mixed
- $context : mixed = []