public function ContextualLinkManagerInterface::getContextualLinksArrayByGroup in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Menu/ContextualLinkManagerInterface.php \Drupal\Core\Menu\ContextualLinkManagerInterface::getContextualLinksArrayByGroup()
Gets the contextual links prepared as expected by links.html.twig.
Parameters
string $group_name: The group name.
array $route_parameters: The incoming route parameters. The route parameters need to have the same name on all contextual link routes, e.g. you cannot use 'node' and 'entity' in parallel.
array $metadata: Additional metadata of contextual links, like the position (optional).
Return value
array An array of link information, keyed by the plugin ID. Each entry is an associative array with the following keys:
- route_name: The route name to link to.
- route_parameters: The route parameters for the contextual link.
- title: The title of the contextual link.
- weight: The weight of the contextual link.
- localized_options: The options of the link, which will be passed to the link generator.
- metadata: The array of additional metadata that was passed in.
1 method overrides ContextualLinkManagerInterface::getContextualLinksArrayByGroup()
- ContextualLinkManager::getContextualLinksArrayByGroup in core/
lib/ Drupal/ Core/ Menu/ ContextualLinkManager.php - Gets the contextual links prepared as expected by links.html.twig.
File
- core/
lib/ Drupal/ Core/ Menu/ ContextualLinkManagerInterface.php, line 49 - Contains \Drupal\Core\Menu\ContextualLinkManagerInterface.
Class
- ContextualLinkManagerInterface
- Provides an object which returns the available contextual links.
Namespace
Drupal\Core\MenuCode
public function getContextualLinksArrayByGroup($group_name, array $route_parameters, array $metadata = array());