You are here

public function AddDefaultLocalAction::getRouteParameters in Panelizer 8.3

Same name and namespace in other branches
  1. 8.5 src/Menu/AddDefaultLocalAction.php \Drupal\panelizer\Menu\AddDefaultLocalAction::getRouteParameters()
  2. 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

AddDefaultLocalAction

Namespace

Drupal\panelizer\Menu

Code

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);
}