' . PHP_EOL
. '
' . PHP_EOL . '' . PHP_EOL;
}
public function getMenuWithoutDropdownWrapper($item)
{
$active = $item->isActive() ? ' active' : '';
$selected = $item->isActive() ? ' selected' : '';
return '' . PHP_EOL;
}
public function getActiveState($item, $state = ' active')
{
return $item->isActive() ? $state : null;
}
public function getActiveStateOnChild($item, $state = 'selected')
{
return $item->hasActiveOnChild() ? $state : null;
}
public function getDividerWrapper()
{
return '' . PHP_EOL;
}
public function getHeaderWrapper($item)
{
$attrs = $item->attributes ?? [];
$group = $attrs['data-group'] ?? '';
$isCollapsible = strpos((string) ($attrs['class'] ?? ''), 'nav-small-cap--collapsible') !== false;
$classes = 'nav-small-cap';
if ($isCollapsible) {
$classes .= ' nav-small-cap--collapsible';
}
$dataGroup = $group ? ' data-group="' . e($group) . '"' : '';
$toggle = '';
if ($isCollapsible) {
$toggle = '«' .
'';
}
return '' . $toggle .
'' . PHP_EOL;
}
public function getMenuWithDropDownWrapper($item)
{
$selected = $item->hasActiveOnChild() ? ' selected' : '';
$activeLink = $item->hasActiveOnChild() ? ' active' : '';
$dropdownToggle = '';
$childItems = $this->getChildMenuItems($item);
return '' . PHP_EOL;
}
public function getMultiLevelDropdownWrapper($item)
{
return '';
}
public function getChildMenuItems($item)
{
$children = '';
$displayStyle = $item->hasActiveOnChild() ? 'block' : 'none';
$inClass = $item->hasActiveOnChild() ? ' in' : '';
if (count($item->getChilds()) > 0) {
$children .= '';
foreach ($item->getChilds() as $child) {
$children .= $this->renderChildItem($child);
}
$children .= '
';
}
return $children;
}
protected function renderChildItem(MenuItem $child): string
{
if ($child->isHeader()) {
return '' .
'«' .
'' . PHP_EOL;
}
if ($child->isDivider()) {
return '' . PHP_EOL;
}
$isActive = $child->isActive() ? ' active' : '';
$childSelected = $child->isActive() ? ' selected' : '';
return '' . PHP_EOL;
}
protected function formatIcon($icon)
{
if (empty($icon)) {
return '';
}
return '';
}
protected function formatChildIcon($item)
{
$icon = $item->icon ?? '';
if (! empty($icon)) {
return '';
}
return '';
}
protected function renderIconMarkup(string $icon): string
{
if (strpos($icon, '