5 * Document all supported APIs.
9 * Provides a ability to integrate alternative routes with metatags.
11 * Return an entity when the given route/route parameters matches a certain
12 * entity. All metatags will be rendered on that page.
14 * @param \Drupal\Core\Routing\RouteMatchInterface $route_match
17 * @return \Drupal\Core\Entity\EntityInterface|null
18 * Return an entity, if the route should use metatags.
20 function hook_metatag_route_entity(\Drupal\Core\Routing\RouteMatchInterface $route_match) {
21 if ($route_match->getRouteName() === 'example.test_route') {
22 if ($node = $route_match->getParameter('node')) {