function Stable9Hooks::preprocessItemListSearchResults

Same name and namespace in other branches
  1. 11.x core/themes/stable9/src/Hook/Stable9Hooks.php \Drupal\stable9\Hook\Stable9Hooks::preprocessItemListSearchResults()

Implements hook_preprocess_item_list__search_results().

Converts the markup of #empty for search results.

Attributes

#[Hook('preprocess_item_list__search_results')]

File

core/themes/stable9/src/Hook/Stable9Hooks.php, line 21

Class

Stable9Hooks
Hook implementations for stable9.

Namespace

Drupal\stable9\Hook

Code

public function preprocessItemListSearchResults(&$variables) : void {
  if (isset($variables['empty']['#tag'])) {
    $variables['empty']['#tag'] = 'h3';
  }
}

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