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.

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

References $css_file.

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

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

◆ getFontDirectory()

ilSkinStyleXML::getFontDirectory ( )
Returns
string

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

References $font_directory.

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

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

◆ getId()

◆ getImageDirectory()

ilSkinStyleXML::getImageDirectory ( )

◆ getName()

ilSkinStyleXML::getName ( )
Returns
string

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

References $name.

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

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

◆ getSoundDirectory()

ilSkinStyleXML::getSoundDirectory ( )
Returns
string

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

References $sound_directory.

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

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

References $substyle_of.

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

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

References getSubstyleOf().

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

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

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  }
Add rich text string
$style
Definition: example_012.php:70
+ 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 248 of file class.ilSkinStyleXML.php.

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

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

References $css_file.

Referenced by __construct().

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

References $font_directory.

Referenced by __construct().

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

References $id, and ilSystemStyleException\INVALID_CHARACTERS_IN_ID.

Referenced by __construct().

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

References $image_directory.

Referenced by __construct().

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

◆ setName()

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

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

References $name.

Referenced by __construct().

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

References $sound_directory.

Referenced by __construct().

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

References $substyle_of.

Referenced by __construct().

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