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


PHP pagination_item_active函数代码示例

本文整理汇总了PHP中pagination_item_active函数的典型用法代码示例。如果您正苦于以下问题:PHP pagination_item_active函数的具体用法?PHP pagination_item_active怎么用?PHP pagination_item_active使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了pagination_item_active函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getPagesLinks

 /**
  * Create and return the pagination page list string, ie. Previous, Next, 1 2 3 ... x.
  *
  * @return  string   Pagination page list string.
  * @since	1.0
  */
 public function getPagesLinks()
 {
     $app = JFactory::getApplication();
     // Build the page navigation list.
     $data = $this->_buildDataObject();
     $list = array();
     $list['prefix'] = $this->prefix;
     $itemOverride = false;
     $listOverride = false;
     $chromePath = JPATH_THEMES . DS . $app->getTemplate() . DS . 'html' . DS . 'pagination.php';
     if (file_exists($chromePath)) {
         require_once $chromePath;
         if (function_exists('pagination_item_active') && function_exists('pagination_item_inactive')) {
             $itemOverride = true;
         }
         if (function_exists('pagination_list_render')) {
             $listOverride = true;
         }
     }
     // Build the select list
     if ($data->all->base !== null) {
         $list['all']['active'] = true;
         $list['all']['data'] = $itemOverride ? pagination_item_active($data->all) : $this->_item_active($data->all);
     } else {
         $list['all']['active'] = false;
         $list['all']['data'] = $itemOverride ? pagination_item_inactive($data->all) : $this->_item_inactive($data->all);
     }
     if ($data->start->base !== null) {
         $list['start']['active'] = true;
         $list['start']['data'] = $itemOverride ? pagination_item_active($data->start) : $this->_item_active($data->start);
     } else {
         $list['start']['active'] = false;
         $list['start']['data'] = $itemOverride ? pagination_item_inactive($data->start) : $this->_item_inactive($data->start);
     }
     if ($data->previous->base !== null) {
         $list['previous']['active'] = true;
         $list['previous']['data'] = $itemOverride ? pagination_item_active($data->previous) : $this->_item_active($data->previous);
     } else {
         $list['previous']['active'] = false;
         $list['previous']['data'] = $itemOverride ? pagination_item_inactive($data->previous) : $this->_item_inactive($data->previous);
     }
     $list['pages'] = array();
     //make sure it exists
     foreach ($data->pages as $i => $page) {
         if ($page->base !== null) {
             $list['pages'][$i]['active'] = true;
             $list['pages'][$i]['data'] = $itemOverride ? pagination_item_active($page) : $this->_item_active($page);
         } else {
             $list['pages'][$i]['active'] = false;
             $list['pages'][$i]['data'] = $itemOverride ? pagination_item_inactive($page) : $this->_item_inactive($page);
         }
     }
     if ($data->next->base !== null) {
         $list['next']['active'] = true;
         $list['next']['data'] = $itemOverride ? pagination_item_active($data->next) : $this->_item_active($data->next);
     } else {
         $list['next']['active'] = false;
         $list['next']['data'] = $itemOverride ? pagination_item_inactive($data->next) : $this->_item_inactive($data->next);
     }
     if ($data->end->base !== null) {
         $list['end']['active'] = true;
         $list['end']['data'] = $itemOverride ? pagination_item_active($data->end) : $this->_item_active($data->end);
     } else {
         $list['end']['active'] = false;
         $list['end']['data'] = $itemOverride ? pagination_item_inactive($data->end) : $this->_item_inactive($data->end);
     }
     if ($this->total > $this->limit) {
         return $listOverride ? pagination_list_render($list) : $this->_list_render($list);
     } else {
         return '';
     }
 }
开发者ID:ramdesh,项目名称:joomla-platform,代码行数:78,代码来源:pagination.php

示例2: createPageItem

 public function createPageItem($page, $title)
 {
     $tmp = (object) array('text' => $title, 'base' => $page->offset, 'link' => $this->createLink($page));
     return array('active' => $page->active, 'data' => $page->active ? pagination_item_active($tmp) : pagination_item_inactive($tmp));
 }
开发者ID:ravenlife,项目名称:Ninjaboard,代码行数:5,代码来源:paginator.php

示例3: getPagesLinks

 /**
  * Create and return the pagination page list string, ie. Previous, Next, 1 2 3 ... x.
  *
  * @return  string  Pagination page list string.
  *
  * @since   11.1
  */
 public function getPagesLinks()
 {
     $app = JFactory::getApplication();
     // Build the page navigation list.
     $data = $this->_buildDataObject();
     $list = array();
     $list['prefix'] = $this->prefix;
     $itemOverride = false;
     $listOverride = false;
     if (JFile::exists(JPATH_SITE . DS . 'media' . DS . 'contentbuilder' . DS . 'misc' . DS . 'pagination.php')) {
         $chromePath = JPATH_SITE . DS . 'media' . DS . 'contentbuilder' . DS . 'misc' . DS . 'pagination.php';
     } else {
         $chromePath = JPATH_SITE . DS . 'administrator' . DS . 'components' . DS . 'com_contentbuilder' . DS . 'classes' . DS . 'pagination_chrome.php';
     }
     if (file_exists($chromePath)) {
         include_once $chromePath;
         if (function_exists('pagination_item_active') && function_exists('pagination_item_inactive')) {
             $itemOverride = true;
         }
         if (function_exists('pagination_list_render')) {
             $listOverride = true;
         }
     }
     // Build the select list
     if ($data->all->base !== null) {
         $list['all']['active'] = true;
         $list['all']['data'] = $itemOverride ? pagination_item_active($data->all) : $this->_item_active($data->all);
     } else {
         $list['all']['active'] = false;
         $list['all']['data'] = $itemOverride ? pagination_item_inactive($data->all) : $this->_item_inactive($data->all);
     }
     if ($data->start->base !== null) {
         $list['start']['active'] = true;
         $list['start']['data'] = $itemOverride ? pagination_item_active($data->start) : $this->_item_active($data->start);
     } else {
         $list['start']['active'] = false;
         $list['start']['data'] = $itemOverride ? pagination_item_inactive($data->start) : $this->_item_inactive($data->start);
     }
     if ($data->previous->base !== null) {
         $list['previous']['active'] = true;
         $list['previous']['data'] = $itemOverride ? pagination_item_active($data->previous) : $this->_item_active($data->previous);
     } else {
         $list['previous']['active'] = false;
         $list['previous']['data'] = $itemOverride ? pagination_item_inactive($data->previous) : $this->_item_inactive($data->previous);
     }
     // Make sure it exists
     $list['pages'] = array();
     foreach ($data->pages as $i => $page) {
         if ($page->base !== null) {
             $list['pages'][$i]['active'] = true;
             $list['pages'][$i]['data'] = $itemOverride ? pagination_item_active($page) : $this->_item_active($page);
         } else {
             $list['pages'][$i]['active'] = false;
             $list['pages'][$i]['data'] = $itemOverride ? pagination_item_inactive($page) : $this->_item_inactive($page);
         }
     }
     if ($data->next->base !== null) {
         $list['next']['active'] = true;
         $list['next']['data'] = $itemOverride ? pagination_item_active($data->next) : $this->_item_active($data->next);
     } else {
         $list['next']['active'] = false;
         $list['next']['data'] = $itemOverride ? pagination_item_inactive($data->next) : $this->_item_inactive($data->next);
     }
     if ($data->end->base !== null) {
         $list['end']['active'] = true;
         $list['end']['data'] = $itemOverride ? pagination_item_active($data->end) : $this->_item_active($data->end);
     } else {
         $list['end']['active'] = false;
         $list['end']['data'] = $itemOverride ? pagination_item_inactive($data->end) : $this->_item_inactive($data->end);
     }
     if ($this->total > $this->limit) {
         return $listOverride ? pagination_list_render($list) : $this->_list_render($list);
     } else {
         return '';
     }
 }
开发者ID:ranrolls,项目名称:ras-full-portal,代码行数:83,代码来源:pagination.php

示例4: getPagesLinks

 /**
  * Create and return the pagination page list string, ie. Previous, Next, 1 2 3 ... x.
  *
  * @return  string  Pagination page list string.
  *
  * @since   1.5
  */
 public function getPagesLinks()
 {
     // Build the page navigation list.
     $data = $this->_buildDataObject();
     $list = array();
     $list['prefix'] = $this->prefix;
     $itemOverride = false;
     $listOverride = false;
     $chromePath = JPATH_THEMES . '/' . $this->app->getTemplate() . '/html/pagination.php';
     if (file_exists($chromePath)) {
         include_once $chromePath;
         /*
          * @deprecated Item rendering should use a layout
          */
         if (function_exists('pagination_item_active') && function_exists('pagination_item_inactive')) {
             JLog::add('pagination_item_active and pagination_item_inactive are deprecated. Use the layout joomla.pagination.link instead.', JLog::WARNING, 'deprecated');
             $itemOverride = true;
         }
         /*
          * @deprecated The list rendering is now a layout.
          * @see JPagination::_list_render()
          */
         if (function_exists('pagination_list_render')) {
             JLog::add('pagination_list_render is deprecated. Use the layout joomla.pagination.list instead.', JLog::WARNING, 'deprecated');
             $listOverride = true;
         }
     }
     // Build the select list
     if ($data->all->base !== null) {
         $list['all']['active'] = true;
         $list['all']['data'] = $itemOverride ? pagination_item_active($data->all) : $this->_item_active($data->all);
     } else {
         $list['all']['active'] = false;
         $list['all']['data'] = $itemOverride ? pagination_item_inactive($data->all) : $this->_item_inactive($data->all);
     }
     if ($data->start->base !== null) {
         $list['start']['active'] = true;
         $list['start']['data'] = $itemOverride ? pagination_item_active($data->start) : $this->_item_active($data->start);
     } else {
         $list['start']['active'] = false;
         $list['start']['data'] = $itemOverride ? pagination_item_inactive($data->start) : $this->_item_inactive($data->start);
     }
     if ($data->previous->base !== null) {
         $list['previous']['active'] = true;
         $list['previous']['data'] = $itemOverride ? pagination_item_active($data->previous) : $this->_item_active($data->previous);
     } else {
         $list['previous']['active'] = false;
         $list['previous']['data'] = $itemOverride ? pagination_item_inactive($data->previous) : $this->_item_inactive($data->previous);
     }
     // Make sure it exists
     $list['pages'] = array();
     foreach ($data->pages as $i => $page) {
         if ($page->base !== null) {
             $list['pages'][$i]['active'] = true;
             $list['pages'][$i]['data'] = $itemOverride ? pagination_item_active($page) : $this->_item_active($page);
         } else {
             $list['pages'][$i]['active'] = false;
             $list['pages'][$i]['data'] = $itemOverride ? pagination_item_inactive($page) : $this->_item_inactive($page);
         }
     }
     if ($data->next->base !== null) {
         $list['next']['active'] = true;
         $list['next']['data'] = $itemOverride ? pagination_item_active($data->next) : $this->_item_active($data->next);
     } else {
         $list['next']['active'] = false;
         $list['next']['data'] = $itemOverride ? pagination_item_inactive($data->next) : $this->_item_inactive($data->next);
     }
     if ($data->end->base !== null) {
         $list['end']['active'] = true;
         $list['end']['data'] = $itemOverride ? pagination_item_active($data->end) : $this->_item_active($data->end);
     } else {
         $list['end']['active'] = false;
         $list['end']['data'] = $itemOverride ? pagination_item_inactive($data->end) : $this->_item_inactive($data->end);
     }
     if ($this->total > $this->limit) {
         return $listOverride ? pagination_list_render($list) : $this->_list_render($list);
     } else {
         return '';
     }
 }
开发者ID:eshiol,项目名称:joomla-cms,代码行数:87,代码来源:pagination.php

示例5: getPagesLinks

 /**
  * Create and return the pagination page list string, ie. Previous, Next, 1 2 3 ... x.
  *
  * @return  string  Pagination page list string.
  *
  * @since   1.5
  */
 public function getPagesLinks()
 {
     $app = JFactory::getApplication();
     // Build the page navigation list.
     $data = $this->_buildDataObject();
     $list = array();
     $list['prefix'] = $this->prefix;
     $itemOverride = false;
     $listOverride = false;
     $chromePath = JPATH_THEMES . '/' . $app->getTemplate() . '/html/pagination.php';
     if (file_exists($chromePath)) {
         include_once $chromePath;
         if (function_exists('pagination_item_active') && function_exists('pagination_item_inactive')) {
             $itemOverride = true;
         }
         if (function_exists('pagination_list_render')) {
             $listOverride = true;
         }
     }
     if (!file_exists($chromePath)) {
         /* detect if pagination.php in JSNTPLFramework plugin then override original pagination.php */
         $chromePath = JSN_PATH_TPLFRAMEWORK . '/html/pagination.php';
         if (file_exists($chromePath)) {
             include_once $chromePath;
             if (function_exists('pagination_item_active') && function_exists('pagination_item_inactive')) {
                 $itemOverride = true;
             }
             if (function_exists('pagination_list_render')) {
                 $listOverride = true;
             }
         }
     }
     /* detect if pagination.php in JSNTPLFramework plugin then override original pagination.php */
     // Build the select list
     if ($data->all->base !== null) {
         $list['all']['active'] = true;
         $list['all']['data'] = $itemOverride ? pagination_item_active($data->all) : $this->_item_active($data->all);
     } else {
         $list['all']['active'] = false;
         $list['all']['data'] = $itemOverride ? pagination_item_inactive($data->all) : $this->_item_inactive($data->all);
     }
     if ($data->start->base !== null) {
         $list['start']['active'] = true;
         $list['start']['data'] = $itemOverride ? pagination_item_active($data->start) : $this->_item_active($data->start);
     } else {
         $list['start']['active'] = false;
         $list['start']['data'] = $itemOverride ? pagination_item_inactive($data->start) : $this->_item_inactive($data->start);
     }
     if ($data->previous->base !== null) {
         $list['previous']['active'] = true;
         $list['previous']['data'] = $itemOverride ? pagination_item_active($data->previous) : $this->_item_active($data->previous);
     } else {
         $list['previous']['active'] = false;
         $list['previous']['data'] = $itemOverride ? pagination_item_inactive($data->previous) : $this->_item_inactive($data->previous);
     }
     // Make sure it exists
     $list['pages'] = array();
     foreach ($data->pages as $i => $page) {
         if ($page->base !== null) {
             $list['pages'][$i]['active'] = true;
             $list['pages'][$i]['data'] = $itemOverride ? pagination_item_active($page) : $this->_item_active($page);
         } else {
             $list['pages'][$i]['active'] = false;
             $list['pages'][$i]['data'] = $itemOverride ? pagination_item_inactive($page) : $this->_item_inactive($page);
         }
     }
     if ($data->next->base !== null) {
         $list['next']['active'] = true;
         $list['next']['data'] = $itemOverride ? pagination_item_active($data->next) : $this->_item_active($data->next);
     } else {
         $list['next']['active'] = false;
         $list['next']['data'] = $itemOverride ? pagination_item_inactive($data->next) : $this->_item_inactive($data->next);
     }
     if ($data->end->base !== null) {
         $list['end']['active'] = true;
         $list['end']['data'] = $itemOverride ? pagination_item_active($data->end) : $this->_item_active($data->end);
     } else {
         $list['end']['active'] = false;
         $list['end']['data'] = $itemOverride ? pagination_item_inactive($data->end) : $this->_item_inactive($data->end);
     }
     if ($this->total > $this->limit) {
         return $listOverride ? pagination_list_render($list) : $this->_list_render($list);
     } else {
         return '';
     }
 }
开发者ID:jdrzaic,项目名称:joomla-dummy,代码行数:93,代码来源:jsntplpagination.php

示例6: getPagesLinks

 function getPagesLinks()
 {
     global $mainframe;
     $lang =& JFactory::getLanguage();
     // Build the page navigation list
     $data = $this->_buildDataObject();
     $list = array();
     $itemOverride = false;
     $listOverride = false;
     // Build the select list
     if ($data->all->base !== null) {
         $list['all']['active'] = true;
         $list['all']['data'] = $itemOverride ? pagination_item_active($data->all) : $this->_item_active($data->all);
     } else {
         $list['all']['active'] = false;
         $list['all']['data'] = $itemOverride ? pagination_item_inactive($data->all) : $this->_item_inactive($data->all);
     }
     if ($data->start->base !== null) {
         $list['start']['active'] = true;
         $list['start']['data'] = $itemOverride ? pagination_item_active($data->start) : $this->_item_active($data->start);
     } else {
         $list['start']['active'] = false;
         $list['start']['data'] = $itemOverride ? pagination_item_inactive($data->start) : $this->_item_inactive($data->start);
     }
     if ($data->previous->base !== null) {
         $list['previous']['active'] = true;
         $list['previous']['data'] = $itemOverride ? pagination_item_active($data->previous) : $this->_item_active($data->previous);
     } else {
         $list['previous']['active'] = false;
         $list['previous']['data'] = $itemOverride ? pagination_item_inactive($data->previous) : $this->_item_inactive($data->previous);
     }
     $list['pages'] = array();
     //make sure it exists
     foreach ($data->pages as $i => $page) {
         if ($page->base !== null) {
             $list['pages'][$i]['active'] = true;
             $list['pages'][$i]['data'] = $itemOverride ? pagination_item_active($page) : $this->_item_active($page);
         } else {
             $list['pages'][$i]['active'] = false;
             $list['pages'][$i]['data'] = $itemOverride ? pagination_item_inactive($page) : $this->_item_inactive($page);
         }
     }
     if ($data->next->base !== null) {
         $list['next']['active'] = true;
         $list['next']['data'] = $itemOverride ? pagination_item_active($data->next) : $this->_item_active($data->next);
     } else {
         $list['next']['active'] = false;
         $list['next']['data'] = $itemOverride ? pagination_item_inactive($data->next) : $this->_item_inactive($data->next);
     }
     if ($data->end->base !== null) {
         $list['end']['active'] = true;
         $list['end']['data'] = $itemOverride ? pagination_item_active($data->end) : $this->_item_active($data->end);
     } else {
         $list['end']['active'] = false;
         $list['end']['data'] = $itemOverride ? pagination_item_inactive($data->end) : $this->_item_inactive($data->end);
     }
     if ($this->total > $this->limit) {
         return $listOverride ? pagination_list_render($list) : $this->_list_render($list);
     } else {
         return '';
     }
 }
