ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
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.

References getId(), setCssFile(), setFontDirectory(), setId(), setImageDirectory(), setName(), setSoundDirectory(), and setSubstyleOf().

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 $sound_directory
Directory to store sound files into.
setSoundDirectory(string $sound_directory)
string $id
Id of the skin.
setFontDirectory(string $font_directory)
string $image_directory
Directory to store image files into.
string $name
Name of the style visible in all UI elements.
string $css_file
Css file name of the skin.
setName(string $name)
setSubstyleOf(string $substyle_of)
Sets style as sub style of another.
setImageDirectory(string $image_directory)
string $font_directory
Directory to store fonts into.
setId(string $id)
setCssFile(string $css_file)
+ Here is the call graph for this function:

Member Function Documentation

◆ getCssFile()

ilSkinStyle::getCssFile ( )

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

References $css_file.

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

154  : string
155  {
156  return $this->css_file;
157  }
string $css_file
Css file name of the skin.
+ Here is the caller graph for this function:

◆ getFontDirectory()

ilSkinStyle::getFontDirectory ( )

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

References $font_directory.

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

164  : string
165  {
166  return $this->font_directory;
167  }
string $font_directory
Directory to store fonts into.
+ Here is the caller graph for this function:

◆ getId()

◆ getImageDirectory()

ilSkinStyle::getImageDirectory ( )

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

References $image_directory.

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

144  : string
145  {
146  return $this->image_directory;
147  }
string $image_directory
Directory to store image files into.
+ Here is the caller graph for this function:

◆ getName()

ilSkinStyle::getName ( )

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

References $name.

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

124  : string
125  {
126  return $this->name;
127  }
string $name
Name of the style visible in all UI elements.
+ Here is the caller graph for this function:

◆ getSoundDirectory()

ilSkinStyle::getSoundDirectory ( )

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

References $sound_directory.

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

134  : string
135  {
136  return $this->sound_directory;
137  }
string $sound_directory
Directory to store sound files into.
+ 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.

References $substyle_of.

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

177  : string
178  {
179  return $this->substyle_of;
180  }
string $substyle_of
Parent of the skin if set.
+ 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.

References getSubstyleOf().

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

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

Referenced by ilSkinFactory\__construct().

96  : ilSkinStyle
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  }
+ Here is the caller graph for this function:

◆ 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.

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

201  : bool
202  {
203  return $this->getCssFile() == $resource
204  || $this->getImageDirectory() == $resource
205  || $this->getFontDirectory() == $resource
206  || $this->getSoundDirectory() == $resource;
207  }
+ Here is the call graph for this function:

◆ setCssFile()

ilSkinStyle::setCssFile ( string  $css_file)

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

References $css_file.

Referenced by __construct().

159  : void
160  {
161  $this->css_file = $css_file;
162  }
string $css_file
Css file name of the skin.
+ Here is the caller graph for this function:

◆ setFontDirectory()

ilSkinStyle::setFontDirectory ( string  $font_directory)

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

References $font_directory.

Referenced by __construct().

169  : void
170  {
171  $this->font_directory = $font_directory;
172  }
string $font_directory
Directory to store fonts into.
+ Here is the caller graph for this function:

◆ setId()

ilSkinStyle::setId ( string  $id)
Exceptions
ilSystemStyleException

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

References ilSystemStyleException\INVALID_CHARACTERS_IN_ID.

Referenced by __construct().

116  : void
117  {
118  if (strpos($id, ' ') !== false) {
120  }
121  $this->id = str_replace(' ', '_', $id);
122  }
string $id
Id of the skin.
+ Here is the caller graph for this function:

◆ setImageDirectory()

ilSkinStyle::setImageDirectory ( string  $image_directory)

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

References $image_directory.

Referenced by __construct().

149  : void
150  {
151  $this->image_directory = $image_directory;
152  }
string $image_directory
Directory to store image files into.
+ Here is the caller graph for this function:

◆ setName()

ilSkinStyle::setName ( string  $name)

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

References $name.

Referenced by __construct().

129  : void
130  {
131  $this->name = $name;
132  }
string $name
Name of the style visible in all UI elements.
+ Here is the caller graph for this function:

◆ setSoundDirectory()

ilSkinStyle::setSoundDirectory ( string  $sound_directory)

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

References $sound_directory.

Referenced by __construct().

139  : void
140  {
141  $this->sound_directory = $sound_directory;
142  }
string $sound_directory
Directory to store sound files into.
+ 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.

References $substyle_of.

Referenced by __construct().

185  : void
186  {
187  $this->substyle_of = $substyle_of;
188  }
string $substyle_of
Parent of the skin if set.
+ 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 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 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().

◆ $image_directory

string ilSkinStyle::$image_directory = ''
protected

Directory to store image files into.

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

Referenced by 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 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: