3 namespace Drupal\comment\Plugin\views\filter;
5 use Drupal\comment\Plugin\Field\FieldType\CommentItemInterface;
6 use Drupal\views\Plugin\views\filter\InOperator;
9 * Filter based on comment node status.
11 * @ingroup views_filter_handlers
13 * @ViewsFilter("node_comment")
15 class NodeComment extends InOperator {
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'),
23 return $this->valueOptions;