PHP Class Newscoop\TemplateList\PaginatedBaseList

Inheritance: extends BaseList
Show file Open project: sourcefabric/newscoop Class Usage Examples

Protected Properties

Property Type Description
$cacheService Newscoop\Services\CacheService
$pageNumber integer
$pageParameterName string
$paginatorService Newscoop\Services\TemplatesService

Public Methods

Method Description
__construct ( Criteria $criteria, TemplatesService $paginatorService, CacheService $cacheService )
getPageNumber ( ) : mixed Gets the value of pageNumber.
getPageParameterName ( ) : mixed Gets the value of pageParameterName.
getPaginator ( ) : Knp\Component\Pager\Paginator Get Paginator instance from PaginatorService
setPageNumber ( mixed $pageNumber = 1 ) : self Sets the value of pageNumber.
setPageParameterName ( mixed $pageParameterName ) : self Sets the value of pageParameterName.

Protected Methods

Method Description
paginateList ( mixed $target, integer $pageNumber, integer $maxResults, ListResult $list = null, boolean $useCache = true ) : ListResult Paginate target and fill list items

Method Details

__construct() public method

public __construct ( Criteria $criteria, TemplatesService $paginatorService, CacheService $cacheService )
$criteria Newscoop\Criteria
$paginatorService Newscoop\Services\TemplatesService
$cacheService Newscoop\Services\CacheService

getPageNumber() public method

Gets the value of pageNumber.
public getPageNumber ( ) : mixed
return mixed

getPageParameterName() public method

Gets the value of pageParameterName.
public getPageParameterName ( ) : mixed
return mixed

getPaginator() public method

Get Paginator instance from PaginatorService
public getPaginator ( ) : Knp\Component\Pager\Paginator
return Knp\Component\Pager\Paginator

paginateList() protected method

Paginate target and fill list items
protected paginateList ( mixed $target, integer $pageNumber, integer $maxResults, ListResult $list = null, boolean $useCache = true ) : ListResult
$target mixed
$pageNumber integer
$maxResults integer
$list Newscoop\ListResult
$useCache boolean
return Newscoop\ListResult

setPageNumber() public method

Sets the value of pageNumber.
public setPageNumber ( mixed $pageNumber = 1 ) : self
$pageNumber mixed the page number
return self

setPageParameterName() public method

Sets the value of pageParameterName.
public setPageParameterName ( mixed $pageParameterName ) : self
$pageParameterName mixed the page parameter name
return self

Property Details

$cacheService protected property

protected CacheService,Newscoop\Services $cacheService
return Newscoop\Services\CacheService

$pageNumber protected property

protected int $pageNumber
return integer

$pageParameterName protected property

protected string $pageParameterName
return string

$paginatorService protected property

protected TemplatesService,Newscoop\Services $paginatorService
return Newscoop\Services\TemplatesService