19declare(strict_types=1);
47 $this->obj_definition =
$DIC[
"objDefinition"];
48 $this->tree =
$DIC->repositoryTree();
49 $this->obj_data_cache =
$DIC[
"ilObjDataCache"];
50 $this->
user = $DIC->user();
51 $this->rbacsystem =
$DIC->rbac()->system();
56 public function addItem(
int $obj_id,
string $type, ?
int $ref_id =
null): void
58 $this->obj_ids[] = $obj_id;
59 $this->obj_ids_by_type[$type][] = $obj_id;
60 $this->types[] = $type;
64 $this->ref_ids_by_type[$type][] =
$ref_id;
70 if (!$this->obj_ids) {
74 $this->obj_ids = array_unique($this->obj_ids);
75 $this->types = array_unique($this->types);
77 $this->ref_ids = array_unique($this->ref_ids);
81 foreach ($this->types as $type) {
82 $this->obj_ids_by_type[$type] = array_unique($this->obj_ids_by_type[$type]);
84 if (isset($this->ref_ids_by_type[$type])) {
85 $this->ref_ids_by_type[$type] = array_unique($this->ref_ids_by_type[$type]);
93 $this->obj_ids_by_type[$type]
97 $class = $this->obj_definition->getClassName($type);
98 $location = $this->obj_definition->getLocation($type);
100 $full_class =
"ilObj" . $class .
"Access";
101 if (class_exists($full_class)) {
103 [$full_class,
"_preloadData"],
104 $this->obj_ids_by_type[$type] ?? [],
105 $this->ref_ids_by_type[$type] ?? []
111 if ($this->ref_ids) {
112 $this->tree->preloadDeleted($this->ref_ids);
113 $this->tree->preloadDepthParent($this->ref_ids);
114 $this->obj_data_cache->preloadReferenceCache($this->ref_ids,
false);
115 $this->rbacsystem->preloadRbacPaCache($this->ref_ids, $this->
user->getId());
119 $this->fav_manager->loadData($this->
user->getId(), $this->ref_ids);
static preloadByObjIds(array $a_obj_ids)
Preload list gui data.
static preloadPersistedConditionsForTargetRecords(string $a_type, array $a_obj_ids)
Manages favourites, currently the interface for other components, needs discussion.
static preloadListGUIData(array $a_obj_ids)
static preloadData(array $ref_ids)
Preload data to internal cache.
parses the objects.xml it handles the xml-description of all ilias objects
Preloader for object list GUIs.
ilObjectDefinition $obj_definition
addItem(int $obj_id, string $type, ?int $ref_id=null)
ilObjectDataCache $obj_data_cache
ilFavouritesManager $fav_manager
__construct(int $context)
const CONTEXT_PERSONAL_DESKTOP
static preloadCommonProperties(array $obj_ids, int $context)
static preloadListGUIData(array $a_obj_ids)
Preload rating data for list guis.
class ilRbacSystem system function like checkAccess, addActiveRole ... Supporting system functions ar...
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...