本文整理汇总了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();
}