function OliveroHooks::themeSuggestionsFormAlter

Same name and namespace in other branches
  1. 11.x core/themes/olivero/src/Hook/OliveroHooks.php \Drupal\olivero\Hook\OliveroHooks::themeSuggestionsFormAlter()

Implements hook_theme_suggestions_HOOK_alter() for form templates.

Attributes

#[Hook('theme_suggestions_form_alter')]

File

core/themes/olivero/src/Hook/OliveroHooks.php, line 157

Class

OliveroHooks
Hook implementations for olivero.

Namespace

Drupal\olivero\Hook

Code

public function themeSuggestionsFormAlter(array &$suggestions, array $variables) : void {
  if ($variables['element']['#form_id'] === 'search_block_form') {
    $suggestions[] = 'form__search_block_form';
  }
}

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