ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilSystemStyleLessVariable Class Reference
+ Inheritance diagram for ilSystemStyleLessVariable:
+ Collaboration diagram for ilSystemStyleLessVariable:

Public Member Functions

 __construct ($name, $value, $comment, $category_name, $references)
 ilSystemStyleLessVariable constructor. More...
 
 getName ()
 
 setName ($name)
 
 getValue ()
 
 setValue ($value)
 
 getComment ()
 
 setComment ($comment)
 
 getCategoryName ()
 
 setCategoryName ($category_name)
 
 getReferences ()
 
 setReferences ($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

 $name = ""
 
 $value = ""
 
 $comment = ""
 
 $category_name = ""
 
 $references = array()
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

ilSystemStyleLessVariable::__construct (   $name,
  $value,
  $comment,
  $category_name,
  $references 
)

ilSystemStyleLessVariable constructor.

Parameters
$name
$value
$comment
$category_name
$references

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

References $category_name, $comment, $name, $references, $value, 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.

Returns
string

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

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

173  {
174  $content = "";
175  if ($this->getComment()) {
176  $content .= "//** " . $this->getComment() . "\n";
177  }
178  $content .= "@" . $this->getName() . ":\t\t" . $this->getValue() . ";\n";
179  return $content;
180  }
+ Here is the call graph for this function:

◆ getCategoryName()

ilSystemStyleLessVariable::getCategoryName ( )
Returns
string

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

References $category_name.

◆ getComment()

ilSystemStyleLessVariable::getComment ( )
Returns
string

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

References $comment.

Referenced by __toString().

+ Here is the caller graph for this function:

◆ getName()

ilSystemStyleLessVariable::getName ( )
Returns
string

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

References $name.

Referenced by __toString(), and setValue().

+ Here is the caller graph for this function:

◆ getReferences()

ilSystemStyleLessVariable::getReferences ( )
Returns
array

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

References $references.

◆ getValue()

ilSystemStyleLessVariable::getValue ( )
Returns
string

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

References $value.

Referenced by __toString().

+ Here is the caller graph for this function:

◆ setCategoryName()

ilSystemStyleLessVariable::setCategoryName (   $category_name)
Parameters
string$category_name

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

References $category_name.

Referenced by __construct().

145  {
146  $this->category_name = $category_name;
147  }
+ Here is the caller graph for this function:

◆ setComment()

ilSystemStyleLessVariable::setComment (   $comment)
Parameters
string$comment

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

References $comment, comment(), and PHP_EOL.

Referenced by __construct().

128  {
129  $comment = str_replace(PHP_EOL, '', $comment);
130  $this->comment = str_replace("\n", '', $comment);
131  }
PHP_EOL
Definition: complexTest.php:5
comment()
Definition: comment.php:2
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setName()

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

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

References $name.

Referenced by __construct().

81  {
82  $this->name = $name;
83  }
+ Here is the caller graph for this function:

◆ setReferences()

ilSystemStyleLessVariable::setReferences (   $references)
Parameters
array$references

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

References $references.

Referenced by __construct().

161  {
162  $this->references = $references;
163  }
+ Here is the caller graph for this function:

◆ setValue()

ilSystemStyleLessVariable::setValue (   $value)
Parameters
string$value

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

References $value, getName(), and PHP_EOL.

Referenced by __construct().

97  {
98  if ($this->getName() == "icon-font-path") {
99  if ($value[0] != "\"") {
100  $value = "\"" . $value;
101  ;
102  }
103  if (substr($value, -1, 1) != "\"") {
104  $value .= "\"";
105  }
106 
107  if ($value == "\"../../libs/bower/bower_components/bootstrap/fonts/\"") {
108  $value = "\"../../../../libs/bower/bower_components/bootstrap/fonts/\"";
109  }
110  }
111 
112  $value = str_replace(PHP_EOL, '', $value);
113  $this->value = str_replace("\n", '', $value);
114  }
PHP_EOL
Definition: complexTest.php:5
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $category_name

ilSystemStyleLessVariable::$category_name = ""
protected

◆ $comment

ilSystemStyleLessVariable::$comment = ""
protected

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

Referenced by __construct(), getComment(), and setComment().

◆ $name

ilSystemStyleLessVariable::$name = ""
protected

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

Referenced by __construct(), getName(), and setName().

◆ $references

ilSystemStyleLessVariable::$references = array()
protected

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

Referenced by __construct(), getReferences(), and setReferences().

◆ $value

ilSystemStyleLessVariable::$value = ""
protected

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

Referenced by __construct(), getValue(), and setValue().


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