function MachineName::getValueOptions

Same name in other branches
  1. 8.9.x core/modules/views/src/Plugin/views/field/MachineName.php \Drupal\views\Plugin\views\field\MachineName::getValueOptions()
  2. 10 core/modules/views/src/Plugin/views/field/MachineName.php \Drupal\views\Plugin\views\field\MachineName::getValueOptions()
  3. 11.x core/modules/views/src/Plugin/views/field/MachineName.php \Drupal\views\Plugin\views\field\MachineName::getValueOptions()
1 call to MachineName::getValueOptions()
MachineName::preRender in core/modules/views/src/Plugin/views/field/MachineName.php
Runs before any fields are rendered.

File

core/modules/views/src/Plugin/views/field/MachineName.php, line 27

Class

MachineName
Field handler which allows to show machine name content as human name.

Namespace

Drupal\views\Plugin\views\field

Code

public function getValueOptions() {
    if (isset($this->valueOptions)) {
        return;
    }
    if (isset($this->definition['options callback']) && is_callable($this->definition['options callback'])) {
        if (isset($this->definition['options arguments']) && is_array($this->definition['options arguments'])) {
            $this->valueOptions = call_user_func_array($this->definition['options callback'], $this->definition['options arguments']);
        }
        else {
            $this->valueOptions = call_user_func($this->definition['options callback']);
        }
    }
    else {
        $this->valueOptions = [];
    }
}

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