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
.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.

References $DIC, $lm, $lm_set, ilLMTree\getInstance(), ilLMTracker\getInstance(), ilLMPresentationStatus\getLang(), and user().

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,
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  }
Contains info on offline mode, focus, translation, etc.
user()
Definition: user.php:4
Class ilLearningModuleGUI.
Checks current navigation request status.
static getInstance($a_tree_id)
Get Instance.
global $DIC
Definition: goto.php:24
Learning module presentation request.
static getInstance($a_ref_id, $a_user_id=0)
Get instance.
$lm_set
Learning module presentation linker.
+ Here is the call graph for this function:

Member Function Documentation

◆ getLearningModule()

ilLMPresentationService::getLearningModule ( )

◆ getLearningModuleGUI()

ilLMPresentationService::getLearningModuleGUI ( )
Returns
ilObjLearningModuleGUI

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

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

◆ getLinker()

ilLMPresentationService::getLinker ( )

Get linker.

Returns
ilLMPresentationLinker

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

Referenced by ilLMTOCExplorerGUI\__construct(), ilLMNavigationRendererGUI\__construct(), and ilLMContentRendererGUI\__construct().

168  {
169  return $this->linker;
170  }
+ Here is the caller graph for this function:

◆ getLMTree()

ilLMPresentationService::getLMTree ( )
Returns
ilLMTree

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

Referenced by ilLMNavigationRendererGUI\__construct(), ilLMContentRendererGUI\__construct(), and ilLMTOCExplorerGUIFactory\getExplorer().

121  : ilLMTree
122  {
123  return $this->lm_tree;
124  }
+ Here is the caller graph for this function:

◆ getNavigationStatus()

ilLMPresentationService::getNavigationStatus ( )
Returns
ilLMNavigationStatus

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

Referenced by ilLMNavigationRendererGUI\__construct(), ilLMContentRendererGUI\__construct(), and ilLMTOCExplorerGUIFactory\getExplorer().

138  {
139  return $this->navigation_status;
140  }
Checks current navigation request status.
+ Here is the caller graph for this function:

◆ getPresentationStatus()

ilLMPresentationService::getPresentationStatus ( )
Returns
ilLMPresentationStatus

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

Referenced by ILIAS\LearningModule\Menu\ilLMMenuGUI\__construct(), ilLMNavigationRendererGUI\__construct(), ilLMContentRendererGUI\__construct(), and ilLMTOCExplorerGUIFactory\getExplorer().

130  {
131  return $this->presentation_status;
132  }
Contains info on offline mode, focus, translation, etc.
+ Here is the caller graph for this function:

◆ getRequest()

ilLMPresentationService::getRequest ( )

Get request.

Returns
ilLMPresentationRequest

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

Referenced by ilLMTOCExplorerGUIFactory\getExplorer().

158  {
159  return $this->request;
160  }
+ Here is the caller graph for this function:

◆ getSettings()

ilLMPresentationService::getSettings ( )

Get learning module settings.

Returns
ilSetting

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

References $lm_set.

Referenced by ilLMNavigationRendererGUI\__construct(), and ilLMContentRendererGUI\__construct().

97  : ilSetting
98  {
99  return $this->lm_set;
100  }
$lm_set
+ Here is the caller graph for this function:

◆ getTracker()

ilLMPresentationService::getTracker ( )

Field Documentation

◆ $lm

ilLMPresentationService::$lm
protected

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

Referenced by __construct(), and 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: