ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
StateTranslator.php
Go to the documentation of this file.
1 <?php
2 
20 
22 
28 trait StateTranslator
29 {
30  public function translateState(int $state, \ilLanguage $lng): string
31  {
32  switch ($state) {
33  case State::SCHEDULED:
34  return $lng->txt("observer_state_scheduled");
35  case State::RUNNING:
36  return $lng->txt("observer_state_running");
38  return $lng->txt("observer_state_user_interaction");
39  case State::FINISHED:
40  return $lng->txt("observer_state_finished");
41  case State::ERROR:
42  return $lng->txt("observer_state_error");
43  }
44  return '';
45  }
46 }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
$lng
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...