ILIAS  release_7 Revision v7.30-3-g800a261c036
class.ilLMPage.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2019 ILIAS open source, Extended GPL, see docs/LICENSE */
4
11{
17 public function getParentType()
18 {
19 return "lm";
20 }
21
28 public function afterConstructor()
29 {
30 $this->getPageConfig()->configureByObjectId($this->getParentId());
31 }
32
33
44 public function beforePageContentUpdate($a_page_content)
45 {
46 if ($a_page_content->getType() == "par") {
48 $a_page_content->autoLinkGlossaries($glos);
49 }
50 }
51
55 public function afterUpdate()
56 {
57 $references = ilObject::_getAllReferences($this->getParentId());
58 $notification = new ilLearningModuleNotification(
61 new ilObjLearningModule(reset($references)),
62 $this->getId()
63 );
64
65 $notification->send();
66 }
67
72 public function createWithLayoutId(int $a_layout_id)
73 {
74
75 //get XML Data for Layout
76 $layout_obj = new ilPageLayout($a_layout_id);
77
78 parent::setXMLContent($layout_obj->getXMLContent());
79 parent::create();
80 }
81}
An exception for terminatinating execution or to throw for unit testing.
Extension of ilPageObject for learning modules.
beforePageContentUpdate($a_page_content)
Before page content update.
afterUpdate()
After update content send notifications.
createWithLayoutId(int $a_layout_id)
Create page with layout.
afterConstructor()
After constructor.
getParentType()
Get parent type.
Class ilLearningModuleNotification class.
static lookupAutoGlossaries($a_lm_id)
Lookup auto glossaries.
Class ilObjLearningModule.
static _getAllReferences($a_id)
get all reference ids of object
Class ilPageLayout.
Class ilPageObject Handles PageObjects of ILIAS Learning Modules (see ILIAS DTD)
getPageConfig()
Get page config object.