You are here

public static function LingotekPhase::load in Lingotek Translation 7.5

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

Factory method for getting a loaded LingotekPhase object.

Parameters

int $phase_id: A phase ID.

Return value

LingotekPhase A loaded LingotekPhase object.

File

lib/Drupal/lingotek/LingotekPhase.php, line 48
Defines LingotekPhase.

Class

LingotekPhase
A class representing a Lingotek Workflow Phase.

Code

public static function load($phase_id) {
  $api = LingotekApi::instance();
  $api_phase = $api
    ->get_phase($phase_id);
  $phase = new LingotekPhase($api_phase);
  $phase
    ->setApi($api);
  return $phase;
}