public function getToken()
    {
        static $token;

        if ($token instanceof \Gems_Tracker_Token) {
            return $token;
        }

        $token   = null;
        $tokenId = $this->getTokenId();

        if ($tokenId) {
            $token = $this->loader->getTracker()->getToken($tokenId);
        }
        if ($token && $token->exists) {
            // Set variables for the menu
            $token->applyToMenuSource($this->menu->getParameterSource());

            return $token;
        }

        throw new \Gems_Exception($this->_('No existing token specified!'));
    }
public function getToken()
    {
        static $token;

        if ($token instanceof \Gems_Tracker_Token) {
            return $token;
        }

        $token   = null;
        $tokenId = $this->getTokenId();

        if ($tokenId) {
            $token = $this->loader->getTracker()->getToken($tokenId);
        }
        if ($token && $token->exists) {
            // Set variables for the menu
            $token->applyToMenuSource($this->menu->getParameterSource());

            return $token;
        }

        throw new \Gems_Exception($this->_('No existing token specified!'));
    }
public function getToken ( ) { static $ token ; if ( $ token instanceof \ Gems_Tracker_Token ) { return $ token ; } $ token = null ; $ tokenId = $ this -> getTokenId ( ) ; if ( $ tokenId ) { $ token = $ this -> loader -> getTracker ( ) -> getToken ( $ tokenId ) ; } if ( $ token && $ token -> exists ) { // Set variables for the menu $ token -> applyToMenuSource ( $ this -> menu -> getParameterSource ( ) ) ; return $ token ; } throw new \ Gems_Exception ( $ this -> _ ( 'No existing token specified!' ) ) ; }
Retrieve the token

@return \Gems_Tracker_Token
Retrieve the token