NavigationTestThemeHooks.php

Namespace

Drupal\navigation_test\Hook

File

core/modules/navigation/tests/navigation_test/src/Hook/NavigationTestThemeHooks.php

View source
<?php

declare (strict_types=1);
namespace Drupal\navigation_test\Hook;

use Drupal\Component\Utility\Html;
use Drupal\Core\Hook\Attribute\Hook;

/**
 * Theme hook implementations for navigation_test module.
 */
class NavigationTestThemeHooks {
  
  /**
   * Implements hook_preprocess_HOOK().
   */
  public function preprocessBlockNavigation(&$variables) : void {
    // Add some additional classes so we can target the correct contextual link
    // in tests.
    $variables['attributes']['class'][] = Html::cleanCssIdentifier('block-' . $variables['elements']['#plugin_id']);
  }

}

Classes

Title Deprecated Summary
NavigationTestThemeHooks Theme hook implementations for navigation_test module.

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