function PreprocessHooks::linksActionLinks
Same name and namespace in other branches
- 11.x core/themes/admin/src/Hook/PreprocessHooks.php \Drupal\admin\Hook\PreprocessHooks::linksActionLinks()
Implements hook_preprocess_HOOK() for links__action_links.
Attributes
#[Hook('preprocess_links__action_links')]
File
-
core/
themes/ admin/ src/ Hook/ PreprocessHooks.php, line 809
Class
- PreprocessHooks
- Provides preprocess implementations.
Namespace
Drupal\admin\HookCode
public function linksActionLinks(array &$variables) : void {
$variables['attributes']['class'][] = 'action-links';
foreach ($variables['links'] as $delta => $link_item) {
$variables['links'][$delta]['attributes']->addClass('action-links__item');
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.