function hook_decoupled_router_info_alter in Decoupled Router 2.x
Perform alterations before to return the router info.
Parameters
array $output: Nested matrix of basic elements that comprise the found entity.
array $context: An array with the following keys:
- entity: The type of the parent entity.
1 function implements hook_decoupled_router_info_alter()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- test_decoupled_router_decoupled_router_info_alter in tests/
modules/ test_decoupled_router/ test_decoupled_router.module - Implements hook_decoupled_router_info_alter().
1 invocation of hook_decoupled_router_info_alter()
- RouterPathTranslatorSubscriber::onPathTranslation in src/
EventSubscriber/ RouterPathTranslatorSubscriber.php - Processes a path translation request.
File
- ./
decoupled_router.api.php, line 17 - Hooks provided by the Decoupled Router module.
Code
function hook_decoupled_router_info_alter(&$output, $context) {
if ($output['entity'] && $context['entity']) {
$output['entity']['description'] = t('New relevant description.');
}
}