ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
ILIAS\COPage\ResourcesCollector Class Reference

Collects all js/css/onload resources necessary for page rendering. More...

+ Collaboration diagram for ILIAS\COPage\ResourcesCollector:

Public Member Functions

 __construct (string $output_mode, ?\ilPageObject $pg=null)
 Constructor, currently has a dependency to ilPageObject due to historic reasons, this should be removed in the future. More...
 
 getJavascriptFiles ()
 
 getCssFiles ()
 
 getOnloadCode ()
 

Protected Attributes

 $pc_definition
 
string $output_mode = ""
 
array $js_files = []
 
array $css_files = []
 
array $onload_code = []
 

Detailed Description

Collects all js/css/onload resources necessary for page rendering.

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

Definition at line 26 of file ResourcesCollector.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\COPage\ResourcesCollector::__construct ( string  $output_mode,
?\ilPageObject  $pg = null 
)

Constructor, currently has a dependency to ilPageObject due to historic reasons, this should be removed in the future.

Definition at line 39 of file ResourcesCollector.php.

References $DIC, ILIAS\COPage\ResourcesCollector\$output_mode, ilPageObject\buildDom(), iljQueryUtil\getLocaljQueryPath(), iljQueryUtil\getLocaljQueryUIPath(), ILIAS\COPage\init(), and ilPageObjectGUI\OFFLINE.

42  {
43  global $DIC;
44 
45  // workaround (note that pcquestion currently checks for page config, if self assessment is enabled
46  if (is_null($pg)) {
47  $pg = new \ilLMPage();
48  }
49  if($pg->getXMLContent() === "") {
50  $pg->setXMLContent("<PageObject></PageObject>");
51  }
52  $this->output_mode = $output_mode;
53  $this->pc_definition = $DIC
54  ->copage()
55  ->internal()
56  ->domain()
57  ->pc()
58  ->definition();
59  $this->init($pg);
60  }
global $DIC
Definition: shib_login.php:26
init(array|\ArrayAccess &$define, array|\ArrayAccess &$implement, array|\ArrayAccess &$use, array|\ArrayAccess &$contribute, array|\ArrayAccess &$seek, array|\ArrayAccess &$provide, array|\ArrayAccess &$pull, array|\ArrayAccess &$internal,)
Definition: COPage.php:25
+ Here is the call graph for this function:

Member Function Documentation

◆ getCssFiles()

ILIAS\COPage\ResourcesCollector::getCssFiles ( )

Definition at line 111 of file ResourcesCollector.php.

References ILIAS\COPage\ResourcesCollector\$css_files.

111  : array
112  {
113  return $this->css_files;
114  }

◆ getJavascriptFiles()

ILIAS\COPage\ResourcesCollector::getJavascriptFiles ( )

Definition at line 106 of file ResourcesCollector.php.

References ILIAS\COPage\ResourcesCollector\$js_files.

106  : array
107  {
108  return $this->js_files;
109  }

◆ getOnloadCode()

ILIAS\COPage\ResourcesCollector::getOnloadCode ( )

Definition at line 116 of file ResourcesCollector.php.

References ILIAS\COPage\ResourcesCollector\$onload_code.

116  : array
117  {
118  return $this->onload_code;
119  }

Field Documentation

◆ $css_files

array ILIAS\COPage\ResourcesCollector::$css_files = []
protected

Definition at line 31 of file ResourcesCollector.php.

Referenced by ILIAS\COPage\ResourcesCollector\getCssFiles().

◆ $js_files

array ILIAS\COPage\ResourcesCollector::$js_files = []
protected

◆ $onload_code

array ILIAS\COPage\ResourcesCollector::$onload_code = []
protected

◆ $output_mode

string ILIAS\COPage\ResourcesCollector::$output_mode = ""
protected

Definition at line 29 of file ResourcesCollector.php.

Referenced by ILIAS\COPage\ResourcesCollector\__construct().

◆ $pc_definition

ILIAS\COPage\ResourcesCollector::$pc_definition
protected

Definition at line 28 of file ResourcesCollector.php.


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