src/View/Helper/NavHelper.php
protected function _setActive(array $attr = [])
    {
        if ($this->Url->build(self::$_itemParams['item']['url']) == env('REQUEST_URI')) {
            $attr = $this->addClass($attr, 'active');
        }

        return $attr;
    }
protected function _setActive(array $attr = [])
    {
        if ($this->Url->build(self::$_itemParams['item']['url']) == env('REQUEST_URI')) {
            $attr = $this->addClass($attr, 'active');
        }

        return $attr;
    }
protected function _setActive ( array $ attr = [ ] ) { if ( $ this -> Url -> build ( self :: $ _itemParams [ 'item' ] [ 'url' ] ) == env ( 'REQUEST_URI' ) ) { $ attr = $ this -> addClass ( $ attr , 'active' ) ; } return $ attr ; }
Set active item link.

@param array $attr
@return array
Set active item link .