VirtueMart  3.2.14.9808
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
VmPagination Class Reference
Inheritance diagram for VmPagination:
Inheritance graph
[legend]
Collaboration diagram for VmPagination:
Collaboration graph
[legend]

Public Member Functions

 __construct ($total, $limitstart, $limit, $perRow=5, $prefix= '')
 
 setSequence ($sequence)
 
 getLimitBox ($sequence=0)
 
 vmOrderUpIcon ($i, $ordering=true, $task= 'orderup', $alt= 'JLIB_HTML_MOVE_UP', $enabled=true, $checkbox= 'cb')
 
 vmOrderDownIcon ($i, $ordering, $n, $condition=true, $task= 'orderdown', $alt= 'JLIB_HTML_MOVE_DOWN', $enabled=true, $checkbox= 'cb')
 
 getRowOffset ($index)
 
 getData ()
 
 getPagesCounter ()
 
 getResultsCounter ()
 
 getPagesLinks ()
 
 getListFooter ($lbox=true)
 
 orderUpIcon ($i, $condition=true, $task= 'orderup', $alt= 'JLIB_HTML_MOVE_UP', $enabled=true, $checkbox= 'cb')
 
 orderDownIcon ($i, $n, $condition=true, $task= 'orderdown', $alt= 'JLIB_HTML_MOVE_DOWN', $enabled=true, $checkbox= 'cb')
 
- Public Member Functions inherited from vObject
 __toString ()
 
 get ($prop, $def=null)
 
 set ($prop, $value=null)
 
 setProperties ($props)
 

Public Attributes

 $limitstart = null
 
 $limit = null
 
 $total = null
 
 $prefix = null
 

Protected Member Functions

 _list_footer ($list)
 
 _list_render ($list)
 
 _item_active (&$item)
 
 _item_inactive (&$item)
 
 _buildDataObject ()
 

Protected Attributes

 $_viewall = false
 
 $_additionalUrlParams = array()
 

Private Attributes

 $_perRow = 5
 

Constructor & Destructor Documentation

VmPagination::__construct (   $total,
  $limitstart,
  $limit,
  $perRow = 5,
  $prefix = '' 
)

Constructor.

Author
Max Milbers just slightly changed
Parameters
integer$totalThe total number of items.
integer$limitstartThe offset of the item to start at.
integer$limitThe number of items to display per page.
string$prefixThe prefix used for request variables.
Since
11.1 Joomla Plateform

Member Function Documentation

VmPagination::_buildDataObject ( )
protected

Create and return the pagination data object.

Returns
object Pagination data object.
Since
11.1
VmPagination::_item_active ( $item)
protected

Method to create an active pagination link to the item

Parameters
vPaginationObject&$itemThe object with which to make an active link.
Returns
string HTML link
Since
11.1
VmPagination::_item_inactive ( $item)
protected

Method to create an inactive pagination string

Parameters
object&$itemThe item to be processed
Returns
string
Since
11.1
VmPagination::_list_footer (   $list)
protected

Create the HTML for a list footer

Parameters
array$listPagination list data structure.
Returns
string HTML for a list footer
Since
11.1
VmPagination::_list_render (   $list)
protected

Create the html for a list footer

Parameters
array$listPagination list data structure.
Returns
string HTML for a list start, previous, next,end
Since
11.1
VmPagination::getData ( )

Return the pagination data object, only creating it if it doesn't already exist.

Returns
object Pagination data object.
Since
11.1
VmPagination::getLimitBox (   $sequence = 0)
VmPagination::getListFooter (   $lbox = true)

Return the pagination footer.

Returns
string Pagination footer.
Since
11.1
VmPagination::getPagesCounter ( )

Create and return the pagination pages counter string, ie. Page 2 of 4.

Returns
string Pagination pages counter string.
Since
11.1
VmPagination::getPagesLinks ( )

Create and return the pagination page list string, ie. Previous, Next, 1 2 3 ... x.

Returns
string Pagination page list string.
Since
11.1
VmPagination::getResultsCounter ( )

Create and return the pagination result set counter string, e.g. Results 1-10 of 42

Returns
string Pagination result set counter string.
Since
11.1
VmPagination::getRowOffset (   $index)

Return the rationalised offset for a row with a given index.

Parameters
integer$indexThe row index
Returns
integer Rationalised offset for a row with a given index.
Since
11.1
VmPagination::orderDownIcon (   $i,
  $n,
  $condition = true,
  $task = 'orderdown',
  $alt = 'JLIB_HTML_MOVE_DOWN',
  $enabled = true,
  $checkbox = 'cb' 
)

Return the icon to move an item DOWN.

Parameters
integer$iThe row index.
integer$nThe number of items in the list.
boolean$conditionTrue to show the icon.
string$taskThe task to fire.
string$altThe image alternative text string.
boolean$enabledAn optional setting for access control on the action.
string$checkboxAn optional prefix for checkboxes.
Returns
string Either the icon to move an item down or a space.
Since
11.1
VmPagination::orderUpIcon (   $i,
  $condition = true,
  $task = 'orderup',
  $alt = 'JLIB_HTML_MOVE_UP',
  $enabled = true,
  $checkbox = 'cb' 
)

Return the icon to move an item UP.

Parameters
integer$iThe row index.
boolean$conditionTrue to show the icon.
string$taskThe task to fire.
string$altThe image alternative text string.
boolean$enabledAn optional setting for access control on the action.
string$checkboxAn optional prefix for checkboxes.
Returns
string Either the icon to move an item up or a space.
Since
11.1
VmPagination::setSequence (   $sequence)

Creates a dropdown box for selecting how many records to show per page. Modification of Joomla Core libraries/html/pagination.php getLimitBox function The function uses as sequence a generic function or a sequence configured in the vmconfig

use in a view.html.php $vmModel->setPerRow($perRow); to activate it

Author
Joe Motacek (Cleanshooter)
Max Milbers
Returns
string The HTML for the limit # input box.
Since
11.1
VmPagination::vmOrderDownIcon (   $i,
  $ordering,
  $n,
  $condition = true,
  $task = 'orderdown',
  $alt = 'JLIB_HTML_MOVE_DOWN',
  $enabled = true,
  $checkbox = 'cb' 
)

Return the icon to move an item DOWN.

Parameters
integer$iThe row index.
integer$nThe number of items in the list.
boolean$conditionTrue to show the icon.
string$taskThe task to fire.
string$altThe image alternative text string.
boolean$enabledAn optional setting for access control on the action.
string$checkboxAn optional prefix for checkboxes.
Returns
string Either the icon to move an item down or a space.
Since
11.1
VmPagination::vmOrderUpIcon (   $i,
  $ordering = true,
  $task = 'orderup',
  $alt = 'JLIB_HTML_MOVE_UP',
  $enabled = true,
  $checkbox = 'cb' 
)

Return the icon to move an item UP.

Parameters
integer$iThe row index.
boolean$conditionTrue to show the icon.
string$taskThe task to fire.
string$altThe image alternative text string.
boolean$enabledAn optional setting for access control on the action.
string$checkboxAn optional prefix for checkboxes.
Returns
string Either the icon to move an item up or a space.
Since
11.1

Member Data Documentation

VmPagination::$_additionalUrlParams = array()
protected
VmPagination::$_perRow = 5
private
VmPagination::$_viewall = false
protected
VmPagination::$limit = null
VmPagination::$limitstart = null
VmPagination::$prefix = null
VmPagination::$total = null

The documentation for this class was generated from the following file: