Class ItemList

Methods summary

public
# enableStickySearchRequest( $namespace = false )
public
public
protected
# getStickySearchNameSpace( $namespace = '' )
public
# resetSearchRequest( $namespace = '' )
public
# addToSearchRequest( $key, $value )
public
public
# setItemsPerPage( $num )
public
public
# setItems( $items )
protected
public
# setNameSpace( $ns )
public
# getTotal( )

Returns the total number of items found by this list

public
# getPage( $page = false )

Returns an array of object by "page"

public
# get( $itemsToGet = 0, $offset = 0 )
protected
# setCurrentPage( $page = false )
public
# displaySummary( $right_content = '' )

Displays summary text about a list

public
public
# getSortByURL( $column, $dir = 'asc', $baseURL = false, $additionalVars = array() )
public
# isActiveSortColumn( $column )
public
public
public
public
# getPagination( $url = false, $additionalVars = array() )
public
# displayPagingV2( $script = false, $return = false, $additionalVars = array() )

Gets paging that works in our new format

public
# displayPaging( $script = false, $return = false, $additionalVars = array() )

Gets standard HTML to display paging

public
# getSummary( )

Returns an object with properties useful for paging

public
# sortBy( string $column, string $direction = 'asc' )

Sets column to sort by. Only supports a single column; for multiple columns us sortByMultiple()

public
public
public
# sortByMultiple( )

Sets up a multiple columns to search by. Each argument is taken "as-is" (including asc or desc) and concatenated with commas Note that this is overrides any previous sortByMultiple() call, and all sortBy() calls. Alternatively, you can pass a single array with multiple columns to sort by as its values. e.g. $list->sortByMultiple('columna desc', 'columnb asc'); or $list->sortByMultiple(array('columna desc', 'columnb asc'));

Properties summary

protected integer $total
# -1
protected integer $itemsPerPage
# 20
protected boolean $currentPage
# false
protected integer $start
# 0
protected $sortBy
#
protected $sortByDirection
#
protected $queryStringPagingVariable
#
protected string $queryStringSortVariable
# 'ccm_order_by'
protected string $queryStringSortDirectionVariable
# 'ccm_order_dir'
protected boolean $enableStickySearchRequest
# false
protected string $stickySearchRequestNameSpace
# ''
protected array $items
# array()