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

Breadcrumb

  1. Drupal Core 11.1.x
  2. TopBarItem.php

class TopBarItem

The top bar item attribute.

Hierarchy

  • class \Drupal\Component\Plugin\Attribute\AttributeBase implements \Drupal\Component\Plugin\Attribute\AttributeInterface
    • class \Drupal\Component\Plugin\Attribute\Plugin extends \Drupal\Component\Plugin\Attribute\AttributeBase
      • class \Drupal\navigation\Attribute\TopBarItem extends \Drupal\Component\Plugin\Attribute\Plugin

Expanded class hierarchy of TopBarItem

2 files declare their use of TopBarItem
PageActions.php in core/modules/navigation/src/Plugin/TopBarItem/PageActions.php
TopBarItemManager.php in core/modules/navigation/src/TopBarItemManager.php

File

core/modules/navigation/src/Attribute/TopBarItem.php, line 14

Namespace

Drupal\navigation\Attribute
View source
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) {
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title Overrides
AttributeBase::$class protected property The class used for this attribute class.
AttributeBase::$provider protected property The provider of the attribute class.
AttributeBase::get public function Gets the value of an attribute. Overrides AttributeInterface::get 6
AttributeBase::getClass public function Gets the class of the attribute class. Overrides AttributeInterface::getClass 1
AttributeBase::getId public function Gets the unique ID for this attribute class. Overrides AttributeInterface::getId
AttributeBase::getProvider public function Gets the name of the provider of the attribute class. Overrides AttributeInterface::getProvider
AttributeBase::setClass public function Sets the class of the attributed class. Overrides AttributeInterface::setClass 1
AttributeBase::setProvider public function Sets the name of the provider of the attribute class. Overrides AttributeInterface::setProvider
TopBarItem::__construct public function Constructs a new TopBarItem instance. Overrides Plugin::__construct

API Navigation

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