TopBarItemInstantiation.php

Namespace

Drupal\navigation_test\Plugin\TopBarItem

File

core/modules/navigation/tests/navigation_test/src/Plugin/TopBarItem/TopBarItemInstantiation.php

View source
<?php

declare (strict_types=1);
namespace Drupal\navigation_test\Plugin\TopBarItem;

use Drupal\Core\StringTranslation\TranslatableMarkup;
use Drupal\navigation\Attribute\TopBarItem;
use Drupal\navigation\TopBarItemBase;
use Drupal\navigation\TopBarRegion;

/**
 * Provides a top bar item plugin for testing the top bar.
 */
class TopBarItemInstantiation extends TopBarItemBase {
  
  /**
   * {@inheritdoc}
   */
  public function build() : array {
    return [
      '#markup' => 'Top Bar Item',
    ];
  }

}

Classes

Title Deprecated Summary
TopBarItemInstantiation Provides a top bar item plugin for testing the top bar.

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