示例#1
0
 /** @test */
 public function it_sets_icon()
 {
     $menu = new MenuItem();
     $menu->icon('menu-icon');
     $this->assertEquals('menu-icon', $menu->getIcon());
 }
示例#2
0
 protected function renderSingleItem()
 {
     $content = $this->htmlBuilder->tag('i', ['class' => ['fa', 'fa-fw', $this->menuItem->getIcon()]]);
     $content .= ' ' . $this->menuItem->getLabel();
     return $this->htmlBuilder->tag('a', ['href' => $this->menuItem->getUrl()], $content);
 }