function PreprocessHooks::preprocessLinksActionLinks
Same name and namespace in other branches
- main core/themes/default_admin/src/Hook/PreprocessHooks.php \Drupal\default_admin\Hook\PreprocessHooks::preprocessLinksActionLinks()
Implements hook_preprocess_HOOK() for links__action_links.
Attributes
#[Hook('preprocess_links__action_links')]
File
-
core/
themes/ default_admin/ src/ Hook/ PreprocessHooks.php, line 797
Class
- PreprocessHooks
- Provides preprocess implementations.
Namespace
Drupal\default_admin\HookCode
public function preprocessLinksActionLinks(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.