"Fossies" - the Fresh Open Source Software Archive

Member "drupal-8.9.9/core/themes/stable/templates/form/container.html.twig" (18 Nov 2020, 890 Bytes) of package /linux/www/drupal-8.9.9.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) HTML source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

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