function Details::getInfo

Same name in this branch
  1. 11.x core/lib/Drupal/Core/Render/Element/Details.php \Drupal\Core\Render\Element\Details::getInfo()
Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Render/Element/Details.php \Drupal\Core\Render\Element\Details::getInfo()
  2. 8.9.x core/lib/Drupal/Core/Render/Element/Details.php \Drupal\Core\Render\Element\Details::getInfo()
  3. 10 core/lib/Drupal/Core/Render/Element/Details.php \Drupal\Core\Render\Element\Details::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

core/modules/system/tests/modules/element_info_test/src/Render/Element/Details.php, line 33

Class

Details
Provides a render element for a details element.

Namespace

Drupal\element_info_test\Render\Element

Code

public function getInfo() : array {
  return [
    '#open' => FALSE,
    '#summary_attributes' => [],
    '#custom' => 'Custom',
  ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.