Status.php

Same filename in this branch
  1. 9 core/modules/media/src/Plugin/views/filter/Status.php
  2. 9 core/modules/node/src/Plugin/views/filter/Status.php
Same filename in other branches
  1. 8.9.x core/modules/media/src/Plugin/views/filter/Status.php
  2. 8.9.x core/modules/file/src/Plugin/views/filter/Status.php
  3. 8.9.x core/modules/node/src/Plugin/views/filter/Status.php
  4. 10 core/modules/media/src/Plugin/views/filter/Status.php
  5. 10 core/modules/file/src/Plugin/views/filter/Status.php
  6. 10 core/modules/node/src/Plugin/views/filter/Status.php
  7. 11.x core/modules/media/src/Plugin/views/filter/Status.php
  8. 11.x core/modules/file/src/Plugin/views/filter/Status.php
  9. 11.x core/modules/node/src/Plugin/views/filter/Status.php

Namespace

Drupal\file\Plugin\views\filter

File

core/modules/file/src/Plugin/views/filter/Status.php

View source
<?php

namespace Drupal\file\Plugin\views\filter;

use Drupal\file\FileInterface;
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 = [
                0 => $this->t('Temporary'),
                FileInterface::STATUS_PERMANENT => $this->t('Permanent'),
            ];
        }
        return $this->valueOptions;
    }

}

Classes

Title Deprecated Summary
Status Filter by file status.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.