MenuUiThemeHooks.php

Namespace

Drupal\menu_ui\Hook

File

core/modules/menu_ui/src/Hook/MenuUiThemeHooks.php

View source
<?php

namespace Drupal\menu_ui\Hook;

use Drupal\Core\Hook\Attribute\Hook;

/**
 * Hook implementations for menu_ui.
 */
class MenuUiThemeHooks {
  
  /**
   * Implements hook_preprocess_HOOK() for block templates.
   */
  public function preprocessBlock(&$variables) : void {
    if ($variables['configuration']['provider'] == 'menu_ui') {
      $variables['attributes']['role'] = 'navigation';
    }
  }

}

Classes

Title Deprecated Summary
MenuUiThemeHooks Hook implementations for menu_ui.

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