ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Theme.php
Go to the documentation of this file.
1 <?php
2 
4 
5 class Theme
6 {
12  private $themeName;
13 
20 
26  private $colourMap;
27 
36  {
37  // Initialise values
38  $this->themeName = $themeName;
39  $this->colourSchemeName = $colourSchemeName;
40  $this->colourMap = $colourMap;
41  }
42 
48  public function getThemeName()
49  {
50  return $this->themeName;
51  }
52 
58  public function getColourSchemeName()
59  {
61  }
62 
70  public function getColourByIndex($index)
71  {
72  if (isset($this->colourMap[$index])) {
73  return $this->colourMap[$index];
74  }
75 
76  return null;
77  }
78 
82  public function __clone()
83  {
84  $vars = get_object_vars($this);
85  foreach ($vars as $key => $value) {
86  if ((is_object($value)) && ($key != '_parent')) {
87  $this->$key = clone $value;
88  } else {
89  $this->$key = $value;
90  }
91  }
92  }
93 }
getColourSchemeName()
Get colour Scheme Name.
Definition: Theme.php:58
$index
Definition: metadata.php:60
__construct($themeName, $colourSchemeName, $colourMap)
Create a new Theme.
Definition: Theme.php:35
getColourByIndex($index)
Get colour Map Value by Position.
Definition: Theme.php:70
__clone()
Implement PHP __clone to create a deep clone, not just a shallow copy.
Definition: Theme.php:82
$key
Definition: croninfo.php:18