ILIAS  release_7 Revision v7.30-3-g800a261c036
ilLMPresentationService Class Reference

Main service init and factory. More...

+ Collaboration diagram for ilLMPresentationService:

Public Member Functions

 __construct (ilObjUser $user, array $query_params, bool $offline=false, bool $export_all_languages=false, string $export_format="", ilCtrl $ctrl=null, bool $embed_mode=false)
 Constructor. More...
 
 getSettings ()
 Get learning module settings. More...
 
 getLearningModuleGUI ()
 
 getLearningModule ()
 
 getLMTree ()
 
 getPresentationStatus ()
 
 getNavigationStatus ()
 
 getTracker ()
 Get tracker. More...
 
 getRequest ()
 Get request. More...
 
 getLinker ()
 Get linker. More...
 

Protected Attributes

 $lm
 
 $tracker
 

Detailed Description

Main service init and factory.

Author
@leifos.de

Definition at line 11 of file class.ilLMPresentationService.php.

Constructor & Destructor Documentation

◆ __construct()

ilLMPresentationService::__construct ( ilObjUser  $user,
array  $query_params,
bool  $offline = false,
bool  $export_all_languages = false,
string  $export_format = "",
ilCtrl  $ctrl = null,
bool  $embed_mode = false 
)

Constructor.

Definition at line 26 of file class.ilLMPresentationService.php.

34 {
35 global $DIC;
36
37 $ctrl = (is_null($ctrl))
38 ? $DIC->ctrl()
39 : $ctrl;
40
41 $this->request = new ilLMPresentationRequest($query_params);
42 $this->user = $user;
43 $this->ref_id = $this->request->getRequestedRefId();
44 $this->lm_set = new ilSetting("lm");
45 $this->lm_gui = new ilObjLearningModuleGUI([], $this->ref_id, true, false);
46 $this->lm = $this->lm_gui->object;
47 $this->lm_tree = ilLMTree::getInstance($this->lm->getId());
48 $this->presentation_status = new ilLMPresentationStatus(
49 $user,
50 $this->lm,
51 $this->lm_tree,
52 $this->request->getRequestedTranslation(),
53 $this->request->getRequestedFocusId(),
54 $this->request->getRequestedFocusReturn(),
55 (string) $this->request->getRequestedSearchString(),
56 $offline,
57 $export_all_languages,
58 $export_format,
59 $embed_mode
60 );
61
62 $this->navigation_status = new ilLMNavigationStatus(
63 $user,
64 (int) $this->request->getRequestedObjId(),
65 $this->lm_tree,
66 $this->lm,
67 $this->lm_set,
68 $this->request->getRequestedBackPage(),
69 $this->request->getRequestedCmd(),
70 (int) $this->request->getRequestedFocusId()
71 );
72
73 $this->tracker = ilLMTracker::getInstance($this->lm->getRefId());
74 $this->tracker->setCurrentPage($this->navigation_status->getCurrentPage());
75
76 $this->linker = new ilLMPresentationLinker(
77 $this->lm,
78 $this->lm_tree,
79 $this->navigation_status->getCurrentPage(),
80 $this->request->getRequestedRefId(),
81 $this->presentation_status->getLang(),
82 $this->request->getRequestedBackPage(),
83 $this->request->getRequestedFromPage(),
84 $this->presentation_status->offline(),
85 $this->presentation_status->getExportFormat(),
86 $this->presentation_status->exportAllLanguages(),
87 $ctrl,
88 $embed_mode
89 );
90 }
user()
Definition: user.php:4
Checks current navigation request status.
Learning module presentation linker.
Learning module presentation request.
Contains info on offline mode, focus, translation, etc.
static getInstance($a_ref_id, $a_user_id=0)
Get instance.
static getInstance($a_tree_id)
Get Instance.
Class ilLearningModuleGUI.
ILIAS Setting Class.
global $DIC
Definition: goto.php:24

References $DIC, ilLMTracker\getInstance(), ilLMTree\getInstance(), and user().

+ Here is the call graph for this function:

Member Function Documentation

◆ getLearningModule()

ilLMPresentationService::getLearningModule ( )
Returns
ilObjLearningModule

Definition at line 113 of file class.ilLMPresentationService.php.

References $lm.

◆ getLearningModuleGUI()

ilLMPresentationService::getLearningModuleGUI ( )
Returns
ilObjLearningModuleGUI

Definition at line 105 of file class.ilLMPresentationService.php.

106 {
107 return $this->lm_gui;
108 }

◆ getLinker()

ilLMPresentationService::getLinker ( )

Get linker.

Returns
ilLMPresentationLinker

Definition at line 167 of file class.ilLMPresentationService.php.

168 {
169 return $this->linker;
170 }

◆ getLMTree()

ilLMPresentationService::getLMTree ( )
Returns
ilLMTree

Definition at line 121 of file class.ilLMPresentationService.php.

121 : ilLMTree
122 {
123 return $this->lm_tree;
124 }

◆ getNavigationStatus()

ilLMPresentationService::getNavigationStatus ( )
Returns
ilLMNavigationStatus

Definition at line 137 of file class.ilLMPresentationService.php.

138 {
139 return $this->navigation_status;
140 }

◆ getPresentationStatus()

ilLMPresentationService::getPresentationStatus ( )
Returns
ilLMPresentationStatus

Definition at line 129 of file class.ilLMPresentationService.php.

130 {
131 return $this->presentation_status;
132 }

Referenced by ILIAS\LearningModule\Menu\ilLMMenuGUI\__construct().

+ Here is the caller graph for this function:

◆ getRequest()

ilLMPresentationService::getRequest ( )

Get request.

Returns
ilLMPresentationRequest

Definition at line 157 of file class.ilLMPresentationService.php.

158 {
159 return $this->request;
160 }

◆ getSettings()

ilLMPresentationService::getSettings ( )

Get learning module settings.

Returns
ilSetting

Definition at line 97 of file class.ilLMPresentationService.php.

97 : ilSetting
98 {
99 return $this->lm_set;
100 }
$lm_set

References $lm_set.

◆ getTracker()

ilLMPresentationService::getTracker ( )

Get tracker.

Returns
ilLMTracker

Definition at line 147 of file class.ilLMPresentationService.php.

References $tracker.

Field Documentation

◆ $lm

ilLMPresentationService::$lm
protected

Definition at line 16 of file class.ilLMPresentationService.php.

Referenced by getLearningModule().

◆ $tracker

ilLMPresentationService::$tracker
protected

Definition at line 21 of file class.ilLMPresentationService.php.

Referenced by getTracker().


The documentation for this class was generated from the following file: