コード例 #1
0
ファイル: MenuItemTest.php プロジェクト: GlobalsDD/admin
 /** @test */
 public function it_sets_icon()
 {
     $menu = new MenuItem();
     $menu->icon('menu-icon');
     $this->assertEquals('menu-icon', $menu->getIcon());
 }
コード例 #2
0
ファイル: MenuItem.php プロジェクト: ntamvl/laravel-adminlte
 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);
 }