本文整理匯總了PHP中Lock::info方法的典型用法代碼示例。如果您正苦於以下問題:PHP Lock::info方法的具體用法?PHP Lock::info怎麽用?PHP Lock::info使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Lock
的用法示例。
在下文中一共展示了Lock::info方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: Lock
<?php
/**
* The page edit form.
*/
$page->layout = 'admin';
if (!User::require_admin()) {
$this->redirect('/admin');
}
$lock = new Lock('Webpage', $_GET['page']);
if ($lock->exists()) {
$page->title = i18n_get('Editing Locked');
echo $tpl->render('admin/locked', $lock->info());
return;
} else {
$lock->add();
}
require_once 'apps/admin/lib/Functions.php';
$wp = new Webpage($_GET['page']);
$f = new Form('post', 'admin/edit');
$f->verify_csrf = false;
if ($f->submit()) {
$wp->id = $_POST['id'];
$wp->title = $_POST['title'];
$wp->menu_title = $_POST['menu_title'];
$wp->window_title = $_POST['window_title'];
$wp->access = $_POST['access'];
$wp->layout = $_POST['layout'];
$wp->description = $_POST['description'];
$wp->keywords = $_POST['keywords'];
$wp->body = $_POST['body'];