ILIAS  release_8 Revision v8.23
ilSystemStyleLessVariable Class Reference
+ Inheritance diagram for ilSystemStyleLessVariable:
+ Collaboration diagram for ilSystemStyleLessVariable:

Public Member Functions

 __construct (string $name, string $value, string $comment, string $category_name, array $references=[])
 
 getName ()
 
 setName (string $name)
 
 getValue ()
 
 setValue (string $value)
 
 getComment ()
 
 setComment (string $comment)
 
 getCategoryName ()
 
 setCategoryName (string $category_name)
 
 getReferences ()
 
 setReferences (array $references)
 
 __toString ()
 This function will be needed to write the variable back to the less file and restore it's initial structure in less. More...
 
- Public Member Functions inherited from ilSystemStyleLessItem
 __toString ()
 

Protected Attributes

string $name = ''
 Name of the variable. More...
 
string $value = ''
 Value of the variable as set in the less file. More...
 
string $comment = ''
 Comment to the variable as in the less file. More...
 
string $category_name = ''
 Less Category which encloses this variable. More...
 
array $references = []
 Set references to other variables that are used by this exact variable. More...
 

Detailed Description

Definition at line 26 of file class.ilSystemStyleLessVariable.php.

Constructor & Destructor Documentation

◆ __construct()

ilSystemStyleLessVariable::__construct ( string  $name,
string  $value,
string  $comment,
string  $category_name,
array  $references = [] 
)

Definition at line 53 of file class.ilSystemStyleLessVariable.php.

References setCategoryName(), setComment(), setName(), setReferences(), and setValue().

59  {
60  $this->setName($name);
61  $this->setValue($value);
63  $this->setComment($comment);
64  $this->setReferences($references);
65  }
array $references
Set references to other variables that are used by this exact variable.
string $comment
Comment to the variable as in the less file.
string $name
Name of the variable.
string $category_name
Less Category which encloses this variable.
string $value
Value of the variable as set in the less file.
+ Here is the call graph for this function:

Member Function Documentation

◆ __toString()

ilSystemStyleLessVariable::__toString ( )

This function will be needed to write the variable back to the less file and restore it's initial structure in less.

Definition at line 136 of file class.ilSystemStyleLessVariable.php.

References getComment(), getName(), and getValue().

136  : string
137  {
138  $content = '';
139  if ($this->getComment()) {
140  $content .= '//** ' . $this->getComment() . "\n";
141  }
142  $content .= '@' . $this->getName() . ":\t\t" . $this->getValue() . ";\n";
143  return $content;
144  }
+ Here is the call graph for this function:

◆ getCategoryName()

ilSystemStyleLessVariable::getCategoryName ( )

Definition at line 112 of file class.ilSystemStyleLessVariable.php.

References $category_name.

112  : string
113  {
114  return $this->category_name;
115  }
string $category_name
Less Category which encloses this variable.

◆ getComment()

ilSystemStyleLessVariable::getComment ( )

Definition at line 101 of file class.ilSystemStyleLessVariable.php.

References $comment.

Referenced by __toString().

101  : string
102  {
103  return $this->comment;
104  }
string $comment
Comment to the variable as in the less file.
+ Here is the caller graph for this function:

◆ getName()

ilSystemStyleLessVariable::getName ( )

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

References $name.

Referenced by __toString(), and setValue().

67  : string
68  {
69  return $this->name;
70  }
string $name
Name of the variable.
+ Here is the caller graph for this function:

◆ getReferences()

ilSystemStyleLessVariable::getReferences ( )

Definition at line 122 of file class.ilSystemStyleLessVariable.php.

References $references.

122  : array
123  {
124  return $this->references;
125  }
array $references
Set references to other variables that are used by this exact variable.

◆ getValue()

ilSystemStyleLessVariable::getValue ( )

Definition at line 77 of file class.ilSystemStyleLessVariable.php.

References $value.

Referenced by __toString().

77  : string
78  {
79  return $this->value;
80  }
string $value
Value of the variable as set in the less file.
+ Here is the caller graph for this function:

◆ setCategoryName()

ilSystemStyleLessVariable::setCategoryName ( string  $category_name)

Definition at line 117 of file class.ilSystemStyleLessVariable.php.

References $category_name.

Referenced by __construct().

117  : void
118  {
119  $this->category_name = $category_name;
120  }
string $category_name
Less Category which encloses this variable.
+ Here is the caller graph for this function:

◆ setComment()

ilSystemStyleLessVariable::setComment ( string  $comment)

Definition at line 106 of file class.ilSystemStyleLessVariable.php.

References ILIAS\UI\examples\Symbol\Glyph\Comment\comment().

Referenced by __construct().

106  : void
107  {
108  $comment = str_replace(PHP_EOL, '', $comment);
109  $this->comment = str_replace("\n", '', $comment);
110  }
string $comment
Comment to the variable as in the less file.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setName()

ilSystemStyleLessVariable::setName ( string  $name)

Definition at line 72 of file class.ilSystemStyleLessVariable.php.

References $name.

Referenced by __construct().

72  : void
73  {
74  $this->name = $name;
75  }
string $name
Name of the variable.
+ Here is the caller graph for this function:

◆ setReferences()

ilSystemStyleLessVariable::setReferences ( array  $references)

Definition at line 127 of file class.ilSystemStyleLessVariable.php.

References $references.

Referenced by __construct().

127  : void
128  {
129  $this->references = $references;
130  }
array $references
Set references to other variables that are used by this exact variable.
+ Here is the caller graph for this function:

◆ setValue()

ilSystemStyleLessVariable::setValue ( string  $value)

Definition at line 82 of file class.ilSystemStyleLessVariable.php.

References $value, and getName().

Referenced by __construct().

82  : void
83  {
84  if ($this->getName() == 'il-icon-font-path') {
85  if ($value[0] != "\"") {
86  $value = "\"" . $value;
87  }
88  if (substr($value, -1, 1) != "\"") {
89  $value .= "\"";
90  }
91 
92  if ($value == "\"../../node_modules/bootstrap/fonts/\"") {
93  $value = "\"../../../../node_modules/bootstrap/fonts/\"";
94  }
95  }
96 
97  $value = str_replace(PHP_EOL, '', $value);
98  $this->value = str_replace("\n", '', $value);
99  }
string $value
Value of the variable as set in the less file.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $category_name

string ilSystemStyleLessVariable::$category_name = ''
protected

Less Category which encloses this variable.

Definition at line 46 of file class.ilSystemStyleLessVariable.php.

Referenced by getCategoryName(), and setCategoryName().

◆ $comment

string ilSystemStyleLessVariable::$comment = ''
protected

Comment to the variable as in the less file.

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

Referenced by getComment().

◆ $name

string ilSystemStyleLessVariable::$name = ''
protected

Name of the variable.

Definition at line 31 of file class.ilSystemStyleLessVariable.php.

Referenced by getName(), and setName().

◆ $references

array ilSystemStyleLessVariable::$references = []
protected

Set references to other variables that are used by this exact variable.

Definition at line 51 of file class.ilSystemStyleLessVariable.php.

Referenced by getReferences(), and setReferences().

◆ $value

string ilSystemStyleLessVariable::$value = ''
protected

Value of the variable as set in the less file.

Definition at line 36 of file class.ilSystemStyleLessVariable.php.

Referenced by getValue(), and setValue().


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