ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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.

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 }
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
global $DIC
Definition: shib_login.php:26

References $DIC, ILIAS\COPage\ResourcesCollector\$output_mode, and ILIAS\COPage\init().

+ Here is the call graph for this function:

Member Function Documentation

◆ getCssFiles()

ILIAS\COPage\ResourcesCollector::getCssFiles ( )

Definition at line 113 of file ResourcesCollector.php.

113 : array
114 {
115 return $this->css_files;
116 }

References ILIAS\COPage\ResourcesCollector\$css_files.

◆ getJavascriptFiles()

ILIAS\COPage\ResourcesCollector::getJavascriptFiles ( )

Definition at line 108 of file ResourcesCollector.php.

108 : array
109 {
110 return $this->js_files;
111 }

References ILIAS\COPage\ResourcesCollector\$js_files.

◆ getOnloadCode()

ILIAS\COPage\ResourcesCollector::getOnloadCode ( )

Definition at line 118 of file ResourcesCollector.php.

118 : array
119 {
120 return $this->onload_code;
121 }

References ILIAS\COPage\ResourcesCollector\$onload_code.

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: