You are here

public function EmailVerification::adminSummary in User email verification 8

Display the filter on the administrative summary

Overrides FilterPluginBase::adminSummary

File

src/Plugin/views/filter/EmailVerification.php, line 205

Class

EmailVerification
Simple filter to handle matching of boolean values

Namespace

Drupal\user_email_verification\Plugin\views\filter

Code

public function adminSummary() {
  if ($this
    ->isAGroup()) {
    return $this
      ->t('grouped');
  }
  if (!empty($this->options['exposed'])) {
    return $this
      ->t('exposed');
  }
  if (empty($this->valueOptions)) {
    $this
      ->getValueOptions();
  }

  // Now that we have the valid options for this filter, just return the
  // human-readable label based on the current value.  The valueOptions
  // array is keyed with either 0 or 1, so if the current value is not
  // empty, use the label for 1, and if it's empty, use the label for 0.
  return $this->operator . ' ' . $this->valueOptions[!empty($this->value)];
}