public function LingotekDocument::hasPhasesToComplete in Lingotek Translation 7.4
Same name and namespace in other branches
- 7.7 lib/Drupal/lingotek/LingotekDocument.php \LingotekDocument::hasPhasesToComplete()
- 7.2 lib/Drupal/lingotek/LingotekDocument.php \LingotekDocument::hasPhasesToComplete()
- 7.3 lib/Drupal/lingotek/LingotekDocument.php \LingotekDocument::hasPhasesToComplete()
- 7.5 lib/Drupal/lingotek/LingotekDocument.php \LingotekDocument::hasPhasesToComplete()
- 7.6 lib/Drupal/lingotek/LingotekDocument.php \LingotekDocument::hasPhasesToComplete()
Determines whether or not the document has Translation Targets in a complete-eligible phase.
Return value
bool TRUE if complete-eligible phases are present. FALSE otherwise.
File
- lib/
Drupal/ lingotek/ LingotekDocument.php, line 103 - Defines LingotekDocument.
Class
- LingotekDocument
- A class representing a Lingotek Document
Code
public function hasPhasesToComplete() {
$result = FALSE;
if (class_exists('LingotekPhase')) {
$progress = $this
->getProgress();
if (is_object($progress)) {
foreach ($progress->translationTargets as $target) {
$current_phase = $this
->currentPhase($target->id);
if (is_object($current_phase) && $current_phase
->canBeMarkedComplete()) {
$result = TRUE;
break;
}
}
}
}
return $result;
}