本文整理匯總了PHP中PageLayout::disableHeader方法的典型用法代碼示例。如果您正苦於以下問題:PHP PageLayout::disableHeader方法的具體用法?PHP PageLayout::disableHeader怎麽用?PHP PageLayout::disableHeader使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類PageLayout
的用法示例。
在下文中一共展示了PageLayout::disableHeader方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: authorize_action
/**
*
**/
public function authorize_action()
{
global $user, $auth;
$auth->login_if($user->id == 'nobody');
$user_id = OAuthUser::getMappedId($user->id);
// Fetch the oauth store and the oauth server.
$store = OAuthStore::instance();
$server = new OAuthServer();
try {
// Check if there is a valid request token in the current request
// Returns an array with the consumer key, consumer secret, token, token secret and token type.
$rs = $server->authorizeVerify();
if (isset($_POST['allow'])) {
// See if the user clicked the 'allow' submit button (or whatever you choose)
$authorized = array_key_exists('allow', $_POST);
// Set the request token to be authorized or not authorized
// When there was a oauth_callback then this will redirect to the consumer
$server->authorizeFinish($authorized, $user_id);
// No oauth_callback, show the user the result of the authorization
// ** your code here **
PageLayout::postMessage(Messagebox::success(_('Sie haben der Applikation Zugriff auf Ihre Daten gewährt.')));
$this->redirect('user#' . $rs['consumer_key']);
}
} catch (OAuthException $e) {
// No token to be verified in the request, show a page where the user can enter the token to be verified
// **your code here**
die('invalid');
}
PageLayout::disableHeader();
$this->set_layout($GLOBALS['template_factory']->open('layouts/base_without_infobox'));
$this->rs = $rs;
}
示例2: authorize_action
/**
*
**/
public function authorize_action()
{
global $user, $auth;
$auth_plugin = Config::get()->API_OAUTH_AUTH_PLUGIN;
if ($GLOBALS['user']->id === 'nobody' && $auth_plugin !== 'Standard' && !Request::option('sso')) {
$params = $_GET;
$params['sso'] = $auth_plugin;
$this->redirect($this->url_for('api/oauth/authorize?' . http_build_query($params)));
return;
} else {
$auth->login_if($user->id === 'nobody');
}
$user_id = RESTAPI\Consumer\OAuth::getOAuthId($GLOBALS['user']->id);
try {
$consumer = RESTAPI\Consumer\Base::detectConsumer('oauth', 'request');
if (Request::submitted('allow')) {
$result = $consumer->grantAccess($GLOBALS['user']->id);
$redirect_uri = Request::get('oauth_callback', $consumer->callback);
if ($redirect_uri) {
$this->redirect($redirect_uri);
} else {
// No oauth_callback, show the user the result of the authorization
// ** your code here **
PageLayout::postMessage(MessageBox::success(_('Sie haben der Applikation Zugriff auf Ihre Daten gewährt.')));
$this->redirect('api/authorizations#' . $consumer->auth_key);
}
return;
}
} catch (OAuthException $e) {
// No token to be verified in the request, show a page where the user can enter the token to be verified
// **your code here**
die('invalid');
}
PageLayout::disableHeader();
PageLayout::setTitle(sprintf(_('"%s" bittet um Zugriff'), $consumer->title));
$this->set_layout($GLOBALS['template_factory']->open('layouts/base.php'));
$this->consumer = $consumer;
$this->token = Request::option('oauth_token');
$this->oauth_callback = Request::get('oauth_callback');
}
示例3: compact
/*****************************************************************************
Seite abschliessen und Infofenster aufbauen
/*****************************************************************************/
?>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<?
if ($quick_view_mode === 'no_nav' || Request::get('print_view')) {
PageLayout::disableHeader();
}
if (Request::get('print_view')){
PageLayout::removeStylesheet('style.css');
PageLayout::addStylesheet('print.css'); // use special stylesheet for printing
}
Sidebar::get()->setImage('sidebar/resources-sidebar.png');
// Add clipboard if neccessary (another hack meets the core)
if (is_object($clipObj)) {
$form = $clipObj->getFormObject();
$action = $quick_view
? URLHelper::getLink('', compact('quick_view', 'quick_view_mode'))
: URLHelper::getLink('', compact('view', 'quick_view_mode'));