本文整理汇总了PHP中Zend_View_Helper_PaginationControl::setDefaultViewPartial方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_View_Helper_PaginationControl::setDefaultViewPartial方法的具体用法?PHP Zend_View_Helper_PaginationControl::setDefaultViewPartial怎么用?PHP Zend_View_Helper_PaginationControl::setDefaultViewPartial使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_View_Helper_PaginationControl
的用法示例。
在下文中一共展示了Zend_View_Helper_PaginationControl::setDefaultViewPartial方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: indexAction
/**
* The default action - show the home page
*/
public function indexAction()
{
$loai = $this->_getParam('loai', 'dhsg');
$table = Khcn_Api::_()->getDbTable('he_cao_hoc', 'default');
$this->view->he_cao_hoc = $he_cao_hoc = $table->fetchRow($table->select()->where('name = ?', $loai));
if (!$he_cao_hoc) {
$this->_redirect('index');
}
// TODO Auto-generated {0}::indexAction() default action
$params = array('trang_thai' => true, 'limit' => 20, 'he_cao_hoc' => $he_cao_hoc->getIdentity());
$danhSach = Khcn_Api::_()->getDbTable('lich_hoc', 'default')->getPaginator($params);
$paginator = Zend_Paginator::factory($danhSach);
$currentPage = 1;
//Check if the user is not on page 1
$page = $this->_getParam('page');
if (!empty($page)) {
//Where page is the current page
$currentPage = $this->_getParam('page');
}
//Set the properties for the pagination
$paginator->setItemCountPerPage(15);
$paginator->setPageRange(10);
$paginator->setCurrentPageNumber($currentPage);
Zend_Paginator::setDefaultScrollingStyle('Sliding');
Zend_View_Helper_PaginationControl::setDefaultViewPartial('includes/pagination.phtml');
$paginator->setView($this->view);
$this->view->paginator = $paginator;
}
示例2: _initPaginator
/**
* 初始化Zend_Paginator
*/
protected function _initPaginator()
{
Zend_Paginator::setDefaultItemCountPerPage(15);
Zend_View_Helper_PaginationControl::setDefaultViewPartial('paginator.phtml');
$view = $this->bootstrap('view')->getResource('view');
$view->addScriptPath(realpath(__DIR__) . '/layouts');
}
示例3: adminimagereportAction
function adminimagereportAction()
{
$this->view->title = 'Reports';
$this->view->activeTab = 'Reports';
$this->_helper->layout->setLayout("layout_admin");
$this->view->campaign_id = $this->_request->getParam('id');
$curPage = 1;
$rowsPerPage = 50;
if ($this->_request->getParam('page')) {
$curPage = $this->_request->getParam('page');
}
$db = Zend_Registry::get('db');
$select = $db->select();
$select->from('image_report', array('id', 'image', 'state', 'create_date', 'consumer_id', 'thumb_width', 'thumb_height'))->join('consumer', 'consumer.id = image_report.consumer_id', array('email', 'name', 'recipients_name', 'language_pref'))->joinLeft('image_report_reply', 'image_report_reply.image_report_id = image_report.id', 'content')->joinLeft('reward_point_transaction_record', 'reward_point_transaction_record.id = image_report.reward_point_transaction_record_id', 'point_amount')->where('campaign_id = ?', $this->view->campaign_id)->where('consumer.pest is null')->order('create_date desc');
$this->view->imageReports = $db->fetchAll($select);
//paging
$this->view->controller = $this->_request->getControllerName();
$this->view->action = $this->_request->getActionName();
$paginator = new Zend_Paginator(new Zend_Paginator_Adapter_Array($this->view->imageReports));
$paginator->setCurrentPageNumber($curPage)->setItemCountPerPage($rowsPerPage);
$this->view->paginator = $paginator;
// Zend_Debug::dump($this->view->duplicatedUrlArray);
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination/pagelist.phtml');
$this->view->NoInitValue = ($curPage - 1) * $rowsPerPage + 1;
}
示例4: init
/**
* Reescreve o metodo init()
* @access public
* @param void
* @return void
*/
public function init()
{
$auth = Zend_Auth::getInstance();
// instancia da autenticação
$this->permissoesGrupo = array();
$this->permissoesOrgao = array();
//Da permissao de acesso a todos os grupos do usuario logado afim de atender o UC75
if (isset($auth->getIdentity()->usu_codigo)) {
//Recupera todos os grupos do Usuario
$Usuario = new Usuario();
// objeto usuário
$grupos = $Usuario->buscarUnidades($auth->getIdentity()->usu_codigo, 21);
foreach ($grupos as $grupo) {
if (!in_array($grupo->gru_codigo, $this->permissoesGrupo)) {
$this->permissoesGrupo[] = $grupo->gru_codigo;
}
if (!in_array($grupo->uog_orgao, $this->permissoesOrgao)) {
$this->permissoesOrgao[] = $grupo->uog_orgao;
}
}
}
isset($auth->getIdentity()->usu_codigo) ? parent::perfil(1, $this->permissoesGrupo) : parent::perfil(4, $this->permissoesGrupo);
$this->usuarioLogado = isset($auth->getIdentity()->usu_codigo) ? $auth->getIdentity()->usu_codigo : $auth->getIdentity()->IdUsuario;
parent::init();
/* =============================================================================== */
/* ==== VERIFICA PERMISSAO DE ACESSO DO PROPONENTE A PROPOSTA OU AO PROJETO ====== */
/* =============================================================================== */
$this->verificarPermissaoAcesso(true, false, false);
# Paginator
Zend_Paginator::setDefaultScrollingStyle('Sliding');
Zend_View_Helper_PaginationControl::setDefaultViewPartial('paginacao/paginacaoMinc.phtml');
}
示例5: run
public function run()
{
// Lade Konfig
$config = new Zend_Config_Ini(APPLICATION_PATH . '/configs/application.ini', APPLICATION_ENV);
Zend_Registry::set('config', $config);
// Erstelle DB Adapter
$db = Zend_Db::factory($config->db);
Zend_Registry::set('db', $db);
Zend_Db_Table_Abstract::setDefaultAdapter(Zend_Registry::get('db'));
if (APPLICATION_ENV !== 'production') {
$profiler = new Zend_Db_Profiler_Firebug('All Database Queries:');
$profiler->setEnabled(true);
$db->setProfiler($profiler);
}
$resourceLoader = new Zend_Loader_Autoloader_Resource(array('basePath' => APPLICATION_PATH, 'namespace' => ''));
$resourceLoader->addResourceType('plugins', 'plugins', 'Plugins');
if (PHP_SAPI != 'cli') {
$front = Zend_Controller_Front::getInstance();
$front->registerPlugin(new Plugins_Stats());
if (APPLICATION_ENV == 'production') {
$front->registerPlugin(new Plugins_Cache());
}
}
Zend_View_Helper_PaginationControl::setDefaultViewPartial('_partials/controls.phtml');
parent::run();
}
示例6: testPaginationControlUsesDefaultPartial
public function testPaginationControlUsesDefaultPartial()
{
Zend_View_Helper_PaginationControl::setDefaultViewPartial('testPagination.phtml');
$output = $this->_viewHelper->paginationControl($this->_paginator);
$this->assertEquals('pagination control', $output);
Zend_View_Helper_PaginationControl::setDefaultViewPartial(null);
}
示例7: indexAction
/**
* The default action - show the guestbook entries
*/
public function indexAction()
{
$method = __METHOD__;
$cacheid = str_replace("::", "_", $method) . intval($this->getRequest()->getParam('page', 1));
$can_edit = false;
if (Zoo::getService('acl')->checkAccess('edit')) {
$cacheid .= "_edit";
$can_edit = true;
}
$content = $this->checkCache($cacheid);
if (!$content) {
$limit = 20;
// Offset = items per page multiplied by the page number minus 1
$offset = ($this->getRequest()->getParam('page', 1) - 1) * $limit;
$options = array('active' => true, 'nodetype' => 'guestbook_entry', 'order' => 'created DESC', 'render' => true);
$select = Zoo::getService('content')->getContentSelect($options, $offset, $limit);
$this->view->items = Zoo::getService('content')->getContent($options, $offset, $limit);
// Pagination
Zend_Paginator::setDefaultScrollingStyle('Elastic');
Zend_View_Helper_PaginationControl::setDefaultViewPartial(array('pagination_control.phtml', 'zoo'));
$adapter = new Zend_Paginator_Adapter_DbSelect($select);
$paginator = new Zend_Paginator($adapter);
$paginator->setItemCountPerPage($limit);
$paginator->setCurrentPageNumber($this->getRequest()->getParam('page', 1));
$paginator->setView($this->view);
$this->view->assign('paginator', $paginator);
$this->view->can_edit = $can_edit;
$content = $this->getContent();
$this->cache($content, $cacheid, array('nodelist', 'guestbook_list'));
}
$this->view->pagetitle = Zoo::_('Guestbook');
$this->renderContent($content);
}
示例8: _initPagination
public function _initPagination()
{
Zend_Paginator::setDefaultScrollingStyle('Sliding');
Zend_View_Helper_PaginationControl::setDefaultViewPartial(
array('partials/pagination.phtml', 'default')
);
}
示例9: _initPaginator
protected function _initPaginator()
{
$options = $this->getOptions();
if (array_key_exists('cache', $options) && $options['cache']) {
// ensure the cache is initialized...
$this->getBootstrap()->bootstrap('cachemanager');
// get the cache manager object
$manager = $this->getBootstrap()->getResource('cachemanager');
// get the paginator cache object
$cache = $manager->getCache(self::PAGINATOR_CACHE);
if (!is_null($cache)) {
Zend_Paginator::setCache($cache);
}
}
if (!empty($options['scrollingType'])) {
Zend_Paginator::setDefaultScrollingStyle($options['scrollingType']);
} else {
Zend_Paginator::setDefaultScrollingStyle(self::DEFAULT_SCROLLING_TYPE);
}
if (!empty($options['recordsPerPage'])) {
Zend_Paginator::setDefaultItemCountPerPage($options['recordsPerPage']);
} else {
Zend_Paginator::setDefaultItemCountPerPage(self::DEFAULT_RECORDS_PER_PAGE);
}
if (!empty($options['viewScript'])) {
Zend_View_Helper_PaginationControl::setDefaultViewPartial($options['viewScript']);
}
}
示例10: indexAction
public function indexAction()
{
// TODO Auto-generated {0}::indexAction() default action
$this->view->form = $form = new Admin_Form_FilterTB();
$table = Khcn_Api::_()->getDbTable('thong_bao', 'default');
$select = $table->select();
$params = Default_Model_Functions::filterParams($this->_getAllParams());
if (empty($params['order'])) {
$params['order'] = 'ngay_tao';
}
if (empty($params['direction'])) {
$params['direction'] = 'DESC';
}
$form->populate($params);
if (isset($params['loai']) && !empty($params['loai'])) {
$select->where('loai = ?', $params['loai']);
}
$select->order($params['order'] . ' ' . $params['direction']);
$thongBaos = $table->fetchAll($select);
//Set the properties for the pagination
$paginator = Zend_Paginator::factory($thongBaos);
$paginator->setItemCountPerPage(20);
$paginator->setPageRange(10);
$paginator->setCurrentPageNumber($this->_getParam('page', 1));
Zend_Paginator::setDefaultScrollingStyle('Sliding');
Zend_View_Helper_PaginationControl::setDefaultViewPartial('includes/pagination.phtml');
$paginator->setView($this->view);
$this->view->paginator = $paginator;
$this->view->filterValues = $params;
$this->view->order = $params['order'];
$this->view->direction = $params['direction'];
}
示例11: hinhAnhAction
public function hinhAnhAction()
{
$params = $this->_getAllParams();
$table = Khcn_Api::_()->getDbTable('hinh_anh', 'default');
$select = $table->select();
if (empty($params['order'])) {
$params['order'] = 'id';
}
if (empty($params['direction'])) {
$params['direction'] = 'DESC';
}
$select->order($params['order'] . ' ' . $params['direction']);
$hinhAnhs = $table->fetchAll($select);
$this->view->filterValues = $params;
// TODO Auto-generated {0}::indexAction() default action
$paginator = Zend_Paginator::factory($hinhAnhs);
$currentPage = 1;
//Check if the user is not on page 1
$page = $this->_getParam('page');
if (!empty($page)) {
//Where page is the current page
$currentPage = $this->_getParam('page');
}
//Set the properties for the pagination
$paginator->setItemCountPerPage(10);
$paginator->setPageRange(5);
$paginator->setCurrentPageNumber($currentPage);
Zend_Paginator::setDefaultScrollingStyle('Sliding');
Zend_View_Helper_PaginationControl::setDefaultViewPartial('includes/pagination.phtml');
$paginator->setView($this->view);
$this->view->paginator = $paginator;
}
示例12: indexAction
public function indexAction()
{
//include_once('PS/Filtrador.php');
//display_errors("1");
$auth = Zend_Auth::getInstance();
if (!$auth->hasIdentity()) {
return $this->_redirect('/auth/login');
}
$model = new Application_Model_Analysis();
//echo print_r($this->_getAllParams());
$filtrador = new PS_Filtrador($model, $this->_getAllParams());
$wheres = $filtrador->getFiltros();
if ($auth->getIdentity()->role === 'Medico') {
$wheres['medic_id = ?'] = $auth->getIdentity()->contact_id;
} else {
if ($auth->getIdentity()->role === 'Paciente') {
$wheres['applicant_id = ?'] = $auth->getIdentity()->contact_id;
}
}
Zend_View_Helper_PaginationControl::setDefaultViewPartial('paginator/items.phtml');
$paginator = Zend_Paginator::factory($model->getBy($wheres));
if ($this->_hasParam('page')) {
$paginator->setCurrentPageNumber($this->_getParam('page'));
$paginator->setItemCountPerPage(5);
}
$this->view->paginator = $paginator;
$this->view->params = $this->_getAllParams();
}
示例13: indexAction
public function indexAction()
{
// TODO Auto-generated {0}::indexAction() default action\
$this->view->form = $form = new Admin_Form_FilterGV();
$params = Default_Model_Functions::filterParams($this->_getAllParams());
$_SESSION['filterGV'] = $_SERVER['QUERY_STRING'];
if (empty($params['order'])) {
$params['order'] = 'ho_ten';
}
if (empty($params['direction'])) {
$params['direction'] = 'ASC';
}
$form->populate($params);
$giangViens = $this->giang_vien->loc($params);
if ($giangViens == null) {
$_SESSION['msg'] = 'Không tìm thấy dữ liệu, vui lòng thử lại .';
$_SESSION['type_msg'] = 'attention';
}
//Set the properties for the pagination
$paginator = Zend_Paginator::factory($giangViens);
$paginator->setItemCountPerPage(20);
$paginator->setPageRange(10);
$paginator->setCurrentPageNumber($this->_getParam('page', 1));
Zend_Paginator::setDefaultScrollingStyle('Sliding');
Zend_View_Helper_PaginationControl::setDefaultViewPartial('includes/pagination.phtml');
$paginator->setView($this->view);
$this->view->paginator = $paginator;
$this->view->filterValues = $params;
$this->view->order = $params['order'];
$this->view->direction = $params['direction'];
}
示例14: indexAction
public function indexAction()
{
$auth = Zend_Auth::getInstance();
$identity = $auth->getIdentity();
$this->identity = $identity;
switch ($this->identity->usr_permissao) {
case 'administrador':
$list = $this->_notificacao->fetchAll(null, "not_id DESC");
break;
case 'revendedor':
$codigo = (int) $this->identity->usr_id;
$list = $this->_notificacao->fetchAll("usr_id_fk='{$codigo}'", "not_id DESC");
break;
case 'vendedor':
$codigo = (int) $this->identity->usr_id;
$list = $this->_notificacao->fetchAll("usr_id_fk='{$codigo}'", "not_id DESC");
break;
}
$paginator = Zend_Paginator::factory($list);
$paginator->setCurrentPageNumber($this->_getParam('page'));
$paginator->setItemCountPerPage(100);
Zend_Paginator::setDefaultScrollingStyle('Sliding');
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination.phtml');
$this->view->lista = $paginator;
$this->view->paginator = $paginator;
}
示例15: indexAction
public function indexAction()
{
// TODO Auto-generated {0}::indexAction() default action
$this->view->form = $form = new Admin_Form_FilterHT();
$params = Default_Model_Functions::filterParams($this->_getAllParams());
$_SESSION['filterHT'] = $_SERVER['QUERY_STRING'];
if (empty($params)) {
$params['nam'] = date('Y');
}
if (empty($params['order'])) {
$params['order'] = 'ngay_to_chuc';
}
if (empty($params['direction'])) {
$params['direction'] = 'DESC';
}
$form->populate($params);
$hoiThaos = Khcn_Api::_()->getDbTable('hoi_thao', 'default')->loc($params);
if ($hoiThaos == null) {
$_SESSION['msg'] = 'Không tìm thấy dữ liệu, vui lòng thử lại .';
$_SESSION['type_msg'] = 'attention';
}
//Set the properties for the pagination
$paginator = Zend_Paginator::factory($hoiThaos);
$paginator->setItemCountPerPage(20);
$paginator->setPageRange(10);
$paginator->setCurrentPageNumber($this->_getParam('page', 1));
Zend_Paginator::setDefaultScrollingStyle('Sliding');
Zend_View_Helper_PaginationControl::setDefaultViewPartial('includes/pagination.phtml');
$this->view->paginator = $paginator;
$this->view->filterValues = $params;
$this->view->order = $params['order'];
$this->view->direction = $params['direction'];
$this->view->capQLs = $capQLs = Default_Model_Constraints::hoithao_capquanly();
}