Documentation

Actions
in package

FinalYes
Tags
author

Javier Eguiluz javier.eguiluz@gmail.com

Table of Contents

Properties

$dto  : ActionConfigDto

Methods

add()  : self
addBatchAction()  : self
disable()  : self
getAsDto()  : ActionConfigDto
new()  : self
remove()  : self
reorder()  : self
set()  : self
setPermission()  : self
setPermissions()  : self
update()  : self
__construct()  : mixed
createBuiltInAction()  : Action
The $pageName is needed because sometimes the same action has different config depending on where it's displayed (to display an icon in 'detail' but not in 'index', etc.).
doAddAction()  : self

Properties

Methods

add()

public add(string $pageName, Action|string $actionNameOrObject) : self
Parameters
$pageName : string
$actionNameOrObject : Action|string
Return values
self

addBatchAction()

public addBatchAction(Action|string $actionNameOrObject) : self
Parameters
$actionNameOrObject : Action|string
Return values
self

disable()

public disable(string ...$disabledActionNames) : self
Parameters
$disabledActionNames : string
Return values
self

new()

public static new() : self
Return values
self

remove()

public remove(string $pageName, string $actionName) : self
Parameters
$pageName : string
$actionName : string
Return values
self

reorder()

public reorder(string $pageName, array<string|int, mixed> $orderedActionNames) : self
Parameters
$pageName : string
$orderedActionNames : array<string|int, mixed>
Return values
self

set()

public set(string $pageName, Action|string $actionNameOrObject) : self
Parameters
$pageName : string
$actionNameOrObject : Action|string
Return values
self

setPermission()

public setPermission(string $actionName, string $permission) : self
Parameters
$actionName : string
$permission : string
Return values
self

setPermissions()

public setPermissions(array<string|int, mixed> $permissions) : self
Parameters
$permissions : array<string|int, mixed>

Syntax: ['actionName' => 'actionPermission', ...]

Return values
self

update()

public update(string $pageName, string $actionName, callable $callable) : self
Parameters
$pageName : string
$actionName : string
$callable : callable
Return values
self

createBuiltInAction()

The $pageName is needed because sometimes the same action has different config depending on where it's displayed (to display an icon in 'detail' but not in 'index', etc.).

private createBuiltInAction(string $pageName, string $actionName) : Action
Parameters
$pageName : string
$actionName : string
Return values
Action

doAddAction()

private doAddAction(string $pageName, Action|string $actionNameOrObject[, bool $isBatchAction = false ]) : self
Parameters
$pageName : string
$actionNameOrObject : Action|string
$isBatchAction : bool = false
Return values
self

        
On this page

Search results