当前位置: 首页>>代码示例>>PHP>>正文


PHP Zend_Paginator::setDefaultScrollingStyle方法代码示例

本文整理汇总了PHP中Zend_Paginator::setDefaultScrollingStyle方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Paginator::setDefaultScrollingStyle方法的具体用法?PHP Zend_Paginator::setDefaultScrollingStyle怎么用?PHP Zend_Paginator::setDefaultScrollingStyle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Zend_Paginator的用法示例。


在下文中一共展示了Zend_Paginator::setDefaultScrollingStyle方法的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;
 }
开发者ID:nhochong,项目名称:qlkh-sgu,代码行数:31,代码来源:LichHocController.php

示例2: indexAction

    public function indexAction() {
        Zend_Paginator::setDefaultScrollingStyle('Sliding');
        Zend_View_Helper_PaginationControl::setDefaultViewPartial('controls.phtml');
        $formReg = new Application_Form_Registro();
        
        $this->view->formReg = $formReg;
        $where = array('ID_PROYECTO' => $this->me['id_usuario']);
        $this->view->reg = $this->regMP->fetchAll(null, $where);
        $attr = array('ID_CATEGORIA', 'CATEGORIA');
        $where = array('ID_PROYECTO' => $this->me["id_usuario"]);
        $catMP = new Application_Model_CategoriaMP();
        $cat = $catMP->fetchAll($attr, $where);
        $catArr = array();
        foreach ($cat as $c) {
            $catArr[$c->getIdCategoria()] = $c->getCategoria();
        }
        $this->view->catArr = $catArr;
        $paginator = Zend_Paginator::factory($this->view->reg);
        $paginator->setItemCountPerPage(20);
        $paginator->setCurrentPageNumber($this->_getParam('page', 1));
        $this->view->paginator = $paginator;

        $catMP = new Application_Model_CategoriaMP();
        $attr = array("ID_CATEGORIA", "CATEGORIA");
        $where = array('ID_PROYECTO' => $this->me['id_usuario']);
        $this->view->cat = $catMP->fetchAll($attr, $where);
    }
开发者ID:neeph,项目名称:NoTengoNiUno,代码行数:27,代码来源:TransaccionController.php

示例3: 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'];
 }
开发者ID:nhochong,项目名称:qlkh-sgu,代码行数:31,代码来源:ThongKeController.php

示例4: _initPagination

 public function _initPagination()
 {
     Zend_Paginator::setDefaultScrollingStyle('Sliding');
     Zend_View_Helper_PaginationControl::setDefaultViewPartial(
         array('partials/pagination.phtml', 'default')
     );
 }
开发者ID:robsohn,项目名称:portret-jesienny,代码行数:7,代码来源:Bootstrap.php

示例5: 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'];
 }
开发者ID:nhochong,项目名称:qlkh-sgu,代码行数:32,代码来源:ThongBaoController.php

示例6: 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;
 }
开发者ID:nhochong,项目名称:qlkh-sgu,代码行数:32,代码来源:GioiThieuController.php

示例7: 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');
 }
开发者ID:hackultura,项目名称:novosalic,代码行数:38,代码来源:LocalizacaoFisicaController.php

示例8: 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;
 }
开发者ID:Tokem,项目名称:crm700,代码行数:26,代码来源:NotificacoesController.php

示例9: 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();
 }
开发者ID:nhochong,项目名称:qlkh-sgu,代码行数:34,代码来源:HoiThaoController.php

示例10: _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']);
     }
 }
开发者ID:rawatanil3,项目名称:Zend-Framework-Development-Project,代码行数:28,代码来源:Paginator.php

示例11: 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);
 }
开发者ID:BGCX261,项目名称:zoocms-svn-to-git,代码行数:36,代码来源:IndexController.php

示例12: getSearchListPagination

 public function getSearchListPagination($word = '1', $page = '0', $lang_code)
 {
     $select = $this->_db->select()->from(array('sc' => 'site_content'))->joinLeft(array('sni' => 'site_node_item'), 'sc.content_id = sni.object_id', array('node_id'))->joinLeft(array('sn' => 'site_node'), 'sn.node_id = sni.node_id', array('page_id', 'node_title'))->where("sc.content_title LIKE '%" . mysql_escape_string($word) . "%' OR sc.content_text LIKE '%" . mysql_escape_string($word) . "%'")->where('sn.lang_code = ?', $lang_code)->order('sc.content_id DESC');
     $result = Zend_Paginator::factory($select)->setCurrentPageNumber($page)->setItemCountPerPage($this->_config->pagination->itemsPerPage)->setPageRange($this->_config->pagination->pagesInRange);
     Zend_Paginator::setDefaultScrollingStyle('Sliding');
     return $result;
 }
开发者ID:adammajchrzak,项目名称:silesiamaps,代码行数:7,代码来源:SearchModel.php

示例13: __construct

 /**
  * Constructor.
  *
  * @param Doctrine_Query $select The select query
  */
 public function __construct(Doctrine_Query $select)
 {
     $this->_select = $select;
     // Set default paginator options
     Zend_Paginator::setDefaultScrollingStyle('Sliding');
     Zend_Paginator::setDefaultItemCountPerPage(8);
     Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination.phtml');
 }
开发者ID:valentinbora,项目名称:gasestema,代码行数:13,代码来源:Adapter.php

示例14: setViewPaginator

 /**
  * Set view paginator
  *
  * @param int $count
  * @param int $perPage
  * @return void
  */
 private function setViewPaginator($count, $perPage)
 {
     $adapter = new Zend_Paginator_Adapter_Null($count);
     $paginator = new Zend_Paginator($adapter);
     Zend_Paginator::setDefaultScrollingStyle('Sliding');
     $paginator->setItemCountPerPage($perPage);
     $paginator->setCurrentPageNumber($this->page);
     $this->view->paginator = $paginator->getPages();
 }
开发者ID:sourcefabric,项目名称:newscoop,代码行数:16,代码来源:UserController.php

示例15: indexAction

 public function indexAction()
 {
     $params = array();
     $modul = $this->getRequest()->getParam('modul');
     $action = $this->getRequest()->getParam('actionType');
     $data_inceput = $this->getRequest()->getParam('data_inceput');
     $data_sfarsit = $this->getRequest()->getParam('data_sfarsit');
     //form cautare dupa modul/tip de actiune/data
     $form = new Default_Form_SearchLogs();
     $form->modul->setValue($modul);
     $form->actionType->setValue($action);
     $form->data_inceput->setValue($data_inceput);
     $form->data_sfarsit->setValue($data_sfarsit);
     $form->setDecorators(array('ViewScript', array('ViewScript', array('viewScript' => 'forms/logs/search.phtml'))));
     $this->view->form = $form;
     if ($this->getRequest()->isPost()) {
         if ($form->isValid($this->getRequest()->getPost())) {
             $post = $this->getRequest()->getPost();
             $model = new Default_Model_Logs();
             $model->setOptions($form->getValues());
         }
     }
     //end form
     //fetch loguri
     $logs = new Default_Model_Logs();
     $select = $logs->getMapper()->getDbTable()->select();
     if (!empty($action)) {
         $params['actionType'] = $action;
         $select->where('actionType = ?', $action);
     }
     if (!empty($modul)) {
         $params['modul'] = $modul;
         $select->where('modul = ?', $modul);
     }
     if (!empty($data_inceput)) {
         $params['data_inceput'] = $data_inceput;
         $select->where("DATE(created) >= ?", $data_inceput);
     }
     if (!empty($data_sfarsit)) {
         $params['data_sfarsit'] = $data_sfarsit;
         $select->where("DATE(created) <= ?", $data_sfarsit);
     }
     $select->order('created DESC');
     $result = $logs->fetchAll($select);
     if (NULL != $result) {
         $paginator = Zend_Paginator::factory($result);
         $paginator->setItemCountPerPage(10);
         $paginator->setCurrentPageNumber($this->_getParam('page'));
         $paginator->setPageRange(5);
         $this->view->result = $paginator;
         $this->view->itemCountPerPage = $paginator->getItemCountPerPage();
         $this->view->totalItemCount = $paginator->getTotalItemCount();
         Zend_Paginator::setDefaultScrollingStyle('Sliding');
         Zend_View_Helper_PaginationControl::setDefaultViewPartial(array('_pagination.phtml', $params));
     }
 }
开发者ID:valizr,项目名称:MMA,代码行数:56,代码来源:LogsController.php


注:本文中的Zend_Paginator::setDefaultScrollingStyle方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。