Esempio n. 1
0
 /**
  * @dataProvider aProvider
  */
 public function testA($expected, $text, $href, array $options = [])
 {
     $this->assertEquals($expected, \Helpers\Html::a($text, $href, $options));
 }
Esempio n. 2
0
 /**
  * (es) Devuelve el html del elemeto(item)
  * (it) Ritorna il html del elemento(item) menu
  *
  * @return string
  */
 public function render()
 {
     $li = '';
     if ($this->visible === true) {
         if ($this->subMenu instanceof Menu) {
             $liSubMenu = $this->subMenu->render();
             $this->setActiveFromSubMenu();
         }
         $this->setActive();
         $li = '<li';
         if ($this->isActive === true) {
             $li .= ' class="' . $this->activeClass . '"';
         }
         $li .= '>' . Html::a($this->label, $this->href, $this->htmlOptions);
         if (isset($liSubMenu)) {
             $li .= $liSubMenu;
         }
         $li .= '</li>';
     }
     return $li;
 }