Пример #1
0
 /**
  * @param $content string
  */
 public function __construct($content = null)
 {
     parent::__construct('li');
     if (isset($content)) {
         $this->setContent($content);
     }
 }
Пример #2
0
 /**
  * @return string
  */
 public function __toString()
 {
     if (count($this->cells) > 1) {
         $this->setContent(LF . join(LF, $this->cells) . LF);
     } else {
         $this->setContent(join('', $this->cells));
     }
     return parent::__toString();
 }
Пример #3
0
 /**
  * @return string
  */
 public function __toString()
 {
     $content = '';
     if (isset($this->head)) {
         $content .= LF . $this->head;
     }
     if (isset($this->body)) {
         $content .= LF . $this->body;
     }
     $this->setContent($content . LF);
     return LF . parent::__toString() . LF;
 }
Пример #4
0
 /**
  * @return string
  */
 public function getContent()
 {
     $content = parent::getContent();
     if (!isset($content)) {
         $items = $this->items;
         asort($items);
         $content = '';
         foreach ($items as $item) {
             $content .= new List_Item($item);
         }
         $this->setContent($content);
     }
     return $content;
 }
Пример #5
0
 /**
  * @return string
  */
 public function __toString()
 {
     $this->setContent(LF . join(LF, $this->rows) . LF);
     return parent::__toString();
 }
Пример #6
0
 /**
  * @param $element Element
  */
 private function setOnChangeAttribute(Element $element)
 {
     if ($this->on_change) {
         $on_change = join(',', $this->on_change);
         $element->setData('on-change', $on_change);
     }
 }
Пример #7
0
 /**
  * @return string
  * @todo This is a patch to make Html_Option::getContent work. Remove this when it will work
  */
 public function getContent()
 {
     return parent::getContent();
 }