4 * Theme override for comment fields.
7 * - attributes: HTML attributes for the containing element.
8 * - label_hidden: Whether to show the field label or not.
9 * - title_attributes: HTML attributes for the title.
10 * - label: The label for the field.
11 * - title_prefix: Additional output populated by modules, intended to be
12 * displayed in front of the main title tag that appears in the template.
13 * - title_suffix: Additional title output populated by modules, intended to
14 * be displayed after the main title tag that appears in the template.
15 * - comments: List of comments rendered through comment.html.twig.
16 * - comment_form: The 'Add new comment' form.
17 * - comment_display_mode: Is the comments are threaded.
18 * - comment_type: The comment type bundle ID for the comment field.
19 * - entity_type: The entity type to which the field belongs.
20 * - field_name: The name of the field.
21 * - field_type: The type of the field.
22 * - label_display: The display settings for the label.
24 * @see template_preprocess_field()
25 * @see comment_preprocess_field()
31 'field--name-' ~ field_name|clean_class,
32 'field--type-' ~ field_type|clean_class,
33 'field--label-' ~ label_display,
40 label_display == 'visually_hidden' ? 'visually-hidden',
43 <section{{ attributes.addClass(classes) }}>
44 {% if comments and not label_hidden %}
46 <h2{{ title_attributes.addClass(title_classes) }}>{{ label }}</h2>
53 <h2 class="title comment-form__title">{{ 'Add new comment'|t }}</h2>