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.

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

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  }
setSubstyleOf($substyle_of)
Sets style as sub style of another.
setSoundDirectory($sound_directory)
setFontDirectory($font_directory)
setImageDirectory($image_directory)
+ 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.

References $css_file.

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

183  {
184  return $this->css_file;
185  }
+ Here is the caller graph for this function:

◆ getFontDirectory()

ilSkinStyleXML::getFontDirectory ( )
Returns
string

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

References $font_directory.

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

199  {
200  return $this->font_directory;
201  }
+ Here is the caller graph for this function:

◆ getId()

◆ getImageDirectory()

ilSkinStyleXML::getImageDirectory ( )

◆ getName()

ilSkinStyleXML::getName ( )
Returns
string

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

References $name.

Referenced by ilSkinXML\addChildToXML(), ilSystemStyleDeleteGUI\addStyle(), and ilSystemStyleSkinContainer\deleteStyle().

135  {
136  return $this->name;
137  }
+ Here is the caller graph for this function:

◆ getSoundDirectory()

ilSkinStyleXML::getSoundDirectory ( )
Returns
string

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

References $sound_directory.

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

151  {
152  return $this->sound_directory;
153  }
+ 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.

References $substyle_of.

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

217  {
218  return $this->substyle_of;
219  }
+ 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.

References getSubstyleOf().

Referenced by ilSkinXML\addChildToXML(), and ilSystemStyleSkinContainer\deleteStyle().

236  {
237  return $this->getSubstyleOf() != "";
238  }
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 ilSkinStyleXML::parseFromXMLElement ( SimpleXMLElement  $xml_element)
static
Parameters
SimpleXMLElement$xml_element
Returns
ilSkinStyleXML

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

References $style, and string.

Referenced by ilSkinXML\__construct().

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
Add rich text string
The name of the decorator.
+ Here is the caller graph for this function:

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

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

246  {
247  return $this->getCssFile() == $resource
248  || $this->getImageDirectory() == $resource
249  || $this->getFontDirectory() == $resource
250  || $this->getSoundDirectory()== $resource;
251  }
+ 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.

References $css_file.

Referenced by __construct().

191  {
192  $this->css_file = $css_file;
193  }
+ 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.

References $font_directory.

Referenced by __construct().

207  {
208  $this->font_directory = $font_directory;
209  }
+ 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.

References $id, and ilSystemStyleException\INVALID_CHARACTERS_IN_ID.

Referenced by __construct().

124  {
125  if (strpos($id, ' ') !== false) {
127  }
128  $this->id = str_replace(" ","_",$id);
129  }
Class for advanced editing exception handling in ILIAS.
+ 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.

References $image_directory.

Referenced by __construct().

175  {
176  $this->image_directory = $image_directory;
177  }
+ Here is the caller graph for this function:

◆ setName()

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

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

References $name.

Referenced by __construct().

143  {
144  $this->name = $name;
145  }
+ 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.

References $sound_directory.

Referenced by __construct().

159  {
160  $this->sound_directory = $sound_directory;
161  }
+ 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.

References $substyle_of.

Referenced by __construct().

227  {
228  $this->substyle_of = $substyle_of;
229  }
+ 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: