Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / block_content / src / Plugin / views / wizard / BlockContent.php
diff --git a/web/core/modules/block_content/src/Plugin/views/wizard/BlockContent.php b/web/core/modules/block_content/src/Plugin/views/wizard/BlockContent.php
new file mode 100644 (file)
index 0000000..6072501
--- /dev/null
@@ -0,0 +1,35 @@
+<?php
+
+namespace Drupal\block_content\Plugin\views\wizard;
+
+use Drupal\views\Plugin\views\wizard\WizardPluginBase;
+
+/**
+ * Used for creating 'block_content' views with the wizard.
+ *
+ * @ViewsWizard(
+ *   id = "block_content",
+ *   base_table = "block_content_field_data",
+ *   title = @Translation("Custom Block"),
+ * )
+ */
+class BlockContent extends WizardPluginBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getFilters() {
+    $filters = parent::getFilters();
+    $filters['reusable'] = [
+      'id' => 'reusable',
+      'plugin_id' => 'boolean',
+      'table' => $this->base_table,
+      'field' => 'reusable',
+      'value' => '1',
+      'entity_type' => $this->entityTypeId,
+      'entity_field' => 'reusable',
+    ];
+    return $filters;
+  }
+
+}