當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。