Version 1
[yaffs-website] / web / core / modules / system / tests / modules / twig_theme_test / templates / twig_theme_test.filter.html.twig
diff --git a/web/core/modules/system/tests/modules/twig_theme_test/templates/twig_theme_test.filter.html.twig b/web/core/modules/system/tests/modules/twig_theme_test/templates/twig_theme_test.filter.html.twig
new file mode 100644 (file)
index 0000000..ea0b7af
--- /dev/null
@@ -0,0 +1,24 @@
+<div><strong>No author:</strong> {{ quote|without('author') }}.</div>
+<div><strong>Complete quote after without:</strong> {{ quote }}.</div>
+<div><strong>Only author:</strong> {{ quote.author }}.</div>
+<div><strong>No author or date:</strong> {{ quote|without('date', 'author') }}.</div>
+<div><strong>Only date:</strong> {{ quote.date }}.</div>
+<div><strong>Complete quote again for good measure:</strong> {{ quote }}.</div>
+<div><strong>Marked-up:</strong>
+  <blockquote>
+    <p>{{ quote.content }}</p>
+    <footer>
+      &ndash; <cite><a href="#">{{ quote.author }}</a> <em>({{ quote.date }})</em></cite>
+    </footer>
+  </blockquote>
+</div>
+<div><span{{ attributes }}>All attributes:</span></div>
+<div><span class="{{ attributes.class }}"{{ attributes|without('class') }}>Class attributes in front, remainder at the back:</span></div>
+<div><span{{ attributes|without('class') }} data-class="{{ attributes.class }}">Class attributes in back, remainder at the front:</span></div>
+<div><span class="{{ attributes.class }}">Class attributes only:</span></div>
+<div><span {{ attributes.checked }}{{ attributes|without('checked') }}>Without boolean attribute.</span></div>
+<div><span data-id="{{ attributes.id }}"{{ attributes|without('id') }}>Without string attribute.</span></div>
+<div><span{{ attributes|without('id', 'class') }}>Without id and class attributes.</span></div>
+<div><span{{ attributes }}>All attributes again.</span></div>
+<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>
+<div><strong>Rendered author string length:</strong> {{ quote.author|render|length }}.</div>