Overview

Namespaces

  • None
  • PHP

Classes

  • Breadcrumb
  • Breadcrumbs
  • CacheFile
  • Comment
  • CommentArray
  • CommentFilter
  • CommentForm
  • CommentList
  • Config
  • Database
  • DatabaseQuery
  • DatabaseQuerySelect
  • DatabaseQuerySelectFulltext
  • DatabaseStopwords
  • Debug
  • Field
  • Fieldgroup
  • Fieldgroups
  • FieldgroupsArray
  • Fields
  • FieldsArray
  • Fieldtype
  • FieldtypeMulti
  • Fieldtypes
  • FileLog
  • FilenameArray
  • Fuel
  • HookEvent
  • ImageSizer
  • Inputfield
  • InputfieldsArray
  • InputfieldWrapper
  • Language
  • LanguageParser
  • Languages
  • LanguagesPageFieldValue
  • LanguageSupportInstall
  • LanguageTranslator
  • Markdown_Parser
  • MarkdownExtra_Parser
  • ModuleJS
  • ModulePlaceholder
  • Modules
  • Notice
  • NoticeError
  • NoticeMessage
  • Notices
  • NullPage
  • Page
  • PageArray
  • Pagefile
  • Pagefiles
  • PagefilesManager
  • PageFinder
  • Pageimage
  • Pageimages
  • PagerNav
  • PagerNavItem
  • Pages
  • PagesAccess
  • PagesSortfields
  • PagesType
  • Paths
  • Permission
  • Permissions
  • Process
  • ProcessController
  • ProcessWire
  • Role
  • Roles
  • Sanitizer
  • Selector
  • SelectorBitwiseAnd
  • SelectorContains
  • SelectorContainsLike
  • SelectorContainsWords
  • SelectorEnds
  • SelectorEqual
  • SelectorGreaterThan
  • SelectorGreaterThanEqual
  • SelectorLessThan
  • SelectorLessThanEqual
  • SelectorNotEqual
  • Selectors
  • SelectorStarts
  • Session
  • SessionCSRF
  • SmartyPants_Parser
  • SmartyPantsTypographer_Parser
  • SystemUpdate1
  • Template
  • TemplateFile
  • Templates
  • TemplatesArray
  • Textformatter
  • Textile
  • User
  • Users
  • Wire
  • WireArray
  • WireData
  • WireInput
  • WireInputData
  • WireSaveableItems
  • WireSaveableItemsLookup
  • WireUpload

Interfaces

  • CommentFormInterface
  • CommentListInterface
  • ConfigurableModule
  • FieldtypeLanguageInterface
  • FieldtypePageTitleCompatible
  • HasLookupItems
  • HasRoles
  • InputfieldHasArrayValue
  • Module
  • Saveable
  • TrackChanges

Exceptions

  • ProcessController404Exception
  • ProcessControllerPermissionException
  • Wire404Exception
  • WireDatabaseException
  • WireException
  • WirePermissionException

Functions

  • __
  • _n
  • _x
  • fuel
  • identify_modifier_markdown
  • Markdown
  • mdwp_add_p
  • mdwp_hide_tags
  • mdwp_show_tags
  • mdwp_strip_p
  • ProcessWireClassLoader
  • ProcessWireHostSiteConfig
  • ProcessWireShutdown
  • removeNewlines
  • SmartDashes
  • SmartEllipsis
  • SmartQuotes
  • smarty_modifier_markdown
  • smarty_modifier_smartypants
  • SmartyPants
  • tabIndent
  • unregisterGLOBALS
  • wire
  • wireDecodeJSON
  • wireEncodeJSON
  • wireMkdir
  • Overview
  • Namespace
  • Class
  • Tree
  • Download

Class PagerNav

Collection of Pager items that determines which pagination links should be used

USAGE EXAMPLE:

$pager = new PagerNav(100, 10, 0);

foreach($pager as $pageLabel => $pageNum) { $class = "action"; if($pageNum == $pager->getCurrentPage()) $class .= " on"; $out .= "$pageLabel"; }
PagerNav implements IteratorAggregate
Located at modules/Markup/MarkupPagerNav/PagerNav.php
Methods summary
public
# __construct( integer $totalItems, integer $itemsPerPage, integer $currentPage )

Construct the PagerNav

Construct the PagerNav

Parameters

$totalItems
integer
Total number of items in the list to be paginated.
$itemsPerPage
integer
The number of items you want to appear per page.
$currentPage
integer
The current page number (NOTE: 0 based, not 1 based)
public array
# getPager( )

Returns an array contantaining $label => $pageNum

Returns an array contantaining $label => $pageNum

Rather than access this function directly, it is prefereable to iterate the object.

Returns

array
public
# getIterator( )

Implementation of

IteratorAggregate::getIterator
public
# getFirstItem( )
public
# getItemsPerPage( )
public
# getCurrentPage( )
public
# getTotalPages( )
public
# getLabel( $key )
public
# setNumPageLinks( $numPageLinks )
public
# setLabels( string $previous, string $next )

Set the labels to use for the 'prev' and 'next' links

Set the labels to use for the 'prev' and 'next' links

Parameters

$previous
string
'Previous' label
$next
string
'Next' label
Properties summary
protected integer $totalPages 0
#
protected integer $currentPage 0
#
protected $pager NULL
#
protected integer $numPageLinks 10
#
protected integer $totalItems 0
#
protected integer $firstItem 0
#
protected integer $itemsPerPage 0
#
protected array $labels array( 'previous' => 'prev', 'next' => 'next' )
#
protected $separator NULL
#
ProcessWire API documentation generated by ApiGen 2.6.0