You are here

public function AccountHeaderElement::getInfo in Open Social 8.9

Same name and namespace in other branches
  1. 8.4 modules/social_features/social_user/src/Element/AccountHeaderElement.php \Drupal\social_user\Element\AccountHeaderElement::getInfo()
  2. 8.5 modules/social_features/social_user/src/Element/AccountHeaderElement.php \Drupal\social_user\Element\AccountHeaderElement::getInfo()
  3. 8.6 modules/social_features/social_user/src/Element/AccountHeaderElement.php \Drupal\social_user\Element\AccountHeaderElement::getInfo()
  4. 8.7 modules/social_features/social_user/src/Element/AccountHeaderElement.php \Drupal\social_user\Element\AccountHeaderElement::getInfo()
  5. 8.8 modules/social_features/social_user/src/Element/AccountHeaderElement.php \Drupal\social_user\Element\AccountHeaderElement::getInfo()
  6. 10.3.x modules/social_features/social_user/src/Element/AccountHeaderElement.php \Drupal\social_user\Element\AccountHeaderElement::getInfo()
  7. 10.0.x modules/social_features/social_user/src/Element/AccountHeaderElement.php \Drupal\social_user\Element\AccountHeaderElement::getInfo()
  8. 10.1.x modules/social_features/social_user/src/Element/AccountHeaderElement.php \Drupal\social_user\Element\AccountHeaderElement::getInfo()
  9. 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\Element

Code

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,
  ];
}