ILIAS  release_8 Revision v8.24
ilSystemStyleLessCategory Class Reference

Capsules data of a less category in the variables to less file. More...

+ Inheritance diagram for ilSystemStyleLessCategory:
+ Collaboration diagram for ilSystemStyleLessCategory:

Public Member Functions

 __construct (string $name, string $comment='')
 
 getName ()
 
 setName (string $name)
 
 getComment ()
 
 setComment (string $comment)
 
 __toString ()
 This function will be needed to write the category back to the less file and restore it's initial structure in less. More...
 
 __toString ()
 

Protected Attributes

string $name = ''
 Name of the category. More...
 
string $comment = ''
 Comment to describe what this category is about. More...
 

Detailed Description

Capsules data of a less category in the variables to less file.

A less category has the following structure:

//== NameOfCategory // //## Comment

Definition at line 28 of file class.ilSystemStyleLessCategory.php.

Constructor & Destructor Documentation

◆ __construct()

ilSystemStyleLessCategory::__construct ( string  $name,
string  $comment = '' 
)

Definition at line 40 of file class.ilSystemStyleLessCategory.php.

41 {
42 $this->setName($name);
43 $this->setComment($comment);
44 }
string $comment
Comment to describe what this category is about.

References setComment(), and setName().

+ Here is the call graph for this function:

Member Function Documentation

◆ __toString()

ilSystemStyleLessCategory::__toString ( )

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

Reimplemented from ilSystemStyleLessItem.

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

72 : string
73 {
74 if ($this->getComment()) {
75 return '//== ' . $this->getName() . "\n//\n//## " . $this->getComment() . "\n";
76 } else {
77 return '//== ' . $this->getName() . "\n//\n//##\n";
78 }
79 }

References getComment(), and getName().

+ Here is the call graph for this function:

◆ getComment()

ilSystemStyleLessCategory::getComment ( )

Definition at line 57 of file class.ilSystemStyleLessCategory.php.

57 : string
58 {
59 return $this->comment;
60 }

References $comment.

Referenced by __toString().

+ Here is the caller graph for this function:

◆ getName()

ilSystemStyleLessCategory::getName ( )

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

46 : string
47 {
48 return $this->name;
49 }

References $name.

Referenced by __toString().

+ Here is the caller graph for this function:

◆ setComment()

ilSystemStyleLessCategory::setComment ( string  $comment)

Definition at line 62 of file class.ilSystemStyleLessCategory.php.

62 : void
63 {
64 $comment = str_replace(PHP_EOL, '', $comment);
65 $this->comment = str_replace("\n", '', $comment);
66 }

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()

ilSystemStyleLessCategory::setName ( string  $name)

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

51 : void
52 {
53 $name = str_replace(PHP_EOL, '', $name);
54 $this->name = str_replace("\n", '', $name);
55 }

References $name.

Referenced by __construct().

+ Here is the caller graph for this function:

Field Documentation

◆ $comment

string ilSystemStyleLessCategory::$comment = ''
protected

Comment to describe what this category is about.

Definition at line 38 of file class.ilSystemStyleLessCategory.php.

Referenced by getComment(), and setComment().

◆ $name

string ilSystemStyleLessCategory::$name = ''
protected

Name of the category.

Definition at line 33 of file class.ilSystemStyleLessCategory.php.

Referenced by getName(), and setName().


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