TableActionHandler
class TableActionHandler extends ActionHandlerHelper
Traits
Constants
| TRIGGER_DEFAULT |
|
| TRIGGER_SELECT_ACTION |
|
| TRIGGER_ROW_ACTION |
|
| TRIGGER_ALL_ACTION |
|
Methods
Bind possible action to trigger
Return actions that are registered in this handler for a specific trigger
No description
Get the selected ids from the table
Do we have a registered Bulk Action?
No description
No description
Which table field contains your selection context? (e.g. id for standard model collection)
Set the ids which are currently selected in table, this is usually done automatically in the table during action processing
Execute Actions
Details
in
ActionHandlerHelper at line 44
ActionHandlerHelper
addAction(ActionHelper $actionHelper, string $trigger = self::TRIGGER_DEFAULT)
Bind possible action to trigger
at line 54
TableActionHandler
addBulkAction(ActionHelper $action)
No description
at line 50
TableActionHandler
addRowAction(ActionHelper $action)
Action for the user per row
at line 65
TableActionHandler
addSelectAction(ActionHelper $action)
Actions for the user based on selected table records
at line 79
TableActionHandler
addSelectAllAction(ActionHelper $action)
Actions valid for all records in the data object
todo: We cannot distinguish between select and bulk in UI currently.. todo: (we should disable actions via JS if ALL records are selected but the operation is not supported and vice versa)
in
ItemListTrait at line 147
int
count()
No description
in
ItemListTrait at line 37
static ItemListTrait
create(ItemInterface ...$items)
No description
in
ItemListTrait at line 96
ItemInterface|null
first()
Get first element
in
ActionHandlerHelper at line 212
string|null
getActionHandlerEndpoint()
No description
in
ActionHandlerHelper at line 178
Collection|null
getCollection()
Return collection if is set
in
ItemListTrait at line 57
array
getItems()
No description
in
ItemListTrait at line 107
ArrayIterator
getIterator()
No description
in
ActionHandlerHelper at line 189
array
getRegisteredActions(string $trigger)
Return actions that are registered in this handler for a specific trigger
at line 38
string
getSelectField()
No description
at line 115
array
getSelectedIds()
Get the selected ids from the table
at line 87
bool
hasBulkAction()
Do we have a registered Bulk Action?
at line 94
bool
hasRowAction()
No description
in
ItemListTrait at line 154
array
jsonSerialize()
No description
in
ItemListTrait at line 88
ItemInterface|null
last()
Return the last element
in
ItemListTrait at line 116
bool
offsetExists($offset)
No description
in
ItemListTrait at line 125
ItemInterface|null
offsetGet($offset)
No description
in
ItemListTrait at line 133
void
offsetSet($offset, $value)
No description
in
ItemListTrait at line 140
void
offsetUnset($offset)
No description
in
ItemListTrait at line 44
int
push(ItemInterface $item)
No description
in
ActionHandlerHelper at line 120
void
sendFeedbackAsFlashMessages()
Send Feedback Messages
in
ActionHandlerHelper at line 204
ActionHandlerHelper
setActionHandlerEndpoint(string|null $actionHandlerEndpoint)
No description
in
ActionHandlerHelper at line 168
CollectionActionHandlerInterface
setCollection(Collection $collection)
Set collection for CollectionActionHelper
in
ItemListTrait at line 66
void
setItems(array $items)
No description
at line 30
TableActionHandler
setSelectField(string $field = 'id')
Which table field contains your selection context? (e.g. id for standard model collection)
at line 105
TableActionHandler
setSelectedIds(array $selectedIds)
Set the ids which are currently selected in table, this is usually done automatically in the table during action processing
in
ItemListTrait at line 74
array
toArray()
Transforms the option into an array.
at line 123
bool|null
triggerAction(string $actionKey = null, string $trigger = self::TRIGGER_DEFAULT)
Execute Actions
in
ItemListTrait at line 49
int
unshift(ItemInterface $item)
No description