public function WithDestination::getOptions in Group 8
Same name and namespace in other branches
- 2.0.x src/Plugin/Menu/LocalAction/WithDestination.php \Drupal\group\Plugin\Menu\LocalAction\WithDestination::getOptions()
 
Returns options for rendering a link for the local action.
Parameters
\Drupal\Core\Routing\RouteMatchInterface $route_match: The current route match.
Return value
array An associative array of options.
Overrides LocalActionDefault::getOptions
File
- src/
Plugin/ Menu/ LocalAction/ WithDestination.php, line 63  
Class
- WithDestination
 - Modifies the local action to add a destination.
 
Namespace
Drupal\group\Plugin\Menu\LocalActionCode
public function getOptions(RouteMatchInterface $route_match) {
  $options = parent::getOptions($route_match);
  $options['query']['destination'] = $this->redirectDestination
    ->get();
  return $options;
}