function ThemeSuggestionHooks::themeSuggestionsViewsViewFieldAlter
Same name and namespace in other branches
- 11.x core/themes/default_admin/src/Hook/ThemeSuggestionHooks.php \Drupal\default_admin\Hook\ThemeSuggestionHooks::themeSuggestionsViewsViewFieldAlter()
Implements hook_theme_suggestions_HOOK_alter() for views_view_field.
Attributes
#[Hook('theme_suggestions_views_view_field_alter')]
File
-
core/
themes/ default_admin/ src/ Hook/ ThemeSuggestionHooks.php, line 119
Class
- ThemeSuggestionHooks
- Provides theme suggestion hook implementations.
Namespace
Drupal\default_admin\HookCode
public function themeSuggestionsViewsViewFieldAlter(array &$suggestions, array $variables) : void {
$field_name = $variables['field']->field;
if ($field_name === 'status') {
$suggestions[] = 'views_view_field__' . $field_name;
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.