Action
Action
Action
- Full name: \Gibbon\Tables\Action
- Parent class: \Gibbon\Forms\Layout\WebLink
Methods
- __construct — Create a generic form element that only holds content.
- setURL — Sets the internal url for this action.
- setLabel — Sets the action label, displayed on hover.
- getLabel — Gets the action label.
- displayLabel — Display the action label as text next to the icon.
- setIcon — Set the icon name, without any path or filetype
- getIcon — Gets the action icon.
- isModal — Load the action URL in a modal window rather than loading a new page. Commonly used for delete actions.
- isDirect — The action link will not prepend an index.php?q=
- getOutput — Renders the action as an icon and url, adding in any nessesary url parameters.
Inherited from Element
Inherited from WebLink
- onClick
- setURL
- getURL
- setTarget
- getTarget
- setRel
- getRel
- addConfirmation
- addParam
- addParams
- addEmbeddedElement
- setEmbeddedElements
- getEmbeddedElements
Inherited from Element
Inherited from BasicAttributesTrait
- setID
- getID
- setTitle
- getTitle
- setClass
- addClass
- removeClass
- getClass
- addData
- getData
- getAttributeString
__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