Ejemplo n.º 1
0
 /**
  * @return string
  */
 public function parse()
 {
     $html = '';
     if (count($this->items) > 0) {
         /** @var ItemInterface $firstChild */
         $firstChild = $this->getFirstChild();
         $html .= $this->builder->createListStartTag($firstChild);
         /** @var ItemInterface $item */
         foreach ($this->items as $item) {
             $html .= $item->parse();
         }
         $html .= $this->builder->createListEndTag($firstChild);
     }
     return $html;
 }
Ejemplo n.º 2
0
 /**
  * @return string
  */
 protected function parseChildren()
 {
     $html = '';
     if (count($this->getChildren()) > 0) {
         /** @var ItemInterface $firstChild */
         $firstChild = $this->getFirstChild();
         $html .= $this->builder->createListStartTag($firstChild);
         /** @var ItemInterface $child */
         foreach ($this->getChildren() as $child) {
             $html .= $child->parse();
         }
         $html .= $this->builder->createListEndTag($firstChild);
     }
     return $html;
 }