Version 1
[yaffs-website] / web / core / modules / system / tests / modules / twig_theme_test / templates / twig_theme_test.filter.html.twig
1 <div><strong>No author:</strong> {{ quote|without('author') }}.</div>
2 <div><strong>Complete quote after without:</strong> {{ quote }}.</div>
3 <div><strong>Only author:</strong> {{ quote.author }}.</div>
4 <div><strong>No author or date:</strong> {{ quote|without('date', 'author') }}.</div>
5 <div><strong>Only date:</strong> {{ quote.date }}.</div>
6 <div><strong>Complete quote again for good measure:</strong> {{ quote }}.</div>
7 <div><strong>Marked-up:</strong>
8   <blockquote>
9     <p>{{ quote.content }}</p>
10     <footer>
11       &ndash; <cite><a href="#">{{ quote.author }}</a> <em>({{ quote.date }})</em></cite>
12     </footer>
13   </blockquote>
14 </div>
15 <div><span{{ attributes }}>All attributes:</span></div>
16 <div><span class="{{ attributes.class }}"{{ attributes|without('class') }}>Class attributes in front, remainder at the back:</span></div>
17 <div><span{{ attributes|without('class') }} data-class="{{ attributes.class }}">Class attributes in back, remainder at the front:</span></div>
18 <div><span class="{{ attributes.class }}">Class attributes only:</span></div>
19 <div><span {{ attributes.checked }}{{ attributes|without('checked') }}>Without boolean attribute.</span></div>
20 <div><span data-id="{{ attributes.id }}"{{ attributes|without('id') }}>Without string attribute.</span></div>
21 <div><span{{ attributes|without('id', 'class') }}>Without id and class attributes.</span></div>
22 <div><span{{ attributes }}>All attributes again.</span></div>
23 <div id="{{ 'quotes Here!'|clean_id }}"><span class="{{ 'Gray like a bunny!'|clean_class }} {{ 'BEM__ized--Top Feature'|clean_class }}" id="{{ 'quotes Here!'|clean_id }}">ID and class. Having the same ID twice is not valid markup but we want to make sure the filter doesn't use \Drupal\Component\Utility\Html::getUniqueId().</span></div>
24 <div><strong>Rendered author string length:</strong> {{ quote.author|render|length }}.</div>