public function isSelected()
    {
        if (!is_null($this->isSelected))
            return $this->isSelected;
        if (is_string($this->url) && $this->url == \mpf\WebApp::get()->request()->getCurrentURL()) {
            return true;
        } elseif (is_array($this->url)) {
            $controller = isset($this->url[0]) ? $this->url[0] : 'home';
            if ($controller != \mpf\WebApp::get()->request()->getController()) {
                return false;
            }

            if ($this->getModule() != \mpf\WebApp::get()->request()->getModule()) {
                return false; // different module;
            }
            if (\mpf\WebApp::get()->getController()) {
                $action = isset($this->url[1]) ? $this->url[1] : \mpf\WebApp::get()->getController()->defaultAction;
                return ($action == \mpf\WebApp::get()->getController()->getActiveAction());
            }
        }
        return false;
    }
public function isSelected()
    {
        if (!is_null($this->isSelected))
            return $this->isSelected;
        if (is_string($this->url) && $this->url == \mpf\WebApp::get()->request()->getCurrentURL()) {
            return true;
        } elseif (is_array($this->url)) {
            $controller = isset($this->url[0]) ? $this->url[0] : 'home';
            if ($controller != \mpf\WebApp::get()->request()->getController()) {
                return false;
            }

            if ($this->getModule() != \mpf\WebApp::get()->request()->getModule()) {
                return false; // different module;
            }
            if (\mpf\WebApp::get()->getController()) {
                $action = isset($this->url[1]) ? $this->url[1] : \mpf\WebApp::get()->getController()->defaultAction;
                return ($action == \mpf\WebApp::get()->getController()->getActiveAction());
            }
        }
        return false;
    }
public function isSelected ( ) { if ( ! is_null ( $ this -> isSelected ) ) return $ this -> isSelected ; if ( is_string ( $ this -> url ) && $ this -> url == \ mpf \ WebApp :: get ( ) -> request ( ) -> getCurrentURL ( ) ) { return true ; } elseif ( is_array ( $ this -> url ) ) { $ controller = isset ( $ this -> url [ 0 ] ) ? $ this -> url [ 0 ] : 'home' ; if ( $ controller != \ mpf \ WebApp :: get ( ) -> request ( ) -> getController ( ) ) { return false ; } if ( $ this -> getModule ( ) != \ mpf \ WebApp :: get ( ) -> request ( ) -> getModule ( ) ) { return false ; // different module; } if ( \ mpf \ WebApp :: get ( ) -> getController ( ) ) { $ action = isset ( $ this -> url [ 1 ] ) ? $ this -> url [ 1 ] : \ mpf \ WebApp :: get ( ) -> getController ( ) -> defaultAction ; return ( $ action == \ mpf \ WebApp :: get ( ) -> getController ( ) -> getActiveAction ( ) ) ; } } return false ; }
Check if this is the current page.
@return boolean
Check if this is the current page .