function metatag_test_custom_route_metatag_route_entity in Metatag 8
Implements hook_metatag_route_entity().
File
- tests/
modules/ metatag_test_custom_route/ metatag_test_custom_route.module, line 29 - Contains metatag_test_custom_route.module..
Code
function metatag_test_custom_route_metatag_route_entity(RouteMatchInterface $route_match) {
if ($route_match
->getRouteName() === 'metatag_test_custom_route.entity_route') {
if ($entity_test = $route_match
->getParameter('entity_test')) {
return $entity_test;
}
}
}