LATEST VERSION incorrectly render active item. Missing method isItemActive.
Issue #46
resolved
Whyyy???
/**
* Checks whether a menu item is active.
* @param array $item the menu item to be checked.
* @param string $route the route of the current request.
* @return boolean whether the menu item is active.
*/
protected function isItemActive($item, $route)
{
if (isset($item['url']) && is_array($item['url']) && !strcasecmp(trim($item['url'][0], '/'), $route)) {
unset($item['url']['#']);
if (count($item['url']) > 1) {
foreach (array_splice($item['url'], 1) as $name => $value) {
if (!isset($_GET[$name]) || $_GET[$name] != $value) {
return false;
}
}
}
return true;
}
return false;
}
Comments (2)
-
repo owner -
repo owner - changed status to resolved
- Log in to comment
oh ok will check it quickly