public function JobItemState::getValueOptions

Gets the values of the options.

Return value

array Returns options.

File

src/Plugin/views/filter/JobItemState.php, line 30

Class

JobItemState
Filter based on job item state.

Namespace

Drupal\tmgmt\Plugin\views\filter

Code

public function getValueOptions() {
  $this->valueOptions = [
    'open_job_items' => t('- Open jobs items -'),
  ];
  $state_definitions = JobItem::getStateDefinitions();
  foreach ($state_definitions as $state => $state_definition) {
    $this->valueOptions[$state] = $state_definition['label'];
  }
  return $this->valueOptions;
}