Version 1
[yaffs-website] / web / core / modules / file / src / Plugin / views / filter / Status.php
diff --git a/web/core/modules/file/src/Plugin/views/filter/Status.php b/web/core/modules/file/src/Plugin/views/filter/Status.php
new file mode 100644 (file)
index 0000000..d9a3ccd
--- /dev/null
@@ -0,0 +1,23 @@
+<?php
+
+namespace Drupal\file\Plugin\views\filter;
+
+use Drupal\views\Plugin\views\filter\InOperator;
+
+/**
+ * Filter by file status.
+ *
+ * @ingroup views_filter_handlers
+ *
+ * @ViewsFilter("file_status")
+ */
+class Status extends InOperator {
+
+  public function getValueOptions() {
+    if (!isset($this->valueOptions)) {
+      $this->valueOptions = _views_file_status();
+    }
+    return $this->valueOptions;
+  }
+
+}