Version 1
[yaffs-website] / web / core / modules / quickedit / src / Plugin / InPlaceEditor / FormEditor.php
diff --git a/web/core/modules/quickedit/src/Plugin/InPlaceEditor/FormEditor.php b/web/core/modules/quickedit/src/Plugin/InPlaceEditor/FormEditor.php
new file mode 100644 (file)
index 0000000..83ab1b4
--- /dev/null
@@ -0,0 +1,35 @@
+<?php
+
+namespace Drupal\quickedit\Plugin\InPlaceEditor;
+
+use Drupal\Core\Field\FieldItemListInterface;
+use Drupal\quickedit\Plugin\InPlaceEditorBase;
+
+/**
+ * Defines the form in-place editor.
+ *
+ * @InPlaceEditor(
+ *   id = "form"
+ * )
+ */
+class FormEditor extends InPlaceEditorBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function isCompatible(FieldItemListInterface $items) {
+    return TRUE;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getAttachments() {
+    return [
+      'library' => [
+        'quickedit/quickedit.inPlaceEditor.form',
+      ],
+    ];
+  }
+
+}