Drupal investigation

details.html.twig 990B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation for a details element.
  5. *
  6. * Available variables
  7. * - attributes: A list of HTML attributes for the details element.
  8. * - errors: (optional) Any errors for this details element, may not be set.
  9. * - title: (optional) The title of the element, may not be set.
  10. * - description: (optional) The description of the element, may not be set.
  11. * - children: (optional) The children of the element, may not be set.
  12. * - value: (optional) The value of the element, may not be set.
  13. *
  14. * @see template_preprocess_details()
  15. *
  16. * @ingroup themeable
  17. */
  18. #}
  19. <details{{ attributes }}>
  20. {%
  21. set summary_classes = [
  22. required ? 'js-form-required',
  23. required ? 'form-required',
  24. ]
  25. %}
  26. {%- if title -%}
  27. <summary{{ summary_attributes.addClass(summary_classes) }}>{{ title }}</summary>
  28. {%- endif -%}
  29. {% if errors %}
  30. <div>
  31. {{ errors }}
  32. </div>
  33. {% endif %}
  34. {{ description }}
  35. {{ children }}
  36. {{ value }}
  37. </details>