Beta version

class NodePaginator extends Paginator

A paginator class to filter node entities with limit and search.

This class add some translation and security filters

Methods

__construct(EntityManager $em, string $entityName, integer $itemPerPages = 10, array $criteria = array())

No description

from Paginator
string
getSearchPattern()

No description

from Paginator
$this
setSearchPattern(string $searchPattern)

No description

from Paginator
int
getTotalCount()

Return total entities count for given criteria.

int
getPageCount()

Return page count according to criteria.

from Paginator
array
findByAtPage(array $order = array(), integer $page = 1)

Return entities filtered for current page.

array
searchByAtPage(array $order = array(), integer $page = 1)

Use a search query to paginate instead of a findBy.

from Paginator
$this
setItemsPerPage(integer $itemsPerPage)

No description

from Paginator
integer
getItemsPerPage()

No description

from Paginator
AuthorizationChecker
getAuthorizationChecker()

No description

$this
setAuthorizationChecker(AuthorizationChecker $authorizationChecker = null)

No description

getTranslation()

No description

$this
setTranslation(Translation $newtranslation = null)

No description

boolean
getPreview()

Gets the value of preview.

setPreview(boolean $preview)

Sets the value of preview.

Details

in Paginator at line 53
__construct(EntityManager $em, string $entityName, integer $itemPerPages = 10, array $criteria = array())

Parameters

EntityManager $em Entity manager
string $entityName Full qualified entity classname
integer $itemPerPages Item par pages
array $criteria Force selection criteria

in Paginator at line 75
string getSearchPattern()

Return Value

string

in Paginator at line 85
$this setSearchPattern(string $searchPattern)

Parameters

string $searchPattern

Return Value

$this

at line 113
int getTotalCount()

Return total entities count for given criteria.

Return Value

int

in Paginator at line 119
int getPageCount()

Return page count according to criteria.

Warning : EntityRepository must implements countBy method

Return Value

int

at line 92
array findByAtPage(array $order = array(), integer $page = 1)

Return entities filtered for current page.

Parameters

array $order
integer $page

Return Value

array

in Paginator at line 155
array searchByAtPage(array $order = array(), integer $page = 1)

Use a search query to paginate instead of a findBy.

Parameters

array $order
integer $page

Return Value

array

in Paginator at line 172
$this setItemsPerPage(integer $itemsPerPage)

Parameters

integer $itemsPerPage

Return Value

$this

in Paginator at line 181
integer getItemsPerPage()

Return Value

integer $itemsPerPage

at line 49
AuthorizationChecker getAuthorizationChecker()

Return Value

AuthorizationChecker

at line 58
$this setAuthorizationChecker(AuthorizationChecker $authorizationChecker = null)

Parameters

AuthorizationChecker $authorizationChecker

Return Value

$this

at line 68
Translation getTranslation()

Return Value

Translation

at line 77
$this setTranslation(Translation $newtranslation = null)

Parameters

Translation $newtranslation

Return Value

$this

at line 138
boolean getPreview()

Gets the value of preview.

Return Value

boolean

at line 150
NodePaginator setPreview(boolean $preview)

Sets the value of preview.

Parameters

boolean $preview the preview

Return Value

NodePaginator