_getInfo($name, $value, $attribs, $options); $id = $disable = $escape = null; extract($info); // name, id, value, attribs, options, listsep, disable, escape $attribs['id'] = $id; $obj = new AdminObj(); /** @var \Zend_Oauth_Token_Access $token */ $token = unserialize($value); $tokenValid = $obj->checkAuthToken($token); if ($tokenValid) { $name = $token->getParam('screen_name'); $clearAuthUrl = AdminView::getClearAuthUrl(); $tpl = 'Access Granted to "%s" user
' . 'Reset Credentials' . $this->_getReloadTweetsBtn() . '

Click here to reset the "Recent Tweets" application credentials. ' . 'Please note that tweets are being updated every 15 minutes.

'; $html = sprintf($tpl, htmlspecialchars($name), htmlspecialchars($clearAuthUrl)); } else { $authUrl = AdminView::getAuthUrl(); $tpl = 'Authenticate' . '

Click here to set the "Recent Tweets" application credentials. ' . 'Please note that tweets are being updated every 15 minutes.

'; $html = sprintf($tpl, htmlspecialchars($authUrl)); } $html = '
_htmlAttribs($attribs) . '>' . $html . '
'; return $html; } protected function _getReloadTweetsBtn() { $html = ''; /** @var \App_Doc_Admin $doc */ $doc = \Zend_Registry::get('doc'); if (($auth = $doc->getAuth()) && $auth->getSuMode()) { $reloadUrl = View::getReloadTweetsUrl(); $html = ' Update Cache'; } return $html; } }