function ThemeSuggestionHooks::viewsViewField

Same name and namespace in other branches
  1. main core/themes/admin/src/Hook/ThemeSuggestionHooks.php \Drupal\admin\Hook\ThemeSuggestionHooks::viewsViewField()

Implements hook_theme_suggestions_HOOK_alter() for views_view_field.

Attributes

#[Hook('theme_suggestions_views_view_field_alter')]

File

core/themes/admin/src/Hook/ThemeSuggestionHooks.php, line 123

Class

ThemeSuggestionHooks
Provides theme suggestion hook implementations.

Namespace

Drupal\admin\Hook

Code

public function viewsViewField(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.