summaryrefslogtreecommitdiffstats
path: root/core/lib/Drupal/Core/Render
diff options
context:
space:
mode:
authorAlex Pott2018-05-09 22:58:06 (GMT)
committerAlex Pott2018-05-09 22:58:06 (GMT)
commitd6caa271211ac9eb5c8663d1a1dd7ceb0246f31a (patch)
tree933481fff1e7f989199166fddf3e262618d3d59a /core/lib/Drupal/Core/Render
parent2129484ee5813d97a5159f10601e0048d3b73293 (diff)
Issue #2930407 by tstoeckler, lauriii, alexpott: Allow specifying summary attributes for details elements
Diffstat (limited to 'core/lib/Drupal/Core/Render')
-rw-r--r--core/lib/Drupal/Core/Render/Element/Details.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/lib/Drupal/Core/Render/Element/Details.php b/core/lib/Drupal/Core/Render/Element/Details.php
index 92bbb32..e45131c 100644
--- a/core/lib/Drupal/Core/Render/Element/Details.php
+++ b/core/lib/Drupal/Core/Render/Element/Details.php
@@ -15,6 +15,8 @@ use Drupal\Core\Render\Element;
* - #title: The title of the details container. Defaults to "Details".
* - #open: Indicates whether the container should be open by default.
* Defaults to FALSE.
+ * - #summary_attributes: An array of attributes to apply to the <summary>
+ * element.
*
* Usage example:
* @code
@@ -43,6 +45,7 @@ class Details extends RenderElement {
$class = get_class($this);
return [
'#open' => FALSE,
+ '#summary_attributes' => [],
'#value' => NULL,
'#process' => [
[$class, 'processGroup'],