annotate core/modules/system/templates/container.html.twig @ 19:fa3358dc1485 tip

Add ndrum files
author Chris Cannam
date Wed, 28 Aug 2019 13:14:47 +0100
parents 4c8ae668cc8c
children
rev   line source
Chris@0 1 {#
Chris@0 2 /**
Chris@0 3 * @file
Chris@0 4 * Default theme implementation of a container used to wrap child elements.
Chris@0 5 *
Chris@0 6 * Used for grouped form items. Can also be used as a theme wrapper for any
Chris@0 7 * renderable element, to surround it with a <div> and HTML attributes.
Chris@0 8 * See \Drupal\Core\Render\Element\RenderElement for more
Chris@0 9 * information on the #theme_wrappers render array property, and
Chris@0 10 * \Drupal\Core\Render\Element\container for usage of the container render
Chris@0 11 * element.
Chris@0 12 *
Chris@0 13 * Available variables:
Chris@0 14 * - attributes: HTML attributes for the containing element.
Chris@0 15 * - children: The rendered child elements of the container.
Chris@0 16 * - has_parent: A flag to indicate that the container has one or more parent
Chris@0 17 containers.
Chris@0 18 *
Chris@0 19 * @see template_preprocess_container()
Chris@0 20 *
Chris@0 21 * @ingroup themeable
Chris@0 22 */
Chris@0 23 #}
Chris@0 24 {%
Chris@0 25 set classes = [
Chris@0 26 has_parent ? 'js-form-wrapper',
Chris@0 27 has_parent ? 'form-wrapper',
Chris@0 28 ]
Chris@0 29 %}
Chris@0 30 <div{{ attributes.addClass(classes) }}>{{ children }}</div>