Documentation

Crud
in package

Tags
author

Javier Eguiluz javier.eguiluz@gmail.com

Table of Contents

Constants

LAYOUT_CONTENT_DEFAULT  = 'normal'
LAYOUT_CONTENT_FULL  = 'full'
LAYOUT_SIDEBAR_COMPACT  = 'compact'
LAYOUT_SIDEBAR_DEFAULT  = 'normal'
PAGE_DETAIL  = 'detail'
PAGE_EDIT  = 'edit'
PAGE_INDEX  = 'index'
PAGE_NEW  = 'new'

Properties

$dto  : CrudDto
$paginatorFetchJoinCollection  : bool
$paginatorPageSize  : int
$paginatorRangeSize  : int
$paginatorUseOutputWalkers  : bool|null

Methods

addFormTheme()  : self
getAsDto()  : CrudDto
new()  : self
overrideTemplate()  : self
overrideTemplates()  : self
Format: ['templateName' => 'templatePath', ...].
renderContentMaximized()  : self
renderSidebarMinimized()  : self
setAutofocusSearch()  : self
setDateFormat()  : self
setDateIntervalFormat()  : self
setDateTimeFormat()  : self
setDefaultSort()  : self
setEntityLabelInPlural()  : self
setEntityLabelInSingular()  : self
setEntityPermission()  : self
setFilters()  : self
setFormOptions()  : self
setFormThemes()  : self
setHelp()  : self
setNumberFormat()  : self
setPageTitle()  : self
setPaginatorFetchJoinCollection()  : self
setPaginatorPageSize()  : self
setPaginatorRangeSize()  : self
setPaginatorUseOutputWalkers()  : self
setSearchFields()  : self
setTimeFormat()  : self
setTimezone()  : self
showEntityActionsInlined()  : self
__construct()  : mixed
getValidPageNames()  : array<string|int, mixed>

Constants

LAYOUT_CONTENT_DEFAULT

public mixed LAYOUT_CONTENT_DEFAULT = 'normal'

LAYOUT_CONTENT_FULL

public mixed LAYOUT_CONTENT_FULL = 'full'

LAYOUT_SIDEBAR_COMPACT

public mixed LAYOUT_SIDEBAR_COMPACT = 'compact'

LAYOUT_SIDEBAR_DEFAULT

public mixed LAYOUT_SIDEBAR_DEFAULT = 'normal'

PAGE_DETAIL

public mixed PAGE_DETAIL = 'detail'

PAGE_EDIT

public mixed PAGE_EDIT = 'edit'

PAGE_INDEX

public mixed PAGE_INDEX = 'index'

PAGE_NEW

public mixed PAGE_NEW = 'new'

Properties

$paginatorFetchJoinCollection

private bool $paginatorFetchJoinCollection = true

$paginatorPageSize

private int $paginatorPageSize = 20

$paginatorRangeSize

private int $paginatorRangeSize = 3

$paginatorUseOutputWalkers

private bool|null $paginatorUseOutputWalkers = null

Methods

addFormTheme()

public addFormTheme(string $themePath) : self
Parameters
$themePath : string
Return values
self

new()

public static new() : self
Return values
self

overrideTemplate()

public overrideTemplate(string $templateName, string $templatePath) : self
Parameters
$templateName : string
$templatePath : string
Return values
self

overrideTemplates()

Format: ['templateName' => 'templatePath', ...].

public overrideTemplates(array<string|int, mixed> $templateNamesAndPaths) : self
Parameters
$templateNamesAndPaths : array<string|int, mixed>
Return values
self

renderContentMaximized()

public renderContentMaximized([bool $maximized = true ]) : self
Parameters
$maximized : bool = true
Return values
self

renderSidebarMinimized()

public renderSidebarMinimized([bool $minimized = true ]) : self
Parameters
$minimized : bool = true
Return values
self

setAutofocusSearch()

public setAutofocusSearch([bool $autofocusSearch = true ]) : self
Parameters
$autofocusSearch : bool = true
Return values
self

setDateFormat()

public setDateFormat(string $formatOrPattern) : self
Parameters
$formatOrPattern : string

