ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilNewsRendererFactory Class Reference

News renderer factory. More...

+ Collaboration diagram for ilNewsRendererFactory:

Static Public Member Functions

static getRenderer ($a_context_obj_type)
 Get renderer. More...
 

Static Protected Attributes

static $renderer = array()
 

Detailed Description

News renderer factory.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

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

Member Function Documentation

◆ getRenderer()

static ilNewsRendererFactory::getRenderer (   $a_context_obj_type)
static

Get renderer.

Parameters

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

References $DIC.

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

26  {
27  global $DIC;
28 
29  if (!isset(self::$renderer[$a_context_obj_type])) {
30  $obj_def = $DIC["objDefinition"];
31 
32  $comp = $obj_def->getComponentForType($a_context_obj_type);
33  $class = $obj_def->getClassName($a_context_obj_type);
34 
35  $class = "il" . $class . "NewsRendererGUI";
36  $type_renderer_path = "./" . $comp . "/classes/class." . $class . ".php";
37  if (is_file($type_renderer_path)) {
38  include_once($type_renderer_path);
39  $rend = new $class();
40  } else {
41  include_once("./Services/News/classes/class.ilNewsDefaultRendererGUI.php");
42  $rend = new ilNewsDefaultRendererGUI();
43  }
44  self::$renderer[$a_context_obj_type] = $rend;
45  }
46 
47  return self::$renderer[$a_context_obj_type];
48  }
global $DIC
Definition: saml.php:7
+ Here is the caller graph for this function:

Field Documentation

◆ $renderer

ilNewsRendererFactory::$renderer = array()
staticprotected

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


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