UserThemeHooks.php
Namespace
Drupal\user\HookFile
-
core/
modules/ user/ src/ Hook/ UserThemeHooks.php
View source
<?php
namespace Drupal\user\Hook;
use Drupal\Core\Hook\Attribute\Hook;
/**
* Hook implementations for user.
*/
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;
}
}
}
}
Classes
Title | Deprecated | Summary |
---|---|---|
UserThemeHooks | Hook implementations for user. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.