ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilSkinStyleXML Class Reference
+ Collaboration diagram for ilSkinStyleXML:

Public Member Functions

 __construct ($id, $name, $css_file="", $image_directory="", $font_directory="", $sound_directory="", $parent_style="")
 ilSkinStyleXML constructor. More...
 
 getId ()
 
 setId ($id)
 
 getName ()
 
 setName ($name)
 
 getSoundDirectory ()
 
 setSoundDirectory ($sound_directory)
 
 getImageDirectory ()
 
 setImageDirectory ($image_directory)
 
 getCssFile ()
 
 setCssFile ($css_file)
 
 getFontDirectory ()
 
 setFontDirectory ($font_directory)
 
 getSubstyleOf ()
 Returns the parent style of this style if set. More...
 
 setSubstyleOf ($substyle_of)
 Sets style as sub style of another. More...
 
 isSubstyle ()
 Return wheter this style is a substyle of another. More...
 
 referencesResource ($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

 $id = ""
 
 $name = ""
 
 $sound_directory = ""
 
 $image_directory = ""
 
 $font_directory = ""
 
 $css_file = ""
 
 $substyle_of = ""
 

Detailed Description

Author
Timon Amstutz timon.nosp@m..ams.nosp@m.tutz@.nosp@m.ilub.nosp@m..unib.nosp@m.e.ch
Version
$Id$*

Definition at line 7 of file class.ilSkinStyleXML.php.

Constructor & Destructor Documentation

◆ __construct()

ilSkinStyleXML::__construct (   $id,
  $name,
  $css_file = "",
  $image_directory = "",
  $font_directory = "",
  $sound_directory = "",
  $parent_style = "" 
)

ilSkinStyleXML constructor.

Parameters
$id
$name
string$css_file
string$image_directory
string$font_directory
string$sound_directory
string$parent_style

Definition at line 67 of file class.ilSkinStyleXML.php.

68 {
69 $this->setId($id);
70 $this->setName($name);
71
72 if ($css_file == "") {
73 $css_file = $this->getId();
74 }
75
76 if ($image_directory == "") {
77 $image_directory = "images";
78 }
79
80 if ($font_directory == "") {
81 $font_directory = "fonts";
82 }
83
84 if ($sound_directory == "") {
85 $sound_directory = "sound";
86 }
87
88 $this->setCssFile($css_file);
92 $this->setSubstyleOf($parent_style);
93 }
setImageDirectory($image_directory)
setFontDirectory($font_directory)
setSoundDirectory($sound_directory)
setSubstyleOf($substyle_of)
Sets style as sub style of another.

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

+ Here is the call graph for this function:

Member Function Documentation

◆ getCssFile()

ilSkinStyleXML::getCssFile ( )
Returns
string

Definition at line 183 of file class.ilSkinStyleXML.php.

184 {
185 return $this->css_file;
186 }

References $css_file.

Referenced by referencesResource(), and ilSystemStyleSkinContainer\updateStyle().

+ Here is the caller graph for this function:

◆ getFontDirectory()

ilSkinStyleXML::getFontDirectory ( )
Returns
string

Definition at line 199 of file class.ilSkinStyleXML.php.

200 {
202 }

References $font_directory.

Referenced by ilSystemStyleSkinContainer\deleteStyle(), referencesResource(), and ilSystemStyleSkinContainer\updateStyle().

+ Here is the caller graph for this function:

◆ getId()

◆ getImageDirectory()

ilSkinStyleXML::getImageDirectory ( )
Returns
string

Definition at line 167 of file class.ilSkinStyleXML.php.

168 {
170 }

References $image_directory.

Referenced by ilSystemStyleSkinContainer\deleteStyle(), referencesResource(), ilSystemStyleSkinContainer\resetImages(), and ilSystemStyleSkinContainer\updateStyle().

+ Here is the caller graph for this function:

◆ getName()

ilSkinStyleXML::getName ( )
Returns
string

Definition at line 135 of file class.ilSkinStyleXML.php.

136 {
137 return $this->name;
138 }

References $name.

◆ getSoundDirectory()

ilSkinStyleXML::getSoundDirectory ( )
Returns
string

Definition at line 151 of file class.ilSkinStyleXML.php.

152 {
154 }

References $sound_directory.

Referenced by ilSystemStyleSkinContainer\deleteStyle(), referencesResource(), and ilSystemStyleSkinContainer\updateStyle().

+ Here is the caller graph for this function:

◆ getSubstyleOf()

ilSkinStyleXML::getSubstyleOf ( )

Returns the parent style of this style if set.

Returns
string

Definition at line 217 of file class.ilSkinStyleXML.php.

218 {
219 return $this->substyle_of;
220 }

References $substyle_of.

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

+ Here is the caller graph for this function:

◆ isSubstyle()

ilSkinStyleXML::isSubstyle ( )

Return wheter this style is a substyle of another.

Returns
bool

Definition at line 237 of file class.ilSkinStyleXML.php.

238 {
239 return $this->getSubstyleOf() != "";
240 }
getSubstyleOf()
Returns the parent style of this style if set.

References getSubstyleOf().

+ Here is the call graph for this function:

◆ parseFromXMLElement()

static ilSkinStyleXML::parseFromXMLElement ( SimpleXMLElement  $xml_element)
static
Parameters
SimpleXMLElement$xml_element
Returns
ilSkinStyleXML

Definition at line 99 of file class.ilSkinStyleXML.php.

100 {
101 $style = new self(
102 (string) $xml_element->attributes()["id"],
103 (string) $xml_element->attributes()["name"],
104 (string) $xml_element->attributes()["css_file"],
105 (string) $xml_element->attributes()["image_directory"],
106 (string) $xml_element->attributes()["font_directory"],
107 (string) $xml_element->attributes()["sound_directory"]
108 );
109 return $style;
110 }
$style
Definition: example_012.php:70

References $style.

◆ referencesResource()

ilSkinStyleXML::referencesResource (   $resource)

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

Used to decide if folder can be deleted.

Parameters
$resource
Returns
bool

Definition at line 248 of file class.ilSkinStyleXML.php.

249 {
250 return $this->getCssFile() == $resource
251 || $this->getImageDirectory() == $resource
252 || $this->getFontDirectory() == $resource
253 || $this->getSoundDirectory()== $resource;
254 }

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

+ Here is the call graph for this function:

◆ setCssFile()

ilSkinStyleXML::setCssFile (   $css_file)
Parameters
string$css_file

Definition at line 191 of file class.ilSkinStyleXML.php.

192 {
193 $this->css_file = $css_file;
194 }

References $css_file.

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setFontDirectory()

ilSkinStyleXML::setFontDirectory (   $font_directory)
Parameters
string$font_directory

Definition at line 207 of file class.ilSkinStyleXML.php.

208 {
209 $this->font_directory = $font_directory;
210 }

References $font_directory.

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setId()

ilSkinStyleXML::setId (   $id)
Parameters
$id
Exceptions
ilSystemStyleException

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

125 {
126 if (strpos($id, ' ') !== false) {
128 }
129 $this->id = str_replace(" ", "_", $id);
130 }
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()

ilSkinStyleXML::setImageDirectory (   $image_directory)
Parameters
string$image_directory

Definition at line 175 of file class.ilSkinStyleXML.php.

176 {
177 $this->image_directory = $image_directory;
178 }

References $image_directory.

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setName()

ilSkinStyleXML::setName (   $name)
Parameters
string$name

Definition at line 143 of file class.ilSkinStyleXML.php.

144 {
145 $this->name = $name;
146 }

References $name.

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setSoundDirectory()

ilSkinStyleXML::setSoundDirectory (   $sound_directory)
Parameters
string$sound_directory

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

160 {
161 $this->sound_directory = $sound_directory;
162 }

References $sound_directory.

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setSubstyleOf()

ilSkinStyleXML::setSubstyleOf (   $substyle_of)

Sets style as sub style of another.

Parameters
string$substyle_of

Definition at line 227 of file class.ilSkinStyleXML.php.

228 {
229 $this->substyle_of = $substyle_of;
230 }

References $substyle_of.

Referenced by __construct().

+ Here is the caller graph for this function:

Field Documentation

◆ $css_file

ilSkinStyleXML::$css_file = ""
protected

Definition at line 48 of file class.ilSkinStyleXML.php.

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

◆ $font_directory

ilSkinStyleXML::$font_directory = ""
protected

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

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

◆ $id

ilSkinStyleXML::$id = ""
protected

Definition at line 13 of file class.ilSkinStyleXML.php.

Referenced by __construct(), getId(), and setId().

◆ $image_directory

ilSkinStyleXML::$image_directory = ""
protected

Definition at line 34 of file class.ilSkinStyleXML.php.

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

◆ $name

ilSkinStyleXML::$name = ""
protected

Definition at line 20 of file class.ilSkinStyleXML.php.

Referenced by __construct(), getName(), and setName().

◆ $sound_directory

ilSkinStyleXML::$sound_directory = ""
protected

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

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

◆ $substyle_of

ilSkinStyleXML::$substyle_of = ""
protected

Definition at line 55 of file class.ilSkinStyleXML.php.

Referenced by getSubstyleOf(), and setSubstyleOf().


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