class EntityListManager (View source)

Perform basic filtering and search over entity listings.

Constants

ITEM_PER_PAGE

Properties

protected null|Request $request
protected EntityManager|null $_em
protected string $entityName
protected Paginator $paginator
protected bool $pagination
protected array|null $orderingArray
protected array|null $filteringArray
protected array|null $queryArray
protected string|null $searchPattern
protected int|null $currentPage
protected array|null $assignation
protected int|null $itemPerPage
protected Translation|null $translation
protected AuthorizationChecker|null $authorizationChecker
protected bool $preview

Methods

__construct(Request $request, EntityManager $_em, string $entityName, array $preFilters = [], array $preOrdering = [])

No description

$this
enablePagination()

No description

getTranslation()

No description

$this
setTranslation(Translation $newtranslation = null)

No description

AuthorizationChecker
getAuthorizationChecker()

No description

$this
setAuthorizationChecker(AuthorizationChecker $authorizationChecker = null)

No description

void
handle(boolean $disabled = false)

Handle request to find filter to apply to entity listing.

$this
setPage(integer $page)

Configure a custom current page.

$this
disablePagination()

No description

createPaginator()

No description

array
getAssignation()

Get Twig assignation to render list details.

int
getItemCount()

No description

float|int
getPageCount()

No description

array|Paginator
getEntities()

Return filtered entities.

boolean
isPreview()

Gets the value of preview.

setPreview(boolean $preview)

Sets the value of preview.

int
getItemPerPage()

No description

$this
setItemPerPage(integer $itemPerPage)

Configure a custom item count per page.

int
getPage()

No description

Details

__construct(Request $request, EntityManager $_em, string $entityName, array $preFilters = [], array $preOrdering = [])

Parameters

Request $request
EntityManager $_em
string $entityName
array $preFilters
array $preOrdering

$this enablePagination()

Return Value

$this

Translation getTranslation()

Return Value

Translation

$this setTranslation(Translation $newtranslation = null)

Parameters

Translation $newtranslation

Return Value

$this

AuthorizationChecker getAuthorizationChecker()

Return Value

AuthorizationChecker

$this setAuthorizationChecker(AuthorizationChecker $authorizationChecker = null)

Parameters

AuthorizationChecker $authorizationChecker

Return Value

$this

void handle(boolean $disabled = false)

Handle request to find filter to apply to entity listing.

Parameters

boolean $disabled Disable pagination and filtering over GET params

Return Value

void

$this setPage(integer $page)

Configure a custom current page.

Parameters

integer $page

Return Value

$this

$this disablePagination()

Return Value

$this

protected createPaginator()

array getAssignation()

Get Twig assignation to render list details.

** Fields:

  • description [string]
  • search [string]
  • currentPage [int]
  • pageCount [int]
  • itemPerPage [int]
  • itemCount [int]
  • previousPage [int]
  • nextPage [int]
  • nextPageQuery [string]
  • previousPageQuery [string]
  • previousQueryArray [array]
  • nextQueryArray [array]

Return Value

array

int getItemCount()

Return Value

int

float|int getPageCount()

Return Value

float|int

array|Paginator getEntities()

Return filtered entities.

Return Value

array|Paginator

boolean isPreview()

Gets the value of preview.

Return Value

boolean

EntityListManager setPreview(boolean $preview)

Sets the value of preview.

Parameters

boolean $preview the preview

Return Value

EntityListManager

int getItemPerPage()

Return Value

int

$this setItemPerPage(integer $itemPerPage)

Configure a custom item count per page.

Parameters

integer $itemPerPage

Return Value

$this

int getPage()

Return Value

int