ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ilSystemStyleScssVariable Class Reference
+ Inheritance diagram for ilSystemStyleScssVariable:
+ Collaboration diagram for ilSystemStyleScssVariable:

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)
 
 getForDelosOverride ()
 This function will be needed for the main scss file to override the defaults for delos. More...
 
 __toString ()
 This function will be needed to write the variable back to the Scss file and restore it's initial structure in Scss. More...
 
- Public Member Functions inherited from ilSystemStyleScssItem
 __toString ()
 

Protected Attributes

string $name = ''
 Name of the variable. More...
 
string $value = ''
 Value of the variable as set in the Scss file. More...
 
string $comment = ''
 Comment to the variable as in the Scss file. More...
 
string $category_name = ''
 Scss 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.ilSystemStyleScssVariable.php.

Constructor & Destructor Documentation

◆ __construct()

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

Definition at line 53 of file class.ilSystemStyleScssVariable.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 $category_name
Scss Category which encloses this variable.
string $value
Value of the variable as set in the Scss file.
string $name
Name of the variable.
string $comment
Comment to the variable as in the Scss file.
+ Here is the call graph for this function:

Member Function Documentation

◆ __toString()

ilSystemStyleScssVariable::__toString ( )

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

Definition at line 140 of file class.ilSystemStyleScssVariable.php.

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

140  : string
141  {
142  $content = '';
143  if ($this->getComment()) {
144  $content .= '//** ' . $this->getComment() . "\n";
145  }
146  $content .= '$' . $this->getName() . ": " . $this->getValue() . ";\n";
147  return $content;
148  }
+ Here is the call graph for this function:

◆ getCategoryName()

ilSystemStyleScssVariable::getCategoryName ( )

Definition at line 108 of file class.ilSystemStyleScssVariable.php.

References $category_name.

108  : string
109  {
110  return $this->category_name;
111  }
string $category_name
Scss Category which encloses this variable.

◆ getComment()

ilSystemStyleScssVariable::getComment ( )

Definition at line 97 of file class.ilSystemStyleScssVariable.php.

References $comment.

Referenced by __toString().

97  : string
98  {
99  return $this->comment;
100  }
string $comment
Comment to the variable as in the Scss file.
+ Here is the caller graph for this function:

◆ getForDelosOverride()

ilSystemStyleScssVariable::getForDelosOverride ( )

This function will be needed for the main scss file to override the defaults for delos.

Definition at line 131 of file class.ilSystemStyleScssVariable.php.

References getName().

131  : string
132  {
133  return '$' . $this->getName() . ": globals.$" . $this->getName() .",\n";
134  }
+ Here is the call graph for this function:

◆ getName()

ilSystemStyleScssVariable::getName ( )

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

References $name.

Referenced by __toString(), getForDelosOverride(), 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()

ilSystemStyleScssVariable::getReferences ( )

Definition at line 118 of file class.ilSystemStyleScssVariable.php.

References $references.

118  : array
119  {
120  return $this->references;
121  }
array $references
Set references to other variables that are used by this exact variable.

◆ getValue()

ilSystemStyleScssVariable::getValue ( )

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

References $value.

Referenced by __toString().

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

◆ setCategoryName()

ilSystemStyleScssVariable::setCategoryName ( string  $category_name)

Definition at line 113 of file class.ilSystemStyleScssVariable.php.

References $category_name.

Referenced by __construct().

113  : void
114  {
115  $this->category_name = $category_name;
116  }
string $category_name
Scss Category which encloses this variable.
+ Here is the caller graph for this function:

◆ setComment()

ilSystemStyleScssVariable::setComment ( string  $comment)

Definition at line 102 of file class.ilSystemStyleScssVariable.php.

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

Referenced by __construct().

102  : void
103  {
104  $comment = str_replace(PHP_EOL, '', $comment);
105  $this->comment = str_replace("\n", '', $comment);
106  }
string $comment
Comment to the variable as in the Scss file.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setName()

ilSystemStyleScssVariable::setName ( string  $name)

Definition at line 72 of file class.ilSystemStyleScssVariable.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()

ilSystemStyleScssVariable::setReferences ( array  $references)

Definition at line 123 of file class.ilSystemStyleScssVariable.php.

References $references.

Referenced by __construct().

123  : void
124  {
125  $this->references = $references;
126  }
array $references
Set references to other variables that are used by this exact variable.
+ Here is the caller graph for this function:

◆ setValue()

ilSystemStyleScssVariable::setValue ( string  $value)

Definition at line 82 of file class.ilSystemStyleScssVariable.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 
93  $value = str_replace(PHP_EOL, '', $value);
94  $this->value = str_replace("\n", '', $value);
95  }
string $value
Value of the variable as set in the Scss file.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $category_name

string ilSystemStyleScssVariable::$category_name = ''
protected

Scss Category which encloses this variable.

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

Referenced by getCategoryName(), and setCategoryName().

◆ $comment

string ilSystemStyleScssVariable::$comment = ''
protected

Comment to the variable as in the Scss file.

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

Referenced by getComment().

◆ $name

string ilSystemStyleScssVariable::$name = ''
protected

Name of the variable.

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

Referenced by getName(), and setName().

◆ $references

array ilSystemStyleScssVariable::$references = []
protected

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

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

Referenced by getReferences(), and setReferences().

◆ $value

string ilSystemStyleScssVariable::$value = ''
protected

Value of the variable as set in the Scss file.

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

Referenced by getValue(), and setValue().


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