本文整理汇总了PHP中pagination_item_inactive函数的典型用法代码示例。如果您正苦于以下问题:PHP pagination_item_inactive函数的具体用法?PHP pagination_item_inactive怎么用?PHP pagination_item_inactive使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了pagination_item_inactive函数的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 '';
}
}
示例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));
}
示例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 '';
}
}
示例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 '';
}
}
示例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 '';
}
}
示例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 '';
}
}
示例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 '';
}
}