A format name ('short', 'medium', 'long', 'full') or a valid ICU Datetime Pattern (see https://unicode-org.github.io/icu/userguide/format_parse/datetime/)

Return values
self

setDateIntervalFormat()

public setDateIntervalFormat(string $format) : self
Parameters
$format : string
Return values
self

setDateTimeFormat()

public setDateTimeFormat(string $dateFormatOrPattern[, string $timeFormat = DateTimeField::FORMAT_NONE ]) : self
Parameters
$dateFormatOrPattern : string

A format name ('none', 'short', 'medium', 'long', 'full') or a valid ICU Datetime Pattern (see https://unicode-org.github.io/icu/userguide/format_parse/datetime/)

$timeFormat : string = DateTimeField::FORMAT_NONE

A format name ('none', 'short', 'medium', 'long', 'full')

Return values
self

setDefaultSort()

public setDefaultSort(array<string|int, mixed> $sortFieldsAndOrder) : self
Parameters
$sortFieldsAndOrder : array<string|int, mixed>

['fieldName' => 'ASC|DESC', ...]

Return values
self

setEntityLabelInPlural()

public setEntityLabelInPlural(TranslatableInterface|string|callable $label) : self
Parameters
$label : TranslatableInterface|string|callable

The callable signature is: fn ($entityInstance, $pageName): string

Tags
psalm-param

mixed $label

Return values
self

setEntityLabelInSingular()

public setEntityLabelInSingular(TranslatableInterface|string|callable $label) : self
Parameters
$label : TranslatableInterface|string|callable

The callable signature is: fn ($entityInstance, $pageName): string

Tags
psalm-param

mixed $label

Return values
self

setEntityPermission()

public setEntityPermission(string $permission) : self
Parameters
$permission : string
Return values
self

setFormOptions()

public setFormOptions(array<string|int, mixed> $newFormOptions[, array<string|int, mixed>|null $editFormOptions = null ]) : self
Parameters
$newFormOptions : array<string|int, mixed>
$editFormOptions : array<string|int, mixed>|null = null
Return values
self

setFormThemes()

public setFormThemes(array<string|int, mixed> $themePaths) : self
Parameters
$themePaths : array<string|int, mixed>
Return values
self

setNumberFormat()

public setNumberFormat(string $format) : self
Parameters
$format : string
Return values
self

setPageTitle()

public setPageTitle(string $pageName, TranslatableInterface|string|callable $title) : self
Parameters
$pageName : string
$title : TranslatableInterface|string|callable

The callable signature is: fn ($entityInstance): string

Tags
psalm-param

mixed $title

Return values
self

setPaginatorFetchJoinCollection()

public setPaginatorFetchJoinCollection(bool $fetchJoinCollection) : self
Parameters
$fetchJoinCollection : bool
Return values
self

setPaginatorPageSize()

public setPaginatorPageSize(int $maxResultsPerPage) : self
Parameters
$maxResultsPerPage : int
Return values
self

setPaginatorRangeSize()

public setPaginatorRangeSize(int $maxPagesOnEachSide) : self
Parameters
$maxPagesOnEachSide : int
Return values
self

setPaginatorUseOutputWalkers()

public setPaginatorUseOutputWalkers(bool $useOutputWalkers) : self
Parameters
$useOutputWalkers : bool
Return values
self

setSearchFields()

public setSearchFields(array<string|int, mixed>|null $fieldNames) : self
Parameters
$fieldNames : array<string|int, mixed>|null
Return values
self

setTimeFormat()

public setTimeFormat(string $formatOrPattern) : self
Parameters
$formatOrPattern : string

A format name ('short', 'medium', 'long', 'full') or a valid ICU Datetime Pattern (see https://unicode-org.github.io/icu/userguide/format_parse/datetime/)

Return values
self

setTimezone()

public setTimezone(string $timezoneId) : self
Parameters
$timezoneId : string
Return values
self

showEntityActionsInlined()

public showEntityActionsInlined([bool $showInlined = true ]) : self
Parameters
$showInlined : bool = true
Return values
self

getValidPageNames()

private getValidPageNames() : array<string|int, mixed>
Return values
array<string|int, mixed>

        
On this page

Search results