class TopBarItemLow
Same name and namespace in other branches
- 11.x core/modules/navigation/tests/navigation_test/src/Plugin/TopBarItem/TopBarItemLow.php \Drupal\navigation_test\Plugin\TopBarItem\TopBarItemLow
Provides a top bar item plugin for testing the top bar item weight.
Attributes
#[TopBarItem(id: 'test_item_low', region: TopBarRegion::Context, label: new TranslatableMarkup('Low Weight'), weight: -10)]
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements \Drupal\Component\Plugin\PluginInspectionInterface, \Drupal\Component\Plugin\DerivativeInspectionInterface
- class \Drupal\navigation\TopBarItemBase implements \Drupal\navigation\TopBarItemPluginInterface extends \Drupal\Component\Plugin\PluginBase
- class \Drupal\navigation_test\Plugin\TopBarItem\TopBarItemLow extends \Drupal\navigation\TopBarItemBase
- class \Drupal\navigation\TopBarItemBase implements \Drupal\navigation\TopBarItemPluginInterface extends \Drupal\Component\Plugin\PluginBase
Expanded class hierarchy of TopBarItemLow
File
-
core/
modules/ navigation/ tests/ navigation_test/ src/ Plugin/ TopBarItem/ TopBarItemLow.php, line 15
Namespace
Drupal\navigation_test\Plugin\TopBarItemView source
class TopBarItemLow extends TopBarItemBase {
/**
* {@inheritdoc}
*/
public function build() : array {
return [
'#markup' => '<span class="top-bar__title" data-plugin-id="test_item_low">Low Weight</span>',
];
}
}
Members
| Title Sort descending | Modifiers | Object type | Summary | Overriden Title |
|---|---|---|---|---|
| PluginBase::$configuration | protected | property | Configuration information passed into the plugin. | |
| PluginBase::$pluginDefinition | protected | property | The plugin implementation definition. | |
| PluginBase::$pluginId | protected | property | The plugin ID. | |
| PluginBase::DERIVATIVE_SEPARATOR | constant | A string which is used to separate base plugin IDs from the derivative ID. | ||
| PluginBase::getBaseId | public | function | ||
| PluginBase::getDerivativeId | public | function | ||
| PluginBase::getPluginDefinition | public | function | ||
| PluginBase::getPluginId | public | function | ||
| PluginBase::__construct | public | function | Constructs a \Drupal\Component\Plugin\PluginBase object. | |
| TopBarItemBase::label | public | function | Returns the translated plugin label. | Overrides TopBarItemPluginInterface::label |
| TopBarItemBase::region | public | function | Returns the plugin region. | Overrides TopBarItemPluginInterface::region |
| TopBarItemBase::weight | public | function | Returns the plugin weight. | Overrides TopBarItemPluginInterface::weight |
| TopBarItemLow::build | public | function | Builds and returns the renderable array for this top bar item plugin. | Overrides TopBarItemBase::build |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.