ILIAS  trunk Revision v11.0_alpha-1866-gfa368f7776e
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilNewsRendererFactory Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Collaboration diagram for ilNewsRendererFactory:

Static Public Member Functions

static getRenderer (string $a_context_obj_type)
 

Static Protected Attributes

static array $renderer = []
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning News renderer factory

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

Definition at line 23 of file class.ilNewsRendererFactory.php.

Member Function Documentation

◆ getRenderer()

static ilNewsRendererFactory::getRenderer ( string  $a_context_obj_type)
static

Definition at line 28 of file class.ilNewsRendererFactory.php.

References $DIC, and $renderer.

Referenced by ilNewsTimelineItemGUI\render(), and ilNewsForContextBlockGUI\showNews().

29  {
30  global $DIC;
31 
32  if (!isset(self::$renderer[$a_context_obj_type])) {
33  $obj_def = $DIC["objDefinition"];
34 
35  $comp = $obj_def->getComponentForType($a_context_obj_type);
36  $class = $obj_def->getClassName($a_context_obj_type);
37 
38  $class = "il" . $class . "NewsRendererGUI";
39  $type_renderer_path = "./" . $comp . "/classes/class." . $class . ".php";
40  if (is_file($type_renderer_path)) {
41  $rend = new $class();
42  } else {
43  $rend = new ilNewsDefaultRendererGUI();
44  }
45  self::$renderer[$a_context_obj_type] = $rend;
46  }
47 
48  return self::$renderer[$a_context_obj_type];
49  }
$renderer
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: shib_login.php:22
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the caller graph for this function:

Field Documentation

◆ $renderer

array ilNewsRendererFactory::$renderer = []
staticprotected

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


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