ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
All Data Structures Namespaces Files Functions Variables Modules Pages
ilShopPublicSectionSelector Class Reference

Public Section Explorer. More...

+ Inheritance diagram for ilShopPublicSectionSelector:
+ Collaboration diagram for ilShopPublicSectionSelector:

Public Member Functions

 __construct ($a_target, $a_lm_obj, $a_gui_class)
 Constructor public. More...
 
 buildFrameTarget ($a_type, $a_child=0, $a_obj_id=0)
 
 buildLinkTarget ($a_node_id, $a_type)
 
 isClickable ($a_type, $a_node_id)
 
 getOutput ()
 

Data Fields

 $root_id
 
 $output
 
 $ctrl
 
 $selectable_type
 
 $ref_id
 

Detailed Description

Public Section Explorer.

Author
Michael Jansen mjase.nosp@m.n@da.nosp@m.tabay.nosp@m..de

Definition at line 34 of file class.ilShopPublicSectionSelector.php.

Constructor & Destructor Documentation

◆ __construct()

ilShopPublicSectionSelector::__construct (   $a_target,
  $a_lm_obj,
  $a_gui_class 
)

Constructor public.

Parameters
stringscriptname
objectlm object
stringgui class name

Definition at line 55 of file class.ilShopPublicSectionSelector.php.

References $_GET, and $ilCtrl.

56  {
57  global $ilCtrl;
58 
59  $this->ctrl = $ilCtrl;
60  $this->gui_class = $a_gui_class;
61  parent::ilLMTOCExplorer($a_target, $a_lm_obj);
62  $this->setSessionExpandVariable('lmshoppublicselectorexpand');
63  $this->setExpandTarget($a_target);
64  $this->setExpand((int)$_GET['lmshoppublicselectorexpand'] ? (int)$_GET['lmshoppublicselectorexpand'] : $this->tree->readRootId());
65  }
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18

Member Function Documentation

◆ buildFrameTarget()

ilShopPublicSectionSelector::buildFrameTarget (   $a_type,
  $a_child = 0,
  $a_obj_id = 0 
)

Definition at line 67 of file class.ilShopPublicSectionSelector.php.

68  {
69  return '_top';
70  }

◆ buildLinkTarget()

ilShopPublicSectionSelector::buildLinkTarget (   $a_node_id,
  $a_type 
)

Definition at line 72 of file class.ilShopPublicSectionSelector.php.

73  {
74  if(!$this->offlineMode())
75  {
76  return parent::buildLinkTarget($a_node_id, $a_type);
77  }
78  else
79  {
80  if ($a_node_id < 1)
81  {
82  $a_node_id = $this->tree->getRootId();
83  }
84  if ($a_type != 'pg')
85  {
86  $a_node = $this->tree->fetchSuccessorNode($a_node_id, 'pg');
87  $a_node_id = $a_node['child'];
88  }
89  if (!$this->lm_obj->cleanFrames())
90  {
91  return 'frame_'.$a_node_id.'_maincontent.html';
92  }
93  else
94  {
95  return 'lm_pg_'.$a_node_id.'.html';
96  }
97  }
98  }

◆ getOutput()

ilShopPublicSectionSelector::getOutput ( )

Definition at line 128 of file class.ilShopPublicSectionSelector.php.

References $ilBench, $options, and $tpl.

Referenced by ilShopPurchaseGUI\showDemoVersion().

129  {
130  global $ilBench, $tpl;
131 
132  $ilBench->start('Explorer', 'getOutput');
133 
134  $this->format_options[0]['tab'] = array();
135 
136  $depth = $this->tree->getMaximumDepth();
137 
138  for ($i=0;$i<$depth;++$i)
139  {
140  $this->createLines($i);
141  }
142 
143  // set global body class
144  $tpl->setBodyClass("il_Explorer");
145 
146  $tpl_tree = new ilTemplate('tpl.tree_form.html', true, true, 'Modules/LearningModule');
147 
148  $cur_depth = -1;
149  foreach ($this->format_options as $key => $options)
150  {
151 //echo '-'.$options['depth'].'-';
152  if (!$options['visible'])
153  {
154  continue;
155  }
156 
157  if ($key == 0)
158  {
159  continue;
160  }
161 
162  // end tags
163  $this->handleListEndTags($tpl_tree, $cur_depth, $options['depth']);
164 
165  // start tags
166  $this->handleListStartTags($tpl_tree, $cur_depth, $options['depth']);
167 
168  $cur_depth = $options['depth'];
169 
170  if ($options['visible'] and $key != 0)
171  {
172  $this->formatObject($tpl_tree, $options['child'], $options, $options['obj_id']);
173  }
174  }
175 
176  $this->handleListEndTags($tpl_tree, $cur_depth, -1);
177 
178  $ilBench->stop('Explorer', 'getOutput');
179 
180  return $tpl_tree->get();
181  }
global $tpl
Definition: ilias.php:8
if(!is_array($argv)) $options
special template class to simplify handling of ITX/PEAR
global $ilBench
Definition: ilias.php:18
+ Here is the caller graph for this function:

◆ isClickable()

ilShopPublicSectionSelector::isClickable (   $a_type,
  $a_node_id 
)

Definition at line 100 of file class.ilShopPublicSectionSelector.php.

References $ilUser, and ilLMObject\_isPagePublic().

101  {
102  global $ilUser;
103 
104  if($a_type == 'st')
105  {
106  $a_node = $this->tree->fetchSuccessorNode($a_node_id, 'pg');
107  $a_node_id = $a_node['child'];
108  if ($a_node_id == 0)
109  {
110  return false;
111  }
112  }
113 
114  if($a_type == 'pg')
115  {
116  // check public area mode
117  include_once('./Modules/LearningModule/classes/class.ilLMObject.php');
118  if ($this->lm_obj->getPublicAccessMode() == 'selected'
119  && !ilLMObject::_isPagePublic($a_node_id))
120  {
121  return false;
122  }
123  }
124 
125  return true;
126  }
global $ilUser
Definition: imgupload.php:15
static _isPagePublic($a_node_id, $a_check_public_mode=false)
+ Here is the call graph for this function:

Field Documentation

◆ $ctrl

ilShopPublicSectionSelector::$ctrl

Definition at line 43 of file class.ilShopPublicSectionSelector.php.

◆ $output

ilShopPublicSectionSelector::$output

Definition at line 42 of file class.ilShopPublicSectionSelector.php.

◆ $ref_id

ilShopPublicSectionSelector::$ref_id

Definition at line 46 of file class.ilShopPublicSectionSelector.php.

◆ $root_id

ilShopPublicSectionSelector::$root_id

Definition at line 41 of file class.ilShopPublicSectionSelector.php.

◆ $selectable_type

ilShopPublicSectionSelector::$selectable_type

Definition at line 45 of file class.ilShopPublicSectionSelector.php.


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