ILIAS  release_8 Revision v8.23
class.ilLuceneSearchObjectListGUIFactory.php
Go to the documentation of this file.
1 <?php declare(strict_types=1);
2 
28 {
29  private static array $item_list_gui = [];
30 
31  public static function factory(string $a_type): ilObjectListGUI
32  {
34  global $DIC;
35 
36  $objDefinition = $DIC['objDefinition'];
37  $container_view_manager = $DIC
38  ->container()
39  ->internal()
40  ->domain()
41  ->content()
42  ->view();
43 
44 
45  if (isset(self::$item_list_gui[$a_type])) {
46  return self::$item_list_gui[$a_type];
47  }
48 
49 
50  $class = $objDefinition->getClassName($a_type);
51  $location = $objDefinition->getLocation($a_type);
52 
53  $full_class = "ilObj" . $class . "ListGUI";
54 
55  include_once($location . "/class." . $full_class . ".php");
56  $item_list_gui = new $full_class(ilObjectListGUI::CONTEXT_SEARCH);
57 
58  $item_list_gui->setDetailsLevel(ilObjectListGUI::DETAILS_SEARCH);
59  $item_list_gui->enableDelete(true);
60  $item_list_gui->enableCut(true);
61  $item_list_gui->enableSubscribe(true);
62  $item_list_gui->enableLink(true);
63  $item_list_gui->enablePath(false);
64  $item_list_gui->enableLinkedPath(true);
65  $item_list_gui->enableSearchFragments(true);
66  $item_list_gui->enableRelevance(false);
67  if ($container_view_manager->isAdminView()) {
68  $item_list_gui->enableCheckbox(false);
69  }
70 
71  return self::$item_list_gui[$a_type] = $item_list_gui;
72  }
73 }
$location
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: buildRTE.php:22
global $DIC
Definition: feed.php:28
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...