You are here

public function ScheduledTransitionsLocalAction::getOptions in Scheduled Transitions 2.x

Same name and namespace in other branches
  1. 8 src/Plugin/Menu/LocalAction/ScheduledTransitionsLocalAction.php \Drupal\scheduled_transitions\Plugin\Menu\LocalAction\ScheduledTransitionsLocalAction::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/ScheduledTransitionsLocalAction.php, line 19

Class

ScheduledTransitionsLocalAction
Defines local action class.

Namespace

Drupal\scheduled_transitions\Plugin\Menu\LocalAction

Code

public function getOptions(RouteMatchInterface $route_match) {
  $options = parent::getOptions($route_match);
  $options['query']['destination'] = Url::fromRoute('<current>')
    ->toString();
  return $options;
}