function DblogTypes::getValueOptions

Same name and namespace in other branches
  1. 9 core/modules/dblog/src/Plugin/views/filter/DblogTypes.php \Drupal\dblog\Plugin\views\filter\DblogTypes::getValueOptions()
  2. 10 core/modules/dblog/src/Plugin/views/filter/DblogTypes.php \Drupal\dblog\Plugin\views\filter\DblogTypes::getValueOptions()
  3. 11.x core/modules/dblog/src/Plugin/views/filter/DblogTypes.php \Drupal\dblog\Plugin\views\filter\DblogTypes::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

array|null The stored values from $this->valueOptions.

Overrides InOperator::getValueOptions

File

core/modules/dblog/src/Plugin/views/filter/DblogTypes.php, line 17

Class

DblogTypes
Exposes log types to views module.

Namespace

Drupal\dblog\Plugin\views\filter

Code

public function getValueOptions() {
    if (!isset($this->valueOptions)) {
        $this->valueOptions = _dblog_get_message_types();
    }
    return $this->valueOptions;
}

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