function ClaroHooks::themeSuggestionsFormElementAlter

Implements hook_theme_suggestions_HOOK_alter() for form_element.

Attributes

#[Hook('theme_suggestions_form_element_alter')]

File

core/themes/claro/src/Hook/ClaroHooks.php, line 27

Class

ClaroHooks
Hook implementations for claro.

Namespace

Drupal\claro\Hook

Code

public function themeSuggestionsFormElementAlter(&$suggestions, $variables) : void {
  if (!empty($variables['element']['#type'])) {
    $suggestions[] = 'form_element__' . $variables['element']['#type'];
  }
}

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