ILIAS  release_8 Revision v8.24
ilSkinStyle Class Reference
+ Collaboration diagram for ilSkinStyle:

Public Member Functions

 __construct (string $id, string $name, string $css_file='', string $image_directory='', string $font_directory='', string $sound_directory='', string $parent_style='')
 
 getId ()
 
 setId (string $id)
 
 getName ()
 
 setName (string $name)
 
 getSoundDirectory ()
 
 setSoundDirectory (string $sound_directory)
 
 getImageDirectory ()
 
 setImageDirectory (string $image_directory)
 
 getCssFile ()
 
 setCssFile (string $css_file)
 
 getFontDirectory ()
 
 setFontDirectory (string $font_directory)
 
 getSubstyleOf ()
 Returns the parent style of this style if set. More...
 
 setSubstyleOf (string $substyle_of)
 Sets style as sub style of another. More...
 
 isSubstyle ()
 Return wheter this style is a substyle of another. More...
 
 referencesResource (string $resource)
 Checks if a resource (folder) relative to the style is referenced by this style. More...
 

Static Public Member Functions

static parseFromXMLElement (SimpleXMLElement $xml_element)
 

Protected Attributes

string $id = ''
 Id of the skin. More...
 
string $name = ''
 Name of the style visible in all UI elements. More...
 
string $sound_directory = ''
 Directory to store sound files into. More...
 
string $image_directory = ''
 Directory to store image files into. More...
 
string $font_directory = ''
 Directory to store fonts into. More...
 
string $css_file = ''
 Css file name of the skin. More...
 
string $substyle_of = ''
 Parent of the skin if set. More...
 

Detailed Description

Definition at line 21 of file class.ilSkinStyle.php.

Constructor & Destructor Documentation

◆ __construct()

ilSkinStyle::__construct ( string  $id,
string  $name,
string  $css_file = '',
string  $image_directory = '',
string  $font_directory = '',
string  $sound_directory = '',
string  $parent_style = '' 
)

Definition at line 58 of file class.ilSkinStyle.php.

66 {
67 $this->setId($id);
68 $this->setName($name);
69
70 if ($css_file == '') {
71 $css_file = $this->getId();
72 }
73
74 if ($image_directory == '') {
75 $image_directory = 'images';
76 }
77
78 if ($font_directory == '') {
79 $font_directory = 'fonts';
80 }
81
82 if ($sound_directory == '') {
83 $sound_directory = 'sound';
84 }
85
86 $this->setCssFile($css_file);
90 $this->setSubstyleOf($parent_style);
91 }
string $css_file
Css file name of the skin.
setFontDirectory(string $font_directory)
string $name
Name of the style visible in all UI elements.
setCssFile(string $css_file)
setId(string $id)
string $id
Id of the skin.
string $font_directory
Directory to store fonts into.
string $sound_directory
Directory to store sound files into.
setSoundDirectory(string $sound_directory)
string $image_directory
Directory to store image files into.
setImageDirectory(string $image_directory)
setSubstyleOf(string $substyle_of)
Sets style as sub style of another.
setName(string $name)

References $css_file, $font_directory, $image_directory, $sound_directory, getId(), setCssFile(), setFontDirectory(), setId(), setImageDirectory(), setName(), setSoundDirectory(), and setSubstyleOf().

+ Here is the call graph for this function:

Member Function Documentation

◆ getCssFile()

ilSkinStyle::getCssFile ( )

Definition at line 154 of file class.ilSkinStyle.php.

154 : string
155 {
156 return $this->css_file;
157 }

References $css_file.

Referenced by ilSkin\addChildToXML(), referencesResource(), and ilSkinStyleContainer\updateStyle().

+ Here is the caller graph for this function:

◆ getFontDirectory()

ilSkinStyle::getFontDirectory ( )

Definition at line 164 of file class.ilSkinStyle.php.

164 : string
165 {
167 }

References $font_directory.

Referenced by ilSkin\addChildToXML(), ilSkinStyleContainer\deleteStyle(), referencesResource(), and ilSkinStyleContainer\updateStyle().

+ Here is the caller graph for this function:

◆ getId()

◆ getImageDirectory()

ilSkinStyle::getImageDirectory ( )

Definition at line 144 of file class.ilSkinStyle.php.

144 : string
145 {
147 }

References $image_directory.

Referenced by ilSkin\addChildToXML(), ilSkinStyleContainer\deleteStyle(), referencesResource(), ilSkinStyleContainer\resetImages(), and ilSkinStyleContainer\updateStyle().

+ Here is the caller graph for this function:

◆ getName()

ilSkinStyle::getName ( )

Definition at line 124 of file class.ilSkinStyle.php.

124 : string
125 {
126 return $this->name;
127 }

References $name.

Referenced by ilSkin\addChildToXML(), ilSystemStyleDeleteGUI\addStyle(), and ilSkinStyleContainer\deleteStyle().

+ Here is the caller graph for this function:

◆ getSoundDirectory()

ilSkinStyle::getSoundDirectory ( )

Definition at line 134 of file class.ilSkinStyle.php.

134 : string
135 {
137 }

References $sound_directory.

Referenced by ilSkin\addChildToXML(), ilSkinStyleContainer\deleteStyle(), referencesResource(), and ilSkinStyleContainer\updateStyle().

+ Here is the caller graph for this function:

◆ getSubstyleOf()

ilSkinStyle::getSubstyleOf ( )

Returns the parent style of this style if set.

Definition at line 177 of file class.ilSkinStyle.php.

177 : string
178 {
179 return $this->substyle_of;
180 }
string $substyle_of
Parent of the skin if set.

