public LocalTaskDefault::getOptions(RouteMatchInterface $route_match)
Returns options for rendering a link to the local task.
\Drupal\Core\Routing\RouteMatchInterface $route_match: The current route match.
array An associative array of options.
Overrides LocalTaskInterface::getOptions
public function getOptions(RouteMatchInterface $route_match) { $options = $this->pluginDefinition['options']; if ($this->active) { if (empty($options['attributes']['class']) || !in_array('is-active', $options['attributes']['class'])) { $options['attributes']['class'][] = 'is-active'; } } return (array) $options; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Menu!LocalTaskDefault.php/function/LocalTaskDefault::getOptions/8.1.x