You are here

public function LingotekApi::listWorkflows in Lingotek Translation 7.3

Same name and namespace in other branches
  1. 7.7 lib/Drupal/lingotek/LingotekApi.php \LingotekApi::listWorkflows()
  2. 7.2 lib/Drupal/lingotek/LingotekApi.php \LingotekApi::listWorkflows()
  3. 7.4 lib/Drupal/lingotek/LingotekApi.php \LingotekApi::listWorkflows()
  4. 7.5 lib/Drupal/lingotek/LingotekApi.php \LingotekApi::listWorkflows()
  5. 7.6 lib/Drupal/lingotek/LingotekApi.php \LingotekApi::listWorkflows()

Gets available Lingotek Workflows.

Return value

array An array of available Workflows with workflow IDs as keys, workflow labels as values.

File

lib/Drupal/lingotek/LingotekApi.php, line 787
Defines Drupal\lingotek\LingotekApi

Class

LingotekApi
@file Defines Drupal\lingotek\LingotekApi

Code

public function listWorkflows() {
  $workflows = array();
  if ($workflows_raw = $this
    ->request('listWorkflows')) {
    foreach ($workflows_raw->workflows as $workflow) {
      $workflows[$workflow->id] = $workflow->name;
    }
  }
  return $workflows;
}