function TopBarItem::__construct
Constructs a new TopBarItem instance.
Parameters
string $id: The top bar item ID.
\Drupal\navigation\TopBarRegion $region: The region where the top bar item belongs to.
\Drupal\Core\StringTranslation\TranslatableMarkup|null $label: (optional) The human-readable name of the top bar item.
class-string|null $deriver: (optional) The deriver class.
Overrides Plugin::__construct
File
-
core/
modules/ navigation/ src/ Attribute/ TopBarItem.php, line 29
Class
- TopBarItem
- The top bar item attribute.
Namespace
Drupal\navigation\AttributeCode
public function __construct(string $id, TopBarRegion $region, ?TranslatableMarkup $label = NULL, ?string $deriver = NULL) {
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.