Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x

TopBarItem.php

Namespace

Drupal\navigation\Attribute

File

core/modules/navigation/src/Attribute/TopBarItem.php

View source
<?php

declare (strict_types=1);
namespace Drupal\navigation\Attribute;

use Drupal\Component\Plugin\Attribute\Plugin;
use Drupal\Core\StringTranslation\TranslatableMarkup;
use Drupal\navigation\TopBarRegion;

/**
 * The top bar item attribute.
 */
final class TopBarItem extends Plugin {
    
    /**
     * Constructs a new TopBarItem instance.
     *
     * @param string $id
     *   The top bar item ID.
     * @param \Drupal\navigation\TopBarRegion $region
     *   The region where the top bar item belongs to.
     * @param \Drupal\Core\StringTranslation\TranslatableMarkup|null $label
     *   (optional) The human-readable name of the top bar item.
     * @param class-string|null $deriver
     *   (optional) The deriver class.
     */
    public function __construct(string $id, TopBarRegion $region, ?TranslatableMarkup $label = NULL, ?string $deriver = NULL) {
    }

}

Classes

Title Deprecated Summary
TopBarItem The top bar item attribute.

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal