ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilObjectListGUIFactory.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 include_once './Services/Object/classes/class.ilObjectListGUI.php';
5 
15 {
16  public static function _getListGUIByType($a_type, $a_context = ilObjectListGUI::CONTEXT_REPOSITORY)
17  {
18  global $DIC;
19 
20  $objDefinition = $DIC["objDefinition"];
21 
22  $class = $objDefinition->getClassName($a_type);
23  $location = $objDefinition->getLocation($a_type);
24  $full_class = "ilObj" . $class . "ListGUI";
25  if (file_exists($location . "/class." . $full_class . ".php")) {
26  include_once($location . "/class." . $full_class . ".php");
27  return new $full_class($a_context);
28  }
29 
30  // php7-todo JL: throw exception instead?
31  return new ilObjectListGUI($a_context);
32  }
33 } // END class.ilObjectListGUIFactory
global $DIC
Definition: saml.php:7
$location
Definition: buildRTE.php:44
$a_type
Definition: workflow.php:92
Class ilObjectListGUI.
static _getListGUIByType($a_type, $a_context=ilObjectListGUI::CONTEXT_REPOSITORY)
Class ilObjectListGUIFactory.