Admin interface now has some sidebar and content area. Sidebar was supposed to be "dropdown-on-click", however I have not acomplished it yet.
63 lines
1.4 KiB
PHP
63 lines
1.4 KiB
PHP
<?php
|
|
namespace App\MenuPresenters;
|
|
|
|
use Pingpong\Menus\Presenters\Presenter;
|
|
|
|
class FoundationMenuPresenter extends Presenter
|
|
{
|
|
/**
|
|
* {@inheritdoc }
|
|
*/
|
|
public function getOpenTagWrapper()
|
|
{
|
|
return PHP_EOL . '<ul class="vertical menu-bar icon-left">' . PHP_EOL;
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc }
|
|
*/
|
|
public function getCloseTagWrapper()
|
|
{
|
|
return PHP_EOL . '</ul>' . PHP_EOL;
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc }
|
|
*/
|
|
public function getMenuWithoutDropdownWrapper($item)
|
|
{
|
|
return '<li'.$this->getActiveState($item).'><a href="'. $item->getUrl() .'">'.$item->getIcon().' '.$item->title.'</a></li>';
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc }
|
|
*/
|
|
public function getActiveState($item)
|
|
{
|
|
return \Request::is($item->getRequest()) ? ' class="active"' : null;
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc }
|
|
*/
|
|
public function getDividerWrapper()
|
|
{
|
|
return '<li class="divider"></li>';
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc }
|
|
*/
|
|
public function getMenuWithDropDownWrapper($item)
|
|
{
|
|
return '<li class="has-dropdown">
|
|
<a href="#">
|
|
'.$item->getIcon().' '.$item->title.'
|
|
</a>
|
|
<ul class="dropdown">
|
|
'.$this->getChildMenuItems($item).'
|
|
</ul>
|
|
</li>' . PHP_EOL;
|
|
;
|
|
}
|
|
} |