You are here

public function EditTab::getRouteParameters in Workbench Moderation 8.2

Same name and namespace in other branches
  1. 8 src/Plugin/Menu/EditTab.php \Drupal\workbench_moderation\Plugin\Menu\EditTab::getRouteParameters()

Returns the route parameters needed to render a link for the local task.

Parameters

\Drupal\Core\Routing\RouteMatchInterface $route_match: The current route match.

Return value

array An array of parameter names and values.

Overrides LocalTaskDefault::getRouteParameters

File

src/Plugin/Menu/EditTab.php, line 71

Class

EditTab
Defines a class for making the edit tab use 'Edit draft' or 'New draft'

Namespace

Drupal\workbench_moderation\Plugin\Menu

Code

public function getRouteParameters(RouteMatchInterface $route_match) {

  // Override the node here with the latest revision.
  $this->entity = $route_match
    ->getParameter($this->pluginDefinition['entity_type_id']);
  return parent::getRouteParameters($route_match);
}