class UserThemeHooks

Hook implementations for user.

Hierarchy

Expanded class hierarchy of UserThemeHooks

File

core/modules/user/src/Hook/UserThemeHooks.php, line 10

Namespace

Drupal\user\Hook
View source
class UserThemeHooks {
  
  /**
   * Implements hook_preprocess_HOOK() for block templates.
   */
  public function preprocessBlock(&$variables) : void {
    if ($variables['configuration']['provider'] == 'user') {
      switch ($variables['elements']['#plugin_id']) {
        case 'user_login_block':
          $variables['attributes']['role'] = 'form';
          break;

      }
    }
  }

}

Members

Title Sort descending Modifiers Object type Summary
UserThemeHooks::preprocessBlock public function Implements hook_preprocess_HOOK() for block templates.

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