238c05e867fa26ed92e59960822bbfd125cdae73
[yaffs-website] / web / core / modules / comment / src / Plugin / views / filter / NodeComment.php
1 <?php
2
3 namespace Drupal\comment\Plugin\views\filter;
4
5 use Drupal\comment\Plugin\Field\FieldType\CommentItemInterface;
6 use Drupal\views\Plugin\views\filter\InOperator;
7
8 /**
9  * Filter based on comment node status.
10  *
11  * @ingroup views_filter_handlers
12  *
13  * @ViewsFilter("node_comment")
14  */
15 class NodeComment extends InOperator {
16
17   public function getValueOptions() {
18     $this->valueOptions = [
19       CommentItemInterface::HIDDEN => $this->t('Hidden'),
20       CommentItemInterface::CLOSED => $this->t('Closed'),
21       CommentItemInterface::OPEN => $this->t('Open'),
22     ];
23     return $this->valueOptions;
24   }
25
26 }