IElementAction

Type
Interface
Namespace
Craft
Extends
Craft\IComponentType
Implemented by
Craft\BaseElementAction, Craft\CopyReferenceTagElementAction, Craft\DeleteAssetsElementAction, Craft\DeleteElementAction, Craft\DeleteUsersElementAction, Craft\DownloadFileElementAction, Craft\EditElementAction, Craft\NewChildElementAction, Craft\RenameFileElementAction, Craft\ReplaceFileElementAction, Craft\SetStatusElementAction, Craft\SuspendUsersElementAction, Craft\UnsuspendUsersElementAction, Craft\ViewElementAction
Since
2.3

Interface IElementAction

See also http://craftcms.com

View source

Public Methods

MethodDescription
getClassHandle()Returns the component’s handle, ideally based on the class name.
getConfirmationMessage()Returns a confirmation message that should be displayed before the action is performed.
getMessage()Returns the message that should be displayed to the user after the action is performed.
getName()Returns the component’s name.
getParams()Returns the action’s params model.
getTriggerHtml()Returns the action’s trigger HTML.
isDestructive()Returns whether this action is destructive in nature.
isSelectable()Returns whether this component should be shown when the user is creating a component of this type.
performAction()Performs the action on any elements that match the given criteria.
setParams()Sets the param values.

getConfirmationMessage()

Returns a confirmation message that should be displayed before the action is performed.

View source

Returns

string, null – The confirmation message, if any.

Signature

public abstract string, null getConfirmationMessage ( )

getMessage()

Returns the message that should be displayed to the user after the action is performed.

View source

Returns

string, null – The message that should be displayed to the user.

Signature

public abstract string, null getMessage ( )

getParams()

Returns the action’s params model.

View source

Returns

Craft\BaseModel – The action’s params model.

Signature

public abstract Craft\BaseModel getParams ( )

getTriggerHtml()

Returns the action’s trigger HTML.

View source

Returns

string, null – The action’s trigger HTML.

Signature

public abstract string, null getTriggerHtml ( )

isDestructive()

Returns whether this action is destructive in nature.

View source

Returns

boolean – Whether this action is destructive in nature.

Signature

public abstract boolean isDestructive ( )

performAction()

Performs the action on any elements that match the given criteria.

View source

Arguments

Returns

boolean – Whether the action was performed successfully.

Signature

public abstract boolean performAction ( Craft\ElementCriteriaModel $criteria )

setParams()

Sets the param values. The values may come as a key/value array, or a {@link BaseModel} object. Either way, this method should store the values on the model that is returned by {@link getParams()}.

View source

Arguments

Returns

null

Signature

public abstract null setParams ( $values )