ILIAS  release_8 Revision v8.24
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...
 
 __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.

59 {
60 $this->setName($name);
61 $this->setValue($value);
63 $this->setComment($comment);
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 $value
Value of the variable as set in the less file.
string $category_name
Less Category which encloses this variable.

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

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

Reimplemented from ilSystemStyleLessItem.

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

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 }

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

+ Here is the call graph for this function:

◆ getCategoryName()

ilSystemStyleLessVariable::getCategoryName ( )

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

112 : string
113 {
115 }

References $category_name.

◆ getComment()

ilSystemStyleLessVariable::getComment ( )

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

101 : string
102 {
103 return $this->comment;
104 }

References $comment.

Referenced by __toString().

+ Here is the caller graph for this function:

◆ getName()

ilSystemStyleLessVariable::getName ( )

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

67 : string
68 {
69 return $this->name;
70 }

References $name.

Referenced by __toString(), and setValue().

+ Here is the caller graph for this function:

◆ getReferences()

ilSystemStyleLessVariable::getReferences ( )

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

122 : array
123 {
124 return $this->references;
125 }

References $references.

◆ getValue()

ilSystemStyleLessVariable::getValue ( )

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

77 : string
78 {
79 return $this->value;
80 }

References $value.

Referenced by __toString().

+ Here is the caller graph for this function:

◆ setCategoryName()

ilSystemStyleLessVariable::setCategoryName ( string  $category_name)

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

117 : void
118 {
119 $this->category_name = $category_name;
120 }

References $category_name.

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setComment()

ilSystemStyleLessVariable::setComment ( string  $comment)

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

106 : void
107 {
108 $comment = str_replace(PHP_EOL, '', $comment);
109 $this->comment = str_replace("\n", '', $comment);
110 }

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

Referenced by __construct().

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

72 : void
73 {
74 $this->name = $name;
75 }

References $name.

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setReferences()

ilSystemStyleLessVariable::setReferences ( array  $references)

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

127 : void
128 {
129 $this->references = $references;
130 }

References $references.

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setValue()

ilSystemStyleLessVariable::setValue ( string  $value)

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

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 }

References $value, and getName().

Referenced by __construct().

+ 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(), and setComment().

◆ $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: