Action
in package
Tags
Table of Contents
Constants
- BATCH_DELETE = 'batchDelete'
- DELETE = 'delete'
- DETAIL = 'detail'
- EDIT = 'edit'
- INDEX = 'index'
- NEW = 'new'
- SAVE_AND_ADD_ANOTHER = 'saveAndAddAnother'
- SAVE_AND_CONTINUE = 'saveAndContinue'
- SAVE_AND_RETURN = 'saveAndReturn'
- TYPE_BATCH = 'batch'
- TYPE_ENTITY = 'entity'
- TYPE_GLOBAL = 'global'
Properties
Methods
- __toString() : mixed
- addCssClass() : self
- If you add a custom CSS class, the default CSS classes are not applied.
- createAsBatchAction() : self
- createAsGlobalAction() : self
- displayAsButton() : self
- displayAsLink() : self
- displayIf() : self
- getAsDto() : ActionDto
- linkToCrudAction() : self
- linkToRoute() : self
- linkToUrl() : self
- new() : self
- setCssClass() : self
- If you set your own CSS classes, the default CSS classes are not applied.
- setHtmlAttributes() : self
- setIcon() : self
- setLabel() : self
- setTemplatePath() : self
- setTranslationParameters() : self
- __construct() : mixed
- humanizeString() : string
Constants
BATCH_DELETE
public
mixed
BATCH_DELETE
= 'batchDelete'
DELETE
public
mixed
DELETE
= 'delete'
DETAIL
public
mixed
DETAIL
= 'detail'
EDIT
public
mixed
EDIT
= 'edit'
INDEX
public
mixed
INDEX
= 'index'
NEW
public
mixed
NEW
= 'new'
SAVE_AND_ADD_ANOTHER
public
mixed
SAVE_AND_ADD_ANOTHER
= 'saveAndAddAnother'
SAVE_AND_CONTINUE
public
mixed
SAVE_AND_CONTINUE
= 'saveAndContinue'
SAVE_AND_RETURN
public
mixed
SAVE_AND_RETURN
= 'saveAndReturn'
TYPE_BATCH
public
mixed
TYPE_BATCH
= 'batch'
TYPE_ENTITY
public
mixed
TYPE_ENTITY
= 'entity'
TYPE_GLOBAL
public
mixed
TYPE_GLOBAL
= 'global'
Properties
$dto
private
ActionDto
$dto
Methods
__toString()
public
__toString() : mixed
addCssClass()
If you add a custom CSS class, the default CSS classes are not applied.
public
addCssClass(string $cssClass) : self
You may want to also add the 'btn' (and 'btn-primary', etc.) classes to make your action look like a button.
Parameters
- $cssClass : string
Return values
selfcreateAsBatchAction()
public
createAsBatchAction() : self
Return values
selfcreateAsGlobalAction()
public
createAsGlobalAction() : self
Return values
selfdisplayAsButton()
public
displayAsButton() : self
Return values
selfdisplayAsLink()
public
displayAsLink() : self
Return values
selfdisplayIf()
public
displayIf(callable $callable) : self
Parameters
- $callable : callable
Return values
selfgetAsDto()
public
getAsDto() : ActionDto
Return values
ActionDtolinkToCrudAction()
public
linkToCrudAction(string $crudActionName) : self
Parameters
- $crudActionName : string
Return values
selflinkToRoute()
public
linkToRoute(string $routeName[, array<string|int, mixed>|callable $routeParameters = [] ]) : self
Parameters
- $routeName : string
- $routeParameters : array<string|int, mixed>|callable = []
-
The callable has the signature: function ($entity): array
Route parameters can be defined as a callable with the signature: function ($entityInstance): array Example: ->linkToRoute('invoice_send', fn (Invoice $entity) => ['uuid' => $entity->getId()]);
Return values
selflinkToUrl()
public
linkToUrl(mixed $url) : self
Parameters
- $url : mixed
Return values
selfnew()
public
static new(string $name[, mixed $label = null ][, string|null $icon = null ]) : self
Parameters
- $name : string
- $label : mixed = null
-
Use FALSE to hide the label; use NULL to autogenerate it
- $icon : string|null = null
-
The full CSS classes of the FontAwesome icon to render (see https://fontawesome.com/v6/search?m=free)
Return values
selfsetCssClass()
If you set your own CSS classes, the default CSS classes are not applied.
public
setCssClass(string $cssClass) : self
You may want to also add the 'btn' (and 'btn-primary', etc.) classes to make your action look like a button.
Parameters
- $cssClass : string
Return values
selfsetHtmlAttributes()
public
setHtmlAttributes(array<string|int, mixed> $attributes) : self
Parameters
- $attributes : array<string|int, mixed>
Return values
selfsetIcon()
public
setIcon(string|null $icon) : self
Parameters
- $icon : string|null
Return values
selfsetLabel()
public
setLabel(mixed $label) : self
Parameters
- $label : mixed
-
Use FALSE to hide the label; use NULL to autogenerate it
Return values
selfsetTemplatePath()
public
setTemplatePath(string $templatePath) : self
Parameters
- $templatePath : string
Return values
selfsetTranslationParameters()
public
setTranslationParameters(array<string|int, mixed> $parameters) : self
Parameters
- $parameters : array<string|int, mixed>
Return values
self__construct()
private
__construct(ActionDto $actionDto) : mixed
Parameters
- $actionDto : ActionDto
humanizeString()
private
static humanizeString(string $string) : string
Parameters
- $string : string