Beta version

class NodesSourcesPaginator extends Paginator

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

This class add authorizationChecker 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
ArrayCollection
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

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 66
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 93
ArrayCollection findByAtPage(array $order = array(), integer $page = 1)

Return entities filtered for current page.

Parameters

array $order
integer $page

Return Value

ArrayCollection

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 47
AuthorizationChecker getAuthorizationChecker()

Return Value

AuthorizationChecker

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

Parameters

AuthorizationChecker $authorizationChecker

Return Value

$this

at line 115
boolean getPreview()

Gets the value of preview.

Return Value

boolean

at line 127
NodesSourcesPaginator setPreview(boolean $preview)

Sets the value of preview.

Parameters

boolean $preview the preview

Return Value

NodesSourcesPaginator