ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
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
.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.

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

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,
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  }
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.
Learning module presentation request.
static getInstance($a_ref_id, $a_user_id=0)
Get instance.
$lm_set
Learning module presentation linker.
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:

Member Function Documentation

◆ getLearningModule()

ilLMPresentationService::getLearningModule ( )

◆ getLearningModuleGUI()

ilLMPresentationService::getLearningModuleGUI ( )
Returns
ilObjLearningModuleGUI

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

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

◆ getLinker()

ilLMPresentationService::getLinker ( )

Get linker.

Returns
ilLMPresentationLinker

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

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

164  {
165  return $this->linker;
166  }
+ Here is the caller graph for this function:

◆ getLMTree()

ilLMPresentationService::getLMTree ( )
Returns
ilLMTree

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

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

117  : ilLMTree
118  {
119  return $this->lm_tree;
120  }
+ Here is the caller graph for this function:

◆ getNavigationStatus()

ilLMPresentationService::getNavigationStatus ( )
Returns
ilLMNavigationStatus

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

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

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

◆ getPresentationStatus()

ilLMPresentationService::getPresentationStatus ( )
Returns
ilLMPresentationStatus

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

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

126  {
127  return $this->presentation_status;
128  }
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 153 of file class.ilLMPresentationService.php.

Referenced by ilLMTOCExplorerGUIFactory\getExplorer().

154  {
155  return $this->request;
156  }
+ Here is the caller graph for this function:

◆ getSettings()

ilLMPresentationService::getSettings ( )

Get learning module settings.

Returns
ilSetting

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

References $lm_set.

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

93  : ilSetting
94  {
95  return $this->lm_set;
96  }
$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: