Advertisement
Guest User

Untitled

a guest
Mar 1st, 2021
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.47 KB | None | 0 0
  1. <?php
  2.  
  3. use Drupal\views\ViewExecutable;
  4.  
  5. /**
  6.  * Implements hook_theme_suggestions_HOOK_alter().
  7.  */
  8. function block_templates_fix_theme_suggestions_views_view_table_alter(array &$suggestions, array $variables) {
  9.   if (isset($variables['view']) && $variables['view'] instanceof ViewExecutable) {
  10.     $id = $variables['view']->current_display;
  11.  
  12.     if (!in_array('views_view_table__' . $id, $suggestions)) {
  13.       $suggestions[] = 'views_view_table__' . $id;
  14.     }
  15.   }
  16. }
  17.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement