You are here

public static function JobType::getOptions in Advanced Queue 8

Gets the available job type options.

Return value

array The job type labels, keyed by ID.

1 call to JobType::getOptions()
JobType::render in src/Plugin/views/field/JobType.php
Renders the field.

File

src/Plugin/views/field/JobType.php, line 36

Class

JobType
Field handler to render a human readable job type label.

Namespace

Drupal\advancedqueue\Plugin\views\field

Code

public static function getOptions() {

  /** @var \Drupal\advancedqueue\JobTypeManager $job_type_manager */
  $job_type_manager = \Drupal::service('plugin.manager.advancedqueue_job_type');
  return array_map(function ($definition) {
    return $definition['label'];
  }, $job_type_manager
    ->getDefinitions());
}