container--media-library-widget-selection.html.twig in Drupal 10
Same filename in this branch
- 10 core/themes/starterkit_theme/templates/media-library/container--media-library-widget-selection.html.twig
- 10 core/themes/classy/templates/media-library/container--media-library-widget-selection.html.twig
- 10 core/themes/claro/templates/classy/media-library/container--media-library-widget-selection.html.twig
- 10 core/themes/seven/templates/classy/media-library/container--media-library-widget-selection.html.twig
- 10 core/themes/bartik/templates/classy/media-library/container--media-library-widget-selection.html.twig
- 10 core/profiles/demo_umami/themes/umami/templates/classy/media-library/container--media-library-widget-selection.html.twig
Theme implementation of a wrapper for selected media items.
This is used to wrap around the set of media items that are currently selected in the media library widget (not the modal dialog), which may be used for entity reference fields that target media.
Available variables:
- attributes: HTML attributes for the containing element.
- children: The rendered child elements of the container.
- has_parent: A flag to indicate that the container has one or more parent containers.
See also
File
core/profiles/demo_umami/themes/umami/templates/classy/media-library/container--media-library-widget-selection.html.twigView source
- {#
- /**
- * @file
- * Theme implementation of a wrapper for selected media items.
- *
- * This is used to wrap around the set of media items that are currently
- * selected in the media library widget (not the modal dialog), which may
- * be used for entity reference fields that target media.
- *
- * Available variables:
- * - attributes: HTML attributes for the containing element.
- * - children: The rendered child elements of the container.
- * - has_parent: A flag to indicate that the container has one or more parent
- containers.
- *
- * @see template_preprocess_container()
- *
- * @ingroup themeable
- */
- #}
- {%
- set classes = [
- has_parent ? 'js-form-wrapper',
- has_parent ? 'form-wrapper',
- 'media-library-selection',
- ]
- %}
- <div{{ attributes.addClass(classes) }}>{{ children }}</div>