References $substyle_of.

Referenced by ilSubStyleAssignmentGUI\assignStyle(), ilSubStyleAssignmentGUI\deleteAssignments(), ilSkinStyleContainer\deleteStyle(), isSubstyle(), and ilSubStyleAssignmentGUI\saveAssignment().

+ Here is the caller graph for this function:

◆ isSubstyle()

ilSkinStyle::isSubstyle ( )

Return wheter this style is a substyle of another.

Definition at line 193 of file class.ilSkinStyle.php.

193 : bool
194 {
195 return $this->getSubstyleOf() != '';
196 }
getSubstyleOf()
Returns the parent style of this style if set.

References getSubstyleOf().

Referenced by ilSkin\addChildToXML(), and ilSkinStyleContainer\deleteStyle().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ parseFromXMLElement()

static ilSkinStyle::parseFromXMLElement ( SimpleXMLElement  $xml_element)
static
Exceptions
ilSystemStyleException

Definition at line 96 of file class.ilSkinStyle.php.

97 {
98 return new self(
99 (string) $xml_element->attributes()['id'],
100 (string) $xml_element->attributes()['name'],
101 (string) $xml_element->attributes()['css_file'],
102 (string) $xml_element->attributes()['image_directory'],
103 (string) $xml_element->attributes()['font_directory'],
104 (string) $xml_element->attributes()['sound_directory']
105 );
106 }

◆ referencesResource()

ilSkinStyle::referencesResource ( string  $resource)

Checks if a resource (folder) relative to the style is referenced by this style.

Used to decide if folder can be deleted.

Definition at line 201 of file class.ilSkinStyle.php.

201 : bool
202 {
203 return $this->getCssFile() == $resource
204 || $this->getImageDirectory() == $resource
205 || $this->getFontDirectory() == $resource
206 || $this->getSoundDirectory() == $resource;
207 }

References getCssFile(), getFontDirectory(), getImageDirectory(), and getSoundDirectory().

+ Here is the call graph for this function:

◆ setCssFile()

ilSkinStyle::setCssFile ( string  $css_file)

Definition at line 159 of file class.ilSkinStyle.php.

159 : void
160 {
161 $this->css_file = $css_file;
162 }

References $css_file.

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setFontDirectory()

ilSkinStyle::setFontDirectory ( string  $font_directory)

Definition at line 169 of file class.ilSkinStyle.php.

169 : void
170 {
171 $this->font_directory = $font_directory;
172 }

References $font_directory.

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setId()

ilSkinStyle::setId ( string  $id)
Exceptions
ilSystemStyleException

Definition at line 116 of file class.ilSkinStyle.php.

116 : void
117 {
118 if (strpos($id, ' ') !== false) {
120 }
121 $this->id = str_replace(' ', '_', $id);
122 }
Class for advanced editing exception handling in ILIAS.

References $id, and ilSystemStyleException\INVALID_CHARACTERS_IN_ID.

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setImageDirectory()

ilSkinStyle::setImageDirectory ( string  $image_directory)

Definition at line 149 of file class.ilSkinStyle.php.

149 : void
150 {
151 $this->image_directory = $image_directory;
152 }

References $image_directory.

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setName()

ilSkinStyle::setName ( string  $name)

Definition at line 129 of file class.ilSkinStyle.php.

129 : void
130 {
131 $this->name = $name;
132 }

References $name.

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setSoundDirectory()

ilSkinStyle::setSoundDirectory ( string  $sound_directory)

Definition at line 139 of file class.ilSkinStyle.php.

139 : void
140 {
141 $this->sound_directory = $sound_directory;
142 }

References $sound_directory.

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setSubstyleOf()

ilSkinStyle::setSubstyleOf ( string  $substyle_of)

Sets style as sub style of another.

Definition at line 185 of file class.ilSkinStyle.php.

185 : void
186 {
187 $this->substyle_of = $substyle_of;
188 }

References $substyle_of.

Referenced by __construct().

+ Here is the caller graph for this function:

Field Documentation

◆ $css_file

string ilSkinStyle::$css_file = ''
protected

Css file name of the skin.

Definition at line 51 of file class.ilSkinStyle.php.

Referenced by __construct(), getCssFile(), and setCssFile().

◆ $font_directory

string ilSkinStyle::$font_directory = ''
protected

Directory to store fonts into.

Definition at line 46 of file class.ilSkinStyle.php.

Referenced by __construct(), getFontDirectory(), and setFontDirectory().

◆ $id

string ilSkinStyle::$id = ''
protected

Id of the skin.

Currently css and less files are named accordingely

Definition at line 26 of file class.ilSkinStyle.php.

Referenced by getId(), and setId().

◆ $image_directory

string ilSkinStyle::$image_directory = ''
protected

Directory to store image files into.

Definition at line 41 of file class.ilSkinStyle.php.

Referenced by __construct(), getImageDirectory(), and setImageDirectory().

◆ $name

string ilSkinStyle::$name = ''
protected

Name of the style visible in all UI elements.

Definition at line 31 of file class.ilSkinStyle.php.

Referenced by getName(), and setName().

◆ $sound_directory

string ilSkinStyle::$sound_directory = ''
protected

Directory to store sound files into.

Definition at line 36 of file class.ilSkinStyle.php.

Referenced by __construct(), getSoundDirectory(), and setSoundDirectory().

◆ $substyle_of

string ilSkinStyle::$substyle_of = ''
protected

Parent of the skin if set.

Definition at line 56 of file class.ilSkinStyle.php.

Referenced by getSubstyleOf(), and setSubstyleOf().


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