31 protected \ILIAS\DI\UIServices
$ui;
32 protected \ilObjLearningModule
$lm;
33 protected \ilLanguage
$lng;
42 $this->
ui = $DIC->ui();
43 $this->
ctrl = $DIC->ctrl();
44 $this->service = $lm_pres_service;
45 $this->
lng = $DIC->language();
46 $this->
access = $DIC->access();
47 $this->lm = $this->service->getLearningModule();
49 $this->
user = $DIC->user();
65 if ($this->lm->isActivePrintView() &&
$access->
checkAccess(
"read",
"", $this->lm->getRefId())) {
66 if (!$this->offline) {
67 $ui->mainTemplate()->addJavaScript(
"assets/js/Form.js");
68 $modal =
$ui->factory()->modal()->roundtrip(
70 $ui->factory()->legacy()->content(
'some modal')
71 )->withAsyncRenderUrl($this->
ctrl->getLinkTargetByClass(
"illmpresentationgui",
"showPrintViewSelection"));
74 "label" => $this->
lng->txt(
"cont_print_view"),
75 "signal" => $modal->getShowSignal(),
83 $menu_editor = new \ilLMMenuEditor();
84 $menu_editor->setObjId($this->lm->getId());
86 $cust_menu = $menu_editor->getMenuEntries(
true);
88 if (count($cust_menu) > 0 &&
$access->
checkAccess(
"read",
"", $this->lm->getRefId())) {
89 foreach ($cust_menu as $entry) {
91 if ($entry[
"type"] ==
"intern") {
92 $entry[
"link"] = ILIAS_HTTP_PATH .
"/goto.php?target=" . $entry[
"link"];
96 if (!strstr($entry[
"link"],
'://') && !strstr($entry[
"link"],
'mailto:')) {
97 $entry[
"link"] =
"https://" . $entry[
"link"];
100 if (!strstr($entry[
"link"],
'mailto:')) {
104 $signal = $generator->create();
107 "label" => $entry[
"title"],
110 "on_load" =>
"$(document).on('" .
112 "', function(event, signalData) {il.LearningModule.openMenuLink('" . $entry[
"link"] .
"');});"
setParameterByClass(string $a_class, string $a_parameter, $a_value)
@inheritDoc
Main service init and factory.
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...
static appendUrlParameterString(string $a_url, string $a_par, bool $xml_style=false)
checkAccess(string $a_permission, string $a_cmd, int $a_ref_id, string $a_type="", ?int $a_obj_id=null, ?int $a_tree_id=null)
check access for an object (provide $a_type and $a_obj_id if available for better performance)