开发者ID:reeleis,项目名称:ohiocitycycles,代码行数:62,代码来源:dtpagination.php

示例7: getPagesLinks

 /**
  * Create and return the pagination page list string, ie. Previous, Next, 1 2 3 ... x.
  *
  * @return  string  Pagination page list string.
  */
 public function getPagesLinks()
 {
     // Build the page navigation list.
     $data = $this->_buildDataObject();
     $list = array();
     $itemOverride = false;
     $listOverride = false;
     $templatePath = $this->application->getContainer()->templatePath;
     $chromePath = $templatePath . '/' . $this->application->getTemplate() . '/php/pagination.php';
     if (file_exists($chromePath)) {
         include_once $chromePath;
         if (function_exists('pagination_item_active') && function_exists('pagination_item_inactive')) {
             $itemOverride = true;
         }
         if (function_exists('pagination_list_render')) {
             $listOverride = true;
         }
     }
     // Build the select list
     $list['all']['current'] = false;
     if ($data->all->base !== null) {
         $list['all']['active'] = true;
         $list['all']['data'] = $itemOverride ? pagination_item_active($data->all) : $this->_item_active($data->all);
     } else {
         $list['all']['active'] = false;
         $list['all']['data'] = $itemOverride ? pagination_item_inactive($data->all) : $this->_item_inactive($data->all);
     }
     $list['start']['current'] = false;
     if ($data->start->base !== null) {
         $list['start']['active'] = true;
         $list['start']['data'] = $itemOverride ? pagination_item_active($data->start) : $this->_item_active($data->start);
     } else {
         $list['start']['active'] = false;
         $list['start']['data'] = $itemOverride ? pagination_item_inactive($data->start) : $this->_item_inactive($data->start);
     }
     $list['previous']['current'] = false;
     if ($data->previous->base !== null) {
         $list['previous']['active'] = true;
         $list['previous']['data'] = $itemOverride ? pagination_item_active($data->previous) : $this->_item_active($data->previous);
     } else {
         $list['previous']['active'] = false;
         $list['previous']['data'] = $itemOverride ? pagination_item_inactive($data->previous) : $this->_item_inactive($data->previous);
     }
     // Make sure it exists
     $list['pages'] = array();
     foreach ($data->pages as $i => $page) {
         $list['pages'][$i]['current'] = $this->pagesCurrent == $i;
         $list['pages'][$i]['active'] = true;
         $list['pages'][$i]['data'] = $itemOverride ? pagination_item_active($page) : $this->_item_active($page);
     }
     $list['next']['current'] = false;
     if ($data->next->base !== null) {
         $list['next']['active'] = true;
         $list['next']['data'] = $itemOverride ? pagination_item_active($data->next) : $this->_item_active($data->next);
     } else {
         $list['next']['active'] = false;
         $list['next']['data'] = $itemOverride ? pagination_item_inactive($data->next) : $this->_item_inactive($data->next);
     }
     $list['end']['current'] = false;
     if ($data->end->base !== null) {
         $list['end']['active'] = true;
         $list['end']['data'] = $itemOverride ? pagination_item_active($data->end) : $this->_item_active($data->end);
     } else {
         $list['end']['active'] = false;
         $list['end']['data'] = $itemOverride ? pagination_item_inactive($data->end) : $this->_item_inactive($data->end);
     }
     if ($this->total > $this->limit) {
         return $listOverride ? pagination_list_render($list) : $this->_list_render($list);
     } else {
         return '';
     }
 }
开发者ID:edrdesigner,项目名称:awf,代码行数:77,代码来源:Pagination.php


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