本文整理匯總了PHP中Pager::prepare方法的典型用法代碼示例。如果您正苦於以下問題:PHP Pager::prepare方法的具體用法?PHP Pager::prepare怎麽用?PHP Pager::prepare使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Pager
的用法示例。
在下文中一共展示了Pager::prepare方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: pager
private function pager(\Request $request)
{
\Pager::prepare();
$template = new \Template();
$template->setModuleTemplate('pulse', 'pager.html');
if (\Settings::get('pulse', 'allow_web_access')) {
$template->add('button_class', 'btn-success');
$template->add('button_status', 'Web Access Allowed');
$template->add('button_icon', 'fa-check');
$template->add('button_title', 'Pulse will process schedules via the web.');
} else {
$template->add('button_class', 'btn-danger');
$template->add('button_status', 'Web Access Denied');
$template->add('button_icon', 'fa-ban');
$template->add('button_title', 'Pulse will not allow access via the web.');
}
return $template;
}
示例2: post
/**
* Handle the submit from the search form.
*
* @param \Request $request
* @return \Response
*/
public function post(\Request $request)
{
$script = PHPWS_SOURCE_HTTP . 'mod/systemsinventory/javascript/sys_pager.js';
$source_http = PHPWS_SOURCE_HTTP;
\Layout::addJSHeader("<script type='text/javascript'>var source_http = '{$source_http}';</script>");
\Layout::addLink("<script type='text/javascript' src='{$script}'></script>");
$factory = new Factory();
$search_vars = $request->getVars();
$_SESSION['system_search_vars'] = $search_vars['vars'];
\Pager::prepare();
$template = new \Template();
$template->setModuleTemplate('systemsinventory', 'search_results.html');
$view = new \View\HtmlView($template->get());
$response = new \Response($view);
return $response;
}
示例3: editDepartmentsView
public static function editDepartmentsView($data, $request)
{
$vars = array();
$departments = SystemDevice::getSystemDepartments();
$dep_options = '';
$dep_options .= '<option value="1">NONE</option>';
foreach ($departments as $val) {
if ($val['id'] != 1) {
$dep_options .= '<option value="' . $val['id'] . '">' . $val['display_name'] . '</option>';
}
}
$vars['departments'] = $dep_options;
$script = PHPWS_SOURCE_HTTP . 'mod/systemsinventory/javascript/edit_dept.js';
\Layout::addLink("<script type='text/javascript' src='{$script}'></script>");
$vars['add'] = '<a href="#" class="btn btn-md btn-success" data-toggle="modal" data-target="#edit-department-modal"><i class="fa fa-plus"> </i>Add Department</a>';
\Pager::prepare();
$template = new \Template();
$template = new \Template($vars);
$template->setModuleTemplate('systemsinventory', 'Edit_Departments.html');
return $template->get();
}
示例4: purge
public function purge()
{
javascript('jquery');
$script = PHPWS_SOURCE_HTTP . 'mod/pagesmith/javascript/purge/script.js';
\Pager::prepare();
\Layout::addJSHeader("<script type='text/javascript' src='{$script}'><script>");
$template = new \Template();
$template->setModuleTemplate('pagesmith', 'purge.html');
$this->ps->title = 'Purge deleted pages';
$this->ps->content = $template->get();
}