You are here

public function NodeComment::getValueOptions in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/comment/src/Plugin/views/filter/NodeComment.php \Drupal\comment\Plugin\views\filter\NodeComment::getValueOptions()

Child classes should be used to override this function and set the 'value options', unless 'options callback' is defined as a valid function or static public method to generate these values.

This can use a guard to be used to reduce database hits as much as possible.

Return value

Return the stored values in $this->valueOptions if someone expects it.

Overrides InOperator::getValueOptions

File

core/modules/comment/src/Plugin/views/filter/NodeComment.php, line 22
Contains \Drupal\comment\Plugin\views\filter\NodeComment.

Class

NodeComment
Filter based on comment node status.

Namespace

Drupal\comment\Plugin\views\filter

Code

public function getValueOptions() {
  $this->valueOptions = array(
    CommentItemInterface::HIDDEN => $this
      ->t('Hidden'),
    CommentItemInterface::CLOSED => $this
      ->t('Closed'),
    CommentItemInterface::OPEN => $this
      ->t('Open'),
  );
}