Documentation

Action
in package

FinalYes
Tags
author

Javier Eguiluz javier.eguiluz@gmail.com

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

$dto  : ActionDto

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'

INDEX

public mixed INDEX = 'index'

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

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
self

createAsBatchAction()

public createAsBatchAction() : self
Return values
self

createAsGlobalAction()

public createAsGlobalAction() : self
Return values
self

displayAsButton()

public displayAsButton() : self
Return values
self
public displayAsLink() : self
Return values
self

displayIf()

public displayIf(callable $callable) : self
Parameters
$callable : callable
Return values
self

linkToCrudAction()

public linkToCrudAction(string $crudActionName) : self
Parameters
$crudActionName : string
Return values
self

linkToRoute()

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
self

linkToUrl()

public linkToUrl(mixed $url) : self
Parameters
$url : mixed
Return values
self

new()

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
self

setCssClass()

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
self

setHtmlAttributes()

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

setIcon()

public setIcon(string|null $icon) : self
Parameters
$icon : string|null
Return values
self

setLabel()

public setLabel(mixed $label) : self
Parameters
$label : mixed

Use FALSE to hide the label; use NULL to autogenerate it

Return values
self

setTemplatePath()

public setTemplatePath(string $templatePath) : self
Parameters
$templatePath : string
Return values
self

setTranslationParameters()

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

humanizeString()

private static humanizeString(string $string) : string
Parameters
$string : string
Return values
string

        
On this page

Search results