ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilObjectListGUIPreloader Class Reference

Preloader for object list GUIs. More...

+ Collaboration diagram for ilObjectListGUIPreloader:

Public Member Functions

 __construct ($a_context)
 addItem ($a_obj_id, $a_type, $a_ref_id=null)
 preload ()

Protected Attributes

 $context
 $obj_ids
 $obj_ids_by_type
 $ref_ids
 $ref_ids_by_type
 $types

Detailed Description

Preloader for object list GUIs.

Author
Jörg Lützenkirchen luetz.nosp@m.enki.nosp@m.rchen.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
Id:
class.ilObject.php 46291 2013-11-19 15:09:45Z jluetzen

Definition at line 12 of file class.ilObjectListGUIPreloader.php.

Constructor & Destructor Documentation

ilObjectListGUIPreloader::__construct (   $a_context)

Definition at line 21 of file class.ilObjectListGUIPreloader.php.

{
$this->context = $a_context;
}

Member Function Documentation

ilObjectListGUIPreloader::addItem (   $a_obj_id,
  $a_type,
  $a_ref_id = null 
)

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

{
$this->obj_ids[] = $a_obj_id;
$this->obj_ids_by_type[$a_type][] = $a_obj_id;
$this->types[] = $a_type;
if($a_ref_id)
{
$this->ref_ids[] = $a_ref_id;
$this->ref_ids_by_type[$a_type][] = $a_ref_id;
}
}
ilObjectListGUIPreloader::preload ( )

Definition at line 39 of file class.ilObjectListGUIPreloader.php.

References $ilUser, $location, $ref_ids, ilObjectListGUI\CONTEXT_PERSONAL_DESKTOP, ilObjectListGUI\CONTEXT_REPOSITORY, ilObjectListGUI\CONTEXT_SEARCH, ilAdvancedMDValues\preloadByObjIds(), ilObjectListGUI\preloadCommonProperties(), ilConditionHandler\preloadConditionsForTargetRecords(), ilObjectActivation\preloadData(), ilObjUser\preloadIsDesktopItem(), ilRating\preloadListGUIData(), and ilLPStatus\preloadListGUIData().

{
global $objDefinition, $tree, $ilObjDataCache, $ilUser, $rbacsystem;
if(!$this->obj_ids)
{
return;
}
$this->obj_ids = array_unique($this->obj_ids);
$this->types = array_unique($this->types);
if($this->ref_ids)
{
$this->ref_ids = array_unique($this->ref_ids);
}
// type specific preloads
include_once("./Services/AccessControl/classes/class.ilConditionHandler.php");
foreach ($this->types as $type)
{
$this->obj_ids_by_type[$type] = array_unique($this->obj_ids_by_type[$type]);
if(is_array($this->ref_ids_by_type[$type]))
{
$this->ref_ids_by_type[$type] = array_unique($this->ref_ids_by_type[$type]);
}
if($this->context == ilObjectListGUI::CONTEXT_REPOSITORY ||
{
$this->obj_ids_by_type[$type]);
}
$class = $objDefinition->getClassName($type);
$location = $objDefinition->getLocation($type);
if($class && $location) // #12775
{
$full_class = "ilObj".$class."Access";
include_once($location."/class.".$full_class.".php");
if(class_exists($full_class))
{
call_user_func(array($full_class, "_preloadData"),
$this->obj_ids_by_type[$type], $this->ref_ids_by_type[$type]);
}
}
}
if($this->ref_ids)
{
$tree->preloadDeleted($this->ref_ids);
$tree->preloadDepthParent($this->ref_ids);
$ilObjDataCache->preloadReferenceCache($this->ref_ids, false);
$rbacsystem->preloadRbacPaCache($this->ref_ids, $ilUser->getId());
if($ilUser->getId != ANONYMOUS_USER_ID &&
{
}
include_once("./Services/Object/classes/class.ilObjectActivation.php");
}
include_once("./Services/Object/classes/class.ilObjectListGUI.php");
ilObjectListGUI::preloadCommonProperties($this->obj_ids, $this->context);
{
include_once("./Services/Rating/classes/class.ilRating.php");
include_once("./Services/Rating/classes/class.ilRatingGUI.php");
ilRating::preloadListGUIData($this->obj_ids);
include_once("./Services/AdvancedMetaData/classes/class.ilAdvancedMDValues.php");
}
if($this->context == ilObjectListGUI::CONTEXT_REPOSITORY ||
{
include_once("./Services/Tracking/classes/class.ilLPStatus.php");
}
}

+ Here is the call graph for this function:

Field Documentation

ilObjectListGUIPreloader::$context
protected

Definition at line 14 of file class.ilObjectListGUIPreloader.php.

ilObjectListGUIPreloader::$obj_ids
protected

Definition at line 15 of file class.ilObjectListGUIPreloader.php.

ilObjectListGUIPreloader::$obj_ids_by_type
protected

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

ilObjectListGUIPreloader::$ref_ids
protected

Definition at line 17 of file class.ilObjectListGUIPreloader.php.

Referenced by preload().

ilObjectListGUIPreloader::$ref_ids_by_type
protected

Definition at line 18 of file class.ilObjectListGUIPreloader.php.

ilObjectListGUIPreloader::$types
protected

Definition at line 19 of file class.ilObjectListGUIPreloader.php.


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