ILIAS  trunk Revision v11.0_alpha-1871-gde1fee8db3d
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilSkinFactory Class Reference

Factory to create Skin classes holds an manages the basic data of a skin as provide by the template of the skin. More...

+ Collaboration diagram for ilSkinFactory:

Public Member Functions

 __construct (Language $lng, ?ilSystemStyleConfig $config=null)
 
 skinStyleContainerFromId (string $skin_id, ilSystemStyleMessageStack $message_stack)
 Get container class is responsible for all file system related actions related actions of a skin such as copying files and folders, generating a new skin, deleting a skin etc. More...
 

Protected Attributes

ilSystemStyleConfig $config
 
Language $lng
 

Detailed Description

Factory to create Skin classes holds an manages the basic data of a skin as provide by the template of the skin.

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

Constructor & Destructor Documentation

◆ __construct()

ilSkinFactory::__construct ( Language  $lng,
?ilSystemStyleConfig  $config = null 
)

Definition at line 30 of file class.ilSkinFactory.php.

References $config, $id, $lng, $path, ilSystemStyleException\FILE_OPENING_FAILED, ILIAS\Repository\lng(), ilSystemStyleException\NO_PARENT_STYLE, null, ilSkinStyle\parseFromXMLElement(), and ilSkin\setVersion().

31  {
32  $this->lng = $lng;
33 
34  if ($config) {
35  $this->config = $config;
36  } else {
37  $this->config = new ilSystemStyleConfig();
38  }
39  }
ilSystemStyleConfig $config
ilSystemStyleConfig wraps all 'constants' to ensure the testability of all classes using those 'const...
+ Here is the call graph for this function:

Member Function Documentation

◆ skinStyleContainerFromId()

ilSkinFactory::skinStyleContainerFromId ( string  $skin_id,
ilSystemStyleMessageStack  $message_stack 
)

Get container class is responsible for all file system related actions related actions of a skin such as copying files and folders, generating a new skin, deleting a skin etc.

Exceptions
ilSystemStyleException

Definition at line 90 of file class.ilSkinFactory.php.

References ILIAS\Repository\lng(), and ilSystemStyleException\NO_SKIN_ID.

Referenced by ilSystemStyleOverviewGUI\__construct().

94  if (!$skin_id) {
96  }
97 
98  if ($skin_id != 'default' && $skin_id != 'other') {
99  return new ilSkinStyleContainer(
100  $this->lng,
101  $this->skinFromXML($this->config->getCustomizingSkinPath() . $skin_id . '/template.xml'),
102  $message_stack,
103  $this->config
104  );
105  } else {
106  return new ilSkinStyleContainer(
107  $this->lng,
108  $this->skinFromXML($this->config->getDefaultTemplatePath()),
109  $message_stack,
110  $this->config,
111  );
112  }
113  }
This class is responsible for all file system related actions related actions of a skin such as copyi...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $config

ilSystemStyleConfig ilSkinFactory::$config
protected

Definition at line 27 of file class.ilSkinFactory.php.

Referenced by __construct().

◆ $lng

Language ilSkinFactory::$lng
protected

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

Referenced by __construct().


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