function ThemeSuggestionHooks::table

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

Implements hook_theme_suggestions_HOOK_alter() for table.

Attributes

#[Hook('theme_suggestions_table_alter')]

File

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

Class

ThemeSuggestionHooks
Provides theme suggestion hook implementations.

Namespace

Drupal\admin\Hook

Code

public function table(array &$suggestions, array $variables) : void {
  if (empty($variables['attributes']['class'])) {
    return;
  }
  if (is_array($variables['attributes']['class']) && in_array('field-multiple-table', $variables['attributes']['class'], TRUE)) {
    $suggestions[] = 'table__simple';
  }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.