35 string $requested_transl =
"",
36 string $requested_focus_id =
"",
37 string $requested_focus_return =
"",
38 string $requested_search_string =
"",
40 bool $export_all_languages,
41 string $export_format,
42 bool $embed_mode =
false 46 $this->requested_transl = (string) $requested_transl;
47 $this->requested_focus_id = $requested_focus_id;
48 $this->requested_focus_return = $requested_focus_return;
49 $this->requested_search_string = $requested_search_string;
51 $this->lm_tree = $lm_tree;
53 $this->export_all_languages = $export_all_languages;
54 $this->export_format = $export_format;
55 $this->embed_mode = $embed_mode;
66 $this->concrete_lang =
"-";
67 if ($this->ot->getContentActivated()) {
68 $langs = $this->ot->getLanguages();
69 if (isset($langs[$this->requested_transl]) || $this->requested_transl == $this->ot->getMasterLanguage()) {
70 $this->lang = $this->requested_transl;
72 $this->lang = $this->
user->getCurrentLanguage();
75 if ($this->lang == $this->ot->getMasterLanguage()) {
81 if ($this->requested_focus_id > 0 && $this->lm_tree->isInTree($this->requested_focus_id)) {
82 $this->focus_id = $this->requested_focus_id;
118 return $this->requested_focus_return;
126 return $this->requested_search_string;
134 return $this->offline;
139 return $this->embed_mode;
147 return $this->export_all_languages;
155 return $this->export_format;
165 if ($this->
offline() && $this->lang !=
"" && $this->lang !=
"-") {
167 $data = $ot->getLanguages();
172 $ltitle =
$data[$ot->getFallbackLanguage()][
"title"];
177 return $this->lm->getTitle();
187 $childs = $this->lm_tree->getChilds($this->lm_tree->getRootId());
188 if (count($childs) == 0) {
191 if (count($childs) > 1) {
194 if ($this->lm->getTOCMode() !=
"pages") {
197 $current_chapter = current($childs);
198 $childs = $this->lm_tree->getChilds($current_chapter[
"child"]);
199 if (count($childs) > 1) {
Class ilObjLearningModule.
getLMPresentationTitle()
Get lm presentationtitle.
Contains info on offline mode, focus, translation, etc.
getLang()
Get language key.
isTocNecessary()
Is TOC necessary, see #30027 Check if at least two entries will be shown.
getId()
get object id public
__construct(ilObjUser $user, ilObjLearningModule $lm, ilLMTree $lm_tree, string $requested_transl="", string $requested_focus_id="", string $requested_focus_return="", string $requested_search_string="", string $offline, bool $export_all_languages, string $export_format, bool $embed_mode=false)
Constructor.
static getInstance($a_obj_id)
Get instance.
getConcreteLang()
Only difference to getLang(): if current language is the master lang the language key will be returne...