class ModelActionHelper extends ActionHelper

Use this action for actions based on a single model

Traits

Constants

FEEDBACK_SUCCESS

FEEDBACK_ERROR

FEEDBACK_NOTE

FEEDBACK_WARNING

Methods

string
__toString()

No description

static ActionHelper
create(string $key, string $title)

Create Action

static ActionHelper
createFromOption(Option $actionOption)

No description

bool
execute()

No description

expects(string $expectedModelClass)

Which type of model is expected?

I18nTokenHelper|null
getConfirmationQuestion()

No description

I18nTokenHelper|null
getFeedbackMessage(string|null $feedbackType)

No description

bool
getIsDownload()

No description

Model|null
getModel()

No description

getOption()

No description

array
jsonSerialize()

Transforms the array structure of this option into a JSON string.

onExecuteCallback(callable $invokeFn)

No description

setConfirmationQuestion(I18nTokenHelper|null $confirmationText = null)

No description

setFeedbackMessage(I18nTokenHelper $feedbackMessage, string $feedbackType = self::FEEDBACK_SUCCESS)

No description

setIsDownload(bool $isDownload)

No description

setModel(Model $model)

Pass the collection for the actions to be based upon.

array
toArray()

No description

Details

in ActionHelper at line 115
string __toString()

No description

Return Value

string

in ActionHelper at line 41
static ActionHelper create(string $key, string $title)

Create Action

Parameters

string $key
string $title

Return Value

ActionHelper

in ActionHelper at line 51
static ActionHelper createFromOption(Option $actionOption)

No description

Parameters

Option $actionOption

Return Value

ActionHelper

at line 58
bool execute()

No description

Return Value

bool

at line 47
ModelActionHelper expects(string $expectedModelClass)

Which type of model is expected?

Parameters

string $expectedModelClass

Return Value

ModelActionHelper

in ActionHelper at line 64
I18nTokenHelper|null getConfirmationQuestion()

No description

Return Value

I18nTokenHelper|null

in ActionHelper at line 73
I18nTokenHelper|null getFeedbackMessage(string|null $feedbackType)

No description

Parameters

string|null $feedbackType

Return Value

I18nTokenHelper|null

in ActionHelper at line 83
bool getIsDownload()

No description

Return Value

bool

at line 36
Model|null getModel()

No description

Return Value

Model|null

in ActionHelper at line 122
Option getOption()

No description

Return Value

Option

in ItemTrait at line 13
array jsonSerialize()

Transforms the array structure of this option into a JSON string.

Return Value

array

in ActionHelper at line 105
ActionHelper onExecuteCallback(callable $invokeFn)

No description

Parameters

callable $invokeFn

(Actionhelper $actionHelper)

Return Value

ActionHelper

in ActionHelper at line 59
ActionHelper setConfirmationQuestion(I18nTokenHelper|null $confirmationText = null)

No description

Parameters

I18nTokenHelper|null $confirmationText

Return Value

ActionHelper

in ActionHelper at line 68
ActionHelper setFeedbackMessage(I18nTokenHelper $feedbackMessage, string $feedbackType = self::FEEDBACK_SUCCESS)

No description

Parameters

I18nTokenHelper $feedbackMessage
string $feedbackType

Return Value

ActionHelper

in ActionHelper at line 78
ActionHelper setIsDownload(bool $isDownload)

No description

Parameters

bool $isDownload

Return Value

ActionHelper

at line 25
ModelActionHelper setModel(Model $model)

Pass the collection for the actions to be based upon.

The collection will be cloned, further modifications and filters to the original object are not considered

Parameters

Model $model

Return Value

ModelActionHelper

in ActionHelper at line 111
array toArray()

No description

Return Value

array