Comments

linclark’s picture

Issue summary: View changes

Added plaintext formatter module names.

linclark’s picture

Issue summary: View changes

Added email.

linclark’s picture

Issue summary: View changes

Added taxonomy.

scor’s picture

Title: [META] Test field formatter RDFa output » [META] Support and test all field formatters RDFa output
scor’s picture

Once these issues have been fixed, we should have a better idea on yched's suggestion from #1778122-53: Enable modules to inject attributes into field formatters, so that RDF attributes get output:

+++ b/core/modules/text/lib/Drupal/text/Plugin/field/formatter/TextTrimmedFormatter.php
@@ -77,7 +77,18 @@ public function viewElements(EntityInterface $entity, $langcode, FieldInterface
+      if (empty($item->html_data_attributes)) {
+        $elements[$delta] = array('#markup' => $output);
+      }
+      else {
+        // Adds a wrapping element if attributes are specified for this item.
+        $elements[$delta] = array(
+          '#type' => 'html_tag',
+          '#tag' => 'div',
+          '#attributes' => $item->html_data_attributes,
+          '#value' => $output,
+        );
+      }

Wondering how much of this could / should be moved to a helper method in FormatterBase ? Probably no big deal, though.

scor’s picture

Issue summary: View changes

add base class issue

scor’s picture

Issue summary: View changes
scor’s picture

Issue summary: View changes
scor’s picture

Issue summary: View changes
Status: Active » Closed (fixed)

closing the loop on this META. Those tests have all been added, see updated OP.