public function AddDefaultLocalAction::getRouteParameters in Panelizer 8.3
Same name and namespace in other branches
- 8.5 src/Menu/AddDefaultLocalAction.php \Drupal\panelizer\Menu\AddDefaultLocalAction::getRouteParameters()
- 8.4 src/Menu/AddDefaultLocalAction.php \Drupal\panelizer\Menu\AddDefaultLocalAction::getRouteParameters()
Returns the route parameters needed to render a link for the local action.
Parameters
\Drupal\Core\Routing\RouteMatchInterface $route_match: The current route match.
Return value
array An array of parameter names and values.
Overrides LocalActionDefault::getRouteParameters
File
- src/
Menu/ AddDefaultLocalAction.php, line 16
Class
Namespace
Drupal\panelizer\MenuCode
public function getRouteParameters(RouteMatchInterface $route_match) {
$this->pluginDefinition['route_parameters']['entity_type_id'] = $route_match
->getCurrentRouteMatch()
->getParameter('entity_type_id');
$this->pluginDefinition['route_parameters']['bundle'] = $route_match
->getCurrentRouteMatch()
->getParameter('bundle');
$this->pluginDefinition['route_parameters']['view_mode_name'] = $route_match
->getCurrentRouteMatch()
->getParameter('view_mode_name');
return parent::getRouteParameters($route_match);
}