Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / vendor / consolidation / output-formatters / src / StructuredData / PropertyList.php
index 8a34225027e9a42e4db695dc6cb7b857c03d23b3..10b182cb3dd68ab436b2300e990eea01b35965cf 100644 (file)
@@ -13,8 +13,21 @@ use Consolidation\OutputFormatters\Transformations\PropertyListTableTransformati
  * key : value pair.  The keys must be unique, as is typically
  * the case for associative arrays.
  */
-class PropertyList extends AbstractStructuredList
+class PropertyList extends AbstractStructuredList implements ConversionInterface
 {
+    /**
+     * @inheritdoc
+     */
+    public function convert(FormatterOptions $options)
+    {
+        $defaults = $this->defaultOptions();
+        $fields = $this->getFields($options, $defaults);
+        if (FieldProcessor::hasUnstructuredFieldAccess($fields)) {
+            return new UnstructuredData($this->getArrayCopy());
+        }
+        return $this;
+    }
+
     /**
      * Restructure this data for output by converting it into a table
      * transformation object.