Action

Action

Action

Methods

Inherited from Element
Inherited from Element
Inherited from BasicAttributesTrait

__construct

Create a generic form element that only holds content.

Action::__construct( $name, $label = '' )

setURL

Sets the internal url for this action.

Action::setURL( string $url ): self

Returns Self: This method can be chained.


setLabel

Sets the action label, displayed on hover.

Action::setLabel( string $label ): self

Returns Self: This method can be chained.


getLabel

Gets the action label.

Action::getLabel( ): string

Return Value: string


displayLabel

Display the action label as text next to the icon.

Action::displayLabel( boolean $value = true ): self

Returns Self: This method can be chained.


setIcon

Set the icon name, without any path or filetype

Action::setIcon( string $icon ): self

Returns Self: This method can be chained.


getIcon

Gets the action icon.

Action::getIcon( ): string

Return Value: string


isModal

Load the action URL in a modal window rather than loading a new page. Commonly used for delete actions.

Action::isModal( $width = 650, $height = 650 ): self

Returns Self: This method can be chained.


isDirect

The action link will not prepend an index.php?q=

Action::isDirect( ): self

Returns Self: This method can be chained.


getOutput

Renders the action as an icon and url, adding in any nessesary url parameters.

Action::getOutput( array &$data = array(), array $params = array() ): string

Return Value: string


Last updated : September 15, 2018 b92362d