protected function _isItemActive(array $item): bool
    {
        if (empty($item['url'])) {
            return false;
        }
        $current = $this->_currentUrl;
        if (!empty($item['url']['plugin']) && $item['url']['plugin'] != $current['plugin']) {
            return false;
        }
        if ($item['url']['controller'] == $current['controller'] && $item['url']['action'] == $current['action']) {
            $this->_controllerActive = $current['controller'];
            $this->_actionActive = $item['url']['action'];

            return true;
        }
        if (!empty($this->_actionActive) && $item['url']['controller'] == $current['controller']) {
            $this->_controllerActive = $current['controller'];

            return true;
        }

        return false;
    }
protected function _isItemActive(array $item): bool
    {
        if (empty($item['url'])) {
            return false;
        }
        $current = $this->_currentUrl;
        if (!empty($item['url']['plugin']) && $item['url']['plugin'] != $current['plugin']) {
            return false;
        }
        if ($item['url']['controller'] == $current['controller'] && $item['url']['action'] == $current['action']) {
            $this->_controllerActive = $current['controller'];
            $this->_actionActive = $item['url']['action'];

            return true;
        }
        if (!empty($this->_actionActive) && $item['url']['controller'] == $current['controller']) {
            $this->_controllerActive = $current['controller'];

            return true;
        }

        return false;
    }
protected function _isItemActive ( array $ item ) : bool { if ( empty ( $ item [ 'url' ] ) ) { return false ; } $ current = $ this -> _currentUrl ; if ( ! empty ( $ item [ 'url' ] [ 'plugin' ] ) && $ item [ 'url' ] [ 'plugin' ] != $ current [ 'plugin' ] ) { return false ; } if ( $ item [ 'url' ] [ 'controller' ] == $ current [ 'controller' ] && $ item [ 'url' ] [ 'action' ] == $ current [ 'action' ] ) { $ this -> _controllerActive = $ current [ 'controller' ] ; $ this -> _actionActive = $ item [ 'url' ] [ 'action' ] ; return true ; } if ( ! empty ( $ this -> _actionActive ) && $ item [ 'url' ] [ 'controller' ] == $ current [ 'controller' ] ) { $ this -> _controllerActive = $ current [ 'controller' ] ; return true ; } return false ; }
Checks if the given item URL should be marked active in the menu

@param array $item Item to check
@return bool
Checks if the given item URL should be marked active in the menu