ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.ilSystemStyleLessCategory.php
Go to the documentation of this file.
1 <?php
2 require_once("./Services/Style/System/classes/Less/class.ilSystemStyleLessItem.php");
3 
17 {
23  protected $name = "";
24 
30  protected $comment = "";
31 
37  public function __construct($name, $comment = "")
38  {
39  $this->setName($name);
40  $this->setComment($comment);
41  }
42 
46  public function getName()
47  {
48  return $this->name;
49  }
50 
54  public function setName($name)
55  {
56  $this->name = str_replace(PHP_EOL, '', $name);
57  }
58 
62  public function getComment()
63  {
64  return $this->comment;
65  }
66 
70  public function setComment($comment)
71  {
72  $this->comment = str_replace(PHP_EOL, '', $comment);
73  }
74 
81  public function __toString()
82  {
83  if($this->getComment()){
84  return "//== ".$this->getName()."\n//\n//## ".$this->getComment()."\n";
85  }else{
86  return "//== ".$this->getName()."\n//\n//##\n";
87 
88  }
89 
90  }
91 }
__toString()
This function will be needed to write the category back to the less file and restore it&#39;s initial str...
Capsules data of a less category in the variables to less file.
comment()
Definition: comment.php:2
if($is_dev) echo "Review changes write something in WHATSNEW and and then commit with log PHP_EOL
Abstracts content of a less file.
__construct($name, $comment="")
ilSystemStyleLessCategory constructor.