ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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)
 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 
)

Constructor.

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

33 {
34 global $DIC;
35
36 $ctrl = (is_null($ctrl))
37 ? $DIC->ctrl()
38 : $ctrl;
39
40 $this->request = new ilLMPresentationRequest($query_params);
41 $this->user = $user;
42 $this->ref_id = $this->request->getRequestedRefId();
43 $this->lm_set = new ilSetting("lm");
44 $this->lm_gui = new ilObjLearningModuleGUI([], $this->ref_id, true, false);
45 $this->lm = $this->lm_gui->object;
46 $this->lm_tree = ilLMTree::getInstance($this->lm->getId());
47 $this->presentation_status = new ilLMPresentationStatus(
48 $user,
49 $this->lm,
50 $this->lm_tree,
51 $this->request->getRequestedTranslation(),
52 $this->request->getRequestedFocusId(),
53 $this->request->getRequestedFocusReturn(),
54 (string) $this->request->getRequestedSearchString(),
55 $offline,
56 $export_all_languages,
57 $export_format
58 );
59
60 $this->navigation_status = new ilLMNavigationStatus(
61 $user,
62 (int) $this->request->getRequestedObjId(),
63 $this->lm_tree,
64 $this->lm,
65 $this->lm_set,
66 $this->request->getRequestedCmd(),
67 (int) $this->request->getRequestedFocusId()
68 );
69
70 $this->tracker = ilLMTracker::getInstance($this->lm->getRefId());
71 $this->tracker->setCurrentPage($this->navigation_status->getCurrentPage());
72
73 $this->linker = new ilLMPresentationLinker(
74 $this->lm,
75 $this->lm_tree,
76 $this->navigation_status->getCurrentPage(),
77 $this->request->getRequestedRefId(),
78 $this->presentation_status->getLang(),
79 $this->request->getRequestedBackPage(),
80 $this->request->getRequestedFromPage(),
81 $this->presentation_status->offline(),
82 $this->presentation_status->getExportFormat(),
83 $this->presentation_status->exportAllLanguages(),
84 $ctrl
85 );
86 }
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.
$DIC
Definition: xapitoken.php:46

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 109 of file class.ilLMPresentationService.php.

References $lm.

◆ getLearningModuleGUI()

ilLMPresentationService::getLearningModuleGUI ( )
Returns
ilObjLearningModuleGUI

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

102 {
103 return $this->lm_gui;
104 }

◆ getLinker()

ilLMPresentationService::getLinker ( )

Get linker.

Returns
ilLMPresentationLinker

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

164 {
165 return $this->linker;
166 }

◆ getLMTree()

ilLMPresentationService::getLMTree ( )
Returns
ilLMTree

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

117 : ilLMTree
118 {
119 return $this->lm_tree;
120 }

◆ getNavigationStatus()

ilLMPresentationService::getNavigationStatus ( )
Returns
ilLMNavigationStatus

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

134 {
135 return $this->navigation_status;
136 }

◆ getPresentationStatus()

ilLMPresentationService::getPresentationStatus ( )
Returns
ilLMPresentationStatus

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

126 {
127 return $this->presentation_status;
128 }

◆ getRequest()

ilLMPresentationService::getRequest ( )

Get request.

Returns
ilLMPresentationRequest

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

154 {
155 return $this->request;
156 }

◆ getSettings()

ilLMPresentationService::getSettings ( )

Get learning module settings.

Returns
ilSetting

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

93 : ilSetting
94 {
95 return $this->lm_set;
96 }
$lm_set

References $lm_set.

◆ getTracker()

ilLMPresentationService::getTracker ( )

Get tracker.

Returns
ilLMTracker

Definition at line 143 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: