CrudMenuItem
in package
implements
MenuItemInterface
Uses
MenuItemTrait
FinalYes
Tags
Table of Contents
Interfaces
Properties
Methods
- __construct() : mixed
- getAsDto() : MenuItemDto
- setAction() : self
- setBadge() : self
- setController() : self
- setCssClass() : self
- setDefaultSort() : self
- setEntityId() : self
- setLinkRel() : self
- setLinkTarget() : self
- setPermission() : self
- setQueryParameter() : self
- setTranslationParameters() : self
Properties
$dto
private
MenuItemDto
$dto
Methods
__construct()
public
__construct(TranslatableInterface|string $label, string|null $icon, string $entityFqcn) : mixed
Parameters
- $label : TranslatableInterface|string
- $icon : string|null
- $entityFqcn : string
getAsDto()
public
getAsDto() : MenuItemDto
Return values
MenuItemDtosetAction()
public
setAction(string $actionName) : self
Parameters
- $actionName : string
Return values
selfsetBadge()
public
setBadge(mixed $content[, string $style = 'secondary' ]) : self
Parameters
- $content : mixed
-
This is rendered as the value of the badge; it can be anything that can be cast to a string (numbers, stringable objects, etc.)
- $style : string = 'secondary'
-
Pass one of these values for predefined styles: 'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'light', 'dark' Otherwise, the passed value is applied "as is" to the
style
attribute of the HTML element of the badge
Return values
selfsetController()
public
setController(string $controllerFqcn) : self
Parameters
- $controllerFqcn : string
Return values
selfsetCssClass()
public
setCssClass(string $cssClass) : self
Parameters
- $cssClass : string
Return values
selfsetDefaultSort()
public
setDefaultSort(array<string|int, mixed> $sortFieldsAndOrder) : self
Parameters
- $sortFieldsAndOrder : array<string|int, mixed>
-
['fieldName' => 'ASC|DESC', ...]
Return values
selfsetEntityId()
public
setEntityId(mixed $entityId) : self
Parameters
- $entityId : mixed
Return values
selfsetLinkRel()
public
setLinkRel(string $rel) : self
Parameters
- $rel : string
Return values
selfsetLinkTarget()
public
setLinkTarget(string $target) : self
Parameters
- $target : string
Return values
selfsetPermission()
public
setPermission(string $permission) : self
Parameters
- $permission : string
Return values
selfsetQueryParameter()
public
setQueryParameter(string $parameterName, mixed $parameterValue) : self
Parameters
- $parameterName : string
- $parameterValue : mixed
Return values
selfsetTranslationParameters()
public
setTranslationParameters(array<string|int, mixed> $parameters) : self
Parameters
- $parameters : array<string|int, mixed>