ILIAS  trunk Revision v11.0_alpha-1749-g1a06bdef097
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator 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...
 

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_name = ''
 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 $sound_directory = ''
 Directory to store sound 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 63 of file class.ilSkinStyle.php.

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

71  {
72  $this->setId($id);
73  $this->setName($name);
74 
75  if ($css_file == '') {
76  $css_file = $this->getId();
77  }
78 
79  if ($image_directory == '') {
80  $image_directory = 'images';
81  }
82 
83  if ($font_directory == '') {
84  $font_directory = 'fonts';
85  }
86 
87  if ($sound_directory == '') {
88  $sound_directory = 'sound';
89  }
90 
91  $this->setCssFile($css_file);
95  $this->setSubstyleOf($parent_style);
96  }
string $sound_directory
Directory to store sound 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 159 of file class.ilSkinStyle.php.

References $css_file.

Referenced by ilSkin\addChildToXML().

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

◆ getFontDirectory()

ilSkinStyle::getFontDirectory ( )

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

References $font_directory.

Referenced by ilSkin\addChildToXML().

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

◆ getId()

ilSkinStyle::getId ( )

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

References $id.

Referenced by __construct(), ilSkin\addChildToXML(), ilSubStyleAssignmentGUI\assignStyle(), ilSubStyleAssignmentGUI\deleteAssignments(), ilSubStyleAssignmentGUI\saveAssignment(), ilSkinTest\testGetAllSubStyles(), and ilSkinTest\testUpdateParentOfStyle().

113  : string
114  {
115  return $this->id;
116  }
string $id
Id of the skin.
+ Here is the caller graph for this function:

◆ getImageDirectory()

ilSkinStyle::getImageDirectory ( )

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

References $image_directory.

Referenced by ilSkin\addChildToXML().

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

◆ getName()

ilSkinStyle::getName ( )

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

References $name.

Referenced by ilSkin\addChildToXML().

129  : string
130  {
131  return $this->name;
132  }
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 139 of file class.ilSkinStyle.php.

References $sound_directory.

Referenced by ilSkin\addChildToXML().

139  : string
140  {
141  return $this->sound_directory;
142  }
string $sound_directory
Directory to store sound into.
+ Here is the caller graph for this function:

◆ getSubstyleOf()

ilSkinStyle::getSubstyleOf ( )

Returns the parent style of this style if set.

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

References $substyle_of.

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

182  : string
183  {
184  return $this->substyle_of;
185  }
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 198 of file class.ilSkinStyle.php.

References getSubstyleOf().

Referenced by ilSkin\addChildToXML().

198  : bool
199  {
200  return $this->getSubstyleOf() != '';
201  }
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 101 of file class.ilSkinStyle.php.

Referenced by ilSkinFactory\__construct().

101  : ilSkinStyle
102  {
103  return new self(
104  (string) $xml_element->attributes()['id'],
105  (string) $xml_element->attributes()['name'],
106  (string) $xml_element->attributes()['css_file'],
107  (string) $xml_element->attributes()['image_directory'],
108  (string) $xml_element->attributes()['font_directory'],
109  (string) $xml_element->attributes()['sound_directory']
110  );
111  }
+ Here is the caller graph for this function:

◆ setCssFile()

ilSkinStyle::setCssFile ( string  $css_file)

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

References $css_file.

Referenced by __construct().

164  : void
165  {
166  $this->css_file = $css_file;
167  }
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 174 of file class.ilSkinStyle.php.

References $font_directory.

Referenced by __construct().

174  : void
175  {
176  $this->font_directory = $font_directory;
177  }
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 121 of file class.ilSkinStyle.php.

References ilSystemStyleException\INVALID_CHARACTERS_IN_ID.

Referenced by __construct().

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

◆ setImageDirectory()

ilSkinStyle::setImageDirectory ( string  $image_directory)

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

References $image_directory.

Referenced by __construct().

154  : void
155  {
156  $this->image_directory = $image_directory;
157  }
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 134 of file class.ilSkinStyle.php.

References $name.

Referenced by __construct().

134  : void
135  {
136  $this->name = $name;
137  }
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 144 of file class.ilSkinStyle.php.

References $sound_directory.

Referenced by __construct().

144  : void
145  {
146  $this->sound_directory = $sound_directory;
147  }
string $sound_directory
Directory to store sound 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 190 of file class.ilSkinStyle.php.

References $substyle_of.

Referenced by __construct().

190  : void
191  {
192  $this->substyle_of = $substyle_of;
193  }
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 56 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 Scss 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 into.

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

Referenced by getSoundDirectory(), and setSoundDirectory().

◆ $sound_directory_name

string ilSkinStyle::$sound_directory_name = ''
protected

Directory to store sound files into.

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

◆ $substyle_of

string ilSkinStyle::$substyle_of = ''
protected

Parent of the skin if set.

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

Referenced by getSubstyleOf(), and setSubstyleOf().


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