ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
StateTranslator.php
Go to the documentation of this file.
1<?php
2
4
6
14trait StateTranslator
15{
16
23 public function translateState($state, \ilLanguage $lng)
24 {
25 switch ($state) {
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}
An exception for terminatinating execution or to throw for unit testing.
language handling
$lng