You are here

public static function LingotekPhase::loadWithData in Lingotek Translation 7.2

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

Factory method for getting a loaded LingotekPhase object.

Parameters

object $api_phase: Phase data as returned by a getPhase Lingotek API call.

Return value

LingotekPhase A loaded LingotekPhase object.

1 call to LingotekPhase::loadWithData()
LingotekDocument::currentPhase in lib/Drupal/lingotek/LingotekDocument.php
Gets the current workflow phase for the document.

File

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

Class

LingotekPhase
A class representing a Lingotek Workflow Phase.

Code

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