widgets/TbNav.php
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;
    }
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;
    }
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 ; }
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.
Checks whether a menu item is active .