ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
StateTranslator.php
Go to the documentation of this file.
1 <?php
2 
4 
6 
14 trait StateTranslator
15 {
16 
23  public function translateState($state, \ilLanguage $lng)
24  {
25  switch ($state) {
26  case State::SCHEDULED:
27  return $lng->txt("observer_state_scheduled");
28  case State::RUNNING:
29  return $lng->txt("observer_state_running");
31  return $lng->txt("observer_state_user_interaction");
32  case State::FINISHED:
33  return $lng->txt("observer_state_finished");
34  case State::ERROR:
35  return $lng->txt("observer_state_error");
36  }
37  }
38 }
$lng
language handling
txt($a_topic, $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...