ILIAS  trunk Revision v11.0_alpha-2662-g519ff7d528f
ILIAS\UI\Implementation\Render\ilResourceRegistry Class Reference

Plumbing for ILIAS, tries to guess. More...

+ Inheritance diagram for ILIAS\UI\Implementation\Render\ilResourceRegistry:
+ Collaboration diagram for ILIAS\UI\Implementation\Render\ilResourceRegistry:

Public Member Functions

 __construct (protected \ILIAS\UICore\GlobalTemplate $il_template,)
 
 register (string $name)
 Add a dependency. More...
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ILIAS\UI\Implementation\Render\ilResourceRegistry::__construct ( protected \ILIAS\UICore\GlobalTemplate  $il_template)

Definition at line 31 of file ilResourceRegistry.php.

33  {
34  }

Member Function Documentation

◆ register()

ILIAS\UI\Implementation\Render\ilResourceRegistry::register ( string  $name)

Add a dependency.

Implements ILIAS\UI\Implementation\Render\ResourceRegistry.

Definition at line 39 of file ilResourceRegistry.php.

39  : void
40  {
41  $path_parts = pathinfo($name);
42  switch ($path_parts["extension"]) {
43  case "js":
44  $this->il_template->addJavaScript($name, true, 1);
45  break;
46  case "css":
47  $this->il_template->addCss($name);
48  break;
49  case "less":
50  // Can be ignored, should be compiled into css
51  break;
52  default:
53  throw new InvalidArgumentException("Can't handle resource '$name'");
54  }
55  }

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