function LocalTaskDefault::getOptions
Same name in other branches
- 9 core/lib/Drupal/Core/Menu/LocalTaskDefault.php \Drupal\Core\Menu\LocalTaskDefault::getOptions()
- 10 core/lib/Drupal/Core/Menu/LocalTaskDefault.php \Drupal\Core\Menu\LocalTaskDefault::getOptions()
- 11.x core/lib/Drupal/Core/Menu/LocalTaskDefault.php \Drupal\Core\Menu\LocalTaskDefault::getOptions()
Overrides LocalTaskInterface::getOptions
File
-
core/
lib/ Drupal/ Core/ Menu/ LocalTaskDefault.php, line 107
Class
- LocalTaskDefault
- Default object used for LocalTaskPlugins.
Namespace
Drupal\Core\MenuCode
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;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.