ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 182 of file class.ilSkinStyleXML.php.

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

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 198 of file class.ilSkinStyleXML.php.

199 {
201 }

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 166 of file class.ilSkinStyleXML.php.

167 {
169 }

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 134 of file class.ilSkinStyleXML.php.

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

References $name.

◆ getSoundDirectory()

ilSkinStyleXML::getSoundDirectory ( )
Returns
string

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

151 {
153 }

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 216 of file class.ilSkinStyleXML.php.

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

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 236 of file class.ilSkinStyleXML.php.

236 {
237 return $this->getSubstyleOf() != "";
238 }
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.

99 {
100 $style = new self((string)$xml_element->attributes()["id"],
101 (string)$xml_element->attributes()["name"],
102 (string)$xml_element->attributes()["css_file"],
103 (string)$xml_element->attributes()["image_directory"],
104 (string)$xml_element->attributes()["font_directory"],
105 (string)$xml_element->attributes()["sound_directory"]
106
107 );
108 return $style;
109 }
$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 246 of file class.ilSkinStyleXML.php.

246 {
247 return $this->getCssFile() == $resource
248 || $this->getImageDirectory() == $resource
249 || $this->getFontDirectory() == $resource
250 || $this->getSoundDirectory()== $resource;
251 }

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 190 of file class.ilSkinStyleXML.php.

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

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 206 of file class.ilSkinStyleXML.php.

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

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 123 of file class.ilSkinStyleXML.php.

124 {
125 if (strpos($id, ' ') !== false) {
127 }
128 $this->id = str_replace(" ","_",$id);
129 }
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 174 of file class.ilSkinStyleXML.php.

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

References $image_directory.

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setName()

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

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

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

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 158 of file class.ilSkinStyleXML.php.

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

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 226 of file class.ilSkinStyleXML.php.

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

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: