211 if ($this->repo->isEmpty()) {
215 $all_matching_provider_object_ids = null;
217 foreach ($this->providers as
$provider) {
218 $id = get_class($provider);
219 $current = $this->repo->getValueForProvider(
$id);
221 $no_provider =
false;
223 $provider_object_ids = $provider->getFilteredObjects();
224 if (isset($all_matching_provider_object_ids)) {
225 $all_matching_provider_object_ids = array_intersect($all_matching_provider_object_ids, $provider_object_ids);
227 $all_matching_provider_object_ids = $provider_object_ids;
231 $has_content =
false;
234 $ltpl =
new ilTemplate(
"tpl.classification_object_list.html",
true,
true,
"Services/Classification");
236 if (isset($all_matching_provider_object_ids) &&
sizeof($all_matching_provider_object_ids)) {
238 "object_reference.ref_id" 239 ,
"object_data.obj_id" 242 ,
"object_data.description" 247 $this->parent_ref_id,
248 $all_matching_provider_object_ids,
252 if (
sizeof($matching)) {
253 $valid_objects = array();
256 include_once
"Services/Object/classes/class.ilObjectListGUIPreloader.php";
259 foreach ($matching as $item) {
260 if ($item[
"ref_id"] != $this->parent_ref_id &&
262 $ilAccess->checkAccess(
"visible",
"", $item[
"ref_id"])) {
268 if (in_array($p[
"type"], array(
"root",
"cat",
"crs",
"grp"))) {
269 $block_ref_id = $p[
"ref_id"];
270 $block_title = $p[
"title"];
273 if ($block_ref_id > 0) {
274 if (!isset($valid_objects[$block_ref_id])) {
275 $valid_objects[$block_ref_id] = array(
276 "title" => $block_title,
280 $valid_objects[$block_ref_id][
"items"][] = $item;
283 $preloader->addItem($item[
"obj_id"], $item[
"type"], $item[
"ref_id"]);
287 if (
sizeof($valid_objects)) {
290 $preloader->preload();
292 $this->item_list_gui = array();
293 foreach ($valid_objects as $block) {
295 foreach ($items as $obj) {
296 $type = $obj[
"type"];
299 if (empty($this->item_list_gui[
$type])) {
300 $class = $objDefinition->getClassName($type);
301 $location = $objDefinition->getLocation($type);
303 $full_class =
"ilObj" . $class .
"ListGUI";
305 include_once(
$location .
"/class." . $full_class .
".php");
306 $this->item_list_gui[
$type] =
new $full_class();
307 $this->item_list_gui[
$type]->enableDelete(
false);
308 $this->item_list_gui[
$type]->enablePath(
310 $this->parent_ref_id,
313 $this->item_list_gui[
$type]->enableLinkedPath(
true);
314 $this->item_list_gui[
$type]->enableCut(
false);
315 $this->item_list_gui[
$type]->enableCopy(
false);
316 $this->item_list_gui[
$type]->enableSubscribe(
false);
317 $this->item_list_gui[
$type]->enableLink(
false);
318 $this->item_list_gui[
$type]->enableIcon(
true);
321 foreach ($this->providers as $provider) {
322 $provider->initListGUI($this->item_list_gui[$type]);
326 $html = $this->item_list_gui[
$type]->getListItemHTML(
334 $ltpl->setCurrentBlock(
"res_row");
335 $ltpl->setVariable(
"RESOURCE_HTML", $html);
336 $ltpl->parseCurrentBlock();
339 $ltpl->setCurrentBlock(
"block");
340 $ltpl->setVariable(
"BLOCK_TITLE", $block[
"title"]);
341 $ltpl->parseCurrentBlock();
349 echo
"<span id='block_" . $this->
getBlockType() .
"_0_loader'></span>";
350 echo
"<script>il.Classification.returnToParent();</script>";
static getSystemMessageHTML(string $a_txt, string $a_type="info")
Get HTML for a system message.
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
$location
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
isDeleted(int $a_node_id)
This is a wrapper for isSaved() with a more useful name.
ilObjectDefinition $obj_definition
getPathFull(int $a_endnode_id, int $a_startnode_id=0)
get path from a given startnode to a given endnode if startnode is not given the rootnode is startnod...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilGlobalTemplateInterface $main_tpl
getSubTreeFilteredByObjIds(int $a_node_id, array $a_obj_ids, array $a_fields=[])
get all node ids in the subtree under specified node id, filter by object ids
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
initProviders(bool $a_check_post=false)
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
static sortArray(array $array, string $a_array_sortby_key, string $a_array_sortorder="asc", bool $a_numeric=false, bool $a_keep_keys=false)