ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups 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.
 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

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.

{
global $ilCtrl;
$this->ctrl = $ilCtrl;
$this->gui_class = $a_gui_class;
parent::ilLMTOCExplorer($a_target, $a_lm_obj);
$this->setSessionExpandVariable('lmshoppublicselectorexpand');
$this->setExpandTarget($a_target);
$this->setExpand((int)$_GET['lmshoppublicselectorexpand'] ? (int)$_GET['lmshoppublicselectorexpand'] : $this->tree->readRootId());
}

Member Function Documentation

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

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

{
return '_top';
}
ilShopPublicSectionSelector::buildLinkTarget (   $a_node_id,
  $a_type 
)

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

{
if(!$this->offlineMode())
{
return parent::buildLinkTarget($a_node_id, $a_type);
}
else
{
if ($a_node_id < 1)
{
$a_node_id = $this->tree->getRootId();
}
if ($a_type != 'pg')
{
$a_node = $this->tree->fetchSuccessorNode($a_node_id, 'pg');
$a_node_id = $a_node['child'];
}
if (!$this->lm_obj->cleanFrames())
{
return 'frame_'.$a_node_id.'_maincontent.html';
}
else
{
return 'lm_pg_'.$a_node_id.'.html';
}
}
}
ilShopPublicSectionSelector::getOutput ( )

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

References $ilBench, $options, and $tpl.

Referenced by ilShopPurchaseGUI\showDemoVersion().

{
global $ilBench, $tpl;
$ilBench->start('Explorer', 'getOutput');
$this->format_options[0]['tab'] = array();
$depth = $this->tree->getMaximumDepth();
for ($i=0;$i<$depth;++$i)
{
$this->createLines($i);
}
// set global body class
$tpl->setBodyClass("il_Explorer");
$tpl_tree = new ilTemplate('tpl.tree_form.html', true, true, 'Modules/LearningModule');
$cur_depth = -1;
foreach ($this->format_options as $key => $options)
{
//echo '-'.$options['depth'].'-';
if (!$options['visible'])
{
continue;
}
if ($key == 0)
{
continue;
}
// end tags
$this->handleListEndTags($tpl_tree, $cur_depth, $options['depth']);
// start tags
$this->handleListStartTags($tpl_tree, $cur_depth, $options['depth']);
$cur_depth = $options['depth'];
if ($options['visible'] and $key != 0)
{
$this->formatObject($tpl_tree, $options['child'], $options, $options['obj_id']);
}
}
$this->handleListEndTags($tpl_tree, $cur_depth, -1);
$ilBench->stop('Explorer', 'getOutput');
return $tpl_tree->get();
}

+ Here is the caller graph for this function:

ilShopPublicSectionSelector::isClickable (   $a_type,
  $a_node_id 
)

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

References $ilUser, and ilLMObject\_isPagePublic().

{
global $ilUser;
if($a_type == 'st')
{
$a_node = $this->tree->fetchSuccessorNode($a_node_id, 'pg');
$a_node_id = $a_node['child'];
if ($a_node_id == 0)
{
return false;
}
}
if($a_type == 'pg')
{
// check public area mode
include_once('./Modules/LearningModule/classes/class.ilLMObject.php');
if ($this->lm_obj->getPublicAccessMode() == 'selected'
&& !ilLMObject::_isPagePublic($a_node_id))
{
return false;
}
}
return true;
}

+ Here is the call graph for this function:

Field Documentation

ilShopPublicSectionSelector::$ctrl

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

ilShopPublicSectionSelector::$output

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

ilShopPublicSectionSelector::$ref_id

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

ilShopPublicSectionSelector::$root_id

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

ilShopPublicSectionSelector::$selectable_type

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


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