public function AccountHeaderElement::getInfo in Open Social 10.1.x
Same name and namespace in other branches
- 8.9 modules/social_features/social_user/src/Element/AccountHeaderElement.php \Drupal\social_user\Element\AccountHeaderElement::getInfo()
- 8.4 modules/social_features/social_user/src/Element/AccountHeaderElement.php \Drupal\social_user\Element\AccountHeaderElement::getInfo()
- 8.5 modules/social_features/social_user/src/Element/AccountHeaderElement.php \Drupal\social_user\Element\AccountHeaderElement::getInfo()
- 8.6 modules/social_features/social_user/src/Element/AccountHeaderElement.php \Drupal\social_user\Element\AccountHeaderElement::getInfo()
- 8.7 modules/social_features/social_user/src/Element/AccountHeaderElement.php \Drupal\social_user\Element\AccountHeaderElement::getInfo()
- 8.8 modules/social_features/social_user/src/Element/AccountHeaderElement.php \Drupal\social_user\Element\AccountHeaderElement::getInfo()
- 10.3.x modules/social_features/social_user/src/Element/AccountHeaderElement.php \Drupal\social_user\Element\AccountHeaderElement::getInfo()
- 10.0.x modules/social_features/social_user/src/Element/AccountHeaderElement.php \Drupal\social_user\Element\AccountHeaderElement::getInfo()
- 10.2.x modules/social_features/social_user/src/Element/AccountHeaderElement.php \Drupal\social_user\Element\AccountHeaderElement::getInfo()
Returns the element properties for this element.
Return value
array An array of element properties. See \Drupal\Core\Render\ElementInfoManagerInterface::getInfo() for documentation of the standard properties of all elements, and the return value format.
Overrides ElementInterface::getInfo
File
- modules/
social_features/ social_user/ src/ Element/ AccountHeaderElement.php, line 29
Class
- AccountHeaderElement
- Provides an account header item element.
Namespace
Drupal\social_user\ElementCode
public function getInfo() {
$class = get_class($this);
return [
"#pre_render" => [
[
$class,
"preRenderAccountHeaderElement",
],
],
// The default title attribute for the link.
"#title" => "",
// The default href for the link.
"#url" => Url::fromRoute("<none>"),
// An optional image used in the link (supersedes the icon).
"#image" => NULL,
// An optional icon used in the link.
"#icon" => NULL,
// A label for the link, used on mobile.
"#label" => "",
// The number of notifications for this menu item.
// Will be rendered as a visual indicator if greater than 0.
"#notification_count" => NULL,
// Allows attaching libraries to the account header item.
"#attached" => NULL,
];
}