Menu

## Action
in package

Action.php : 13

Defines a custom action on a page.

Actions are buttons on a page which execute user definded functions.

### Table of Contents

$btnClass : string
$callback : callable
$data : array<string|int, mixed>
$enabled : string
$faIcon : string
$fieldname : string
$label : string
$onCard : bool
$onList : bool
$onUpdate : bool
$position : string
$value : string
$visible : string
__construct() : Action
  Constructor. Params are basically the properies of this class.
setBtnClass() : Action
  Defines the button appearance. Admin LTE button type. '','default','primary','info','success','danger','warning','accent'. '' = no button, just a link.
setCallback() : Action
  The callback function for the action
setData() : Action
  Additional data which can be set when creatig the action. (Can be accessed in the callback function)
setEnabled() : Action
  Enableds/disables the action
setFaIcon() : Action
  The icon for the button (font awesome icon name)
setFieldname() : Action
  The reference fieldname for setPosition() $position
setLabel() : Action
  The text of the label for the action
setOnCard() : Action
  Show/hide on card pages.
setOnList() : Action
  Show/hide on list pages
setOnUpdate() : Action
  Show/hides on update pages.
setPosition() : Action
  'top','bottom','both', 'before-field', 'after-field', 'to-field'. Use togehter with setFieldname() $fieldname.
setValue() : Action
  The text for the action itselft
setVisible() : Action
  Show/hide on all pages

### Properties

#### $btnClass

Action.php : 35
`public string $btnClass = 'default'`

Defines the button appearance. Admin LTE button type. '','default','primary','info','success','danger','warning','accent'. '' = no button, just a link.

#### $callback

Action.php : 25
`public callable $callback = null`

The function to execute

#### $data

Action.php : 45
`public array<string|int, mixed> $data = []`

Additional data which can be set when creatig the action. (Can be accessed in the callback function)

#### $enabled

Action.php : 41
`public string $enabled = true`

Enableds/disables the action

#### $faIcon

Action.php : 33
`public string $faIcon = ''`

The icon for the button (font awesome icon name)

#### $fieldname

Action.php : 37
`public string $fieldname = ''`

The reference fieldname for setPosition() $position

#### $label

Action.php : 23
`public string $label = ''`

The text of the label for the action

#### $onCard

Action.php : 29
`public bool $onCard = true`

Show/hide on card pages

#### $onList

Action.php : 27
`public bool $onList = true`

Show/hide on list pages

#### $onUpdate

Action.php : 31
`public bool $onUpdate = true`

Show/hide on update pages

#### $position

Action.php : 39
`public string $position = ''`

'top','bottom','both', 'before-field', 'after-field', 'to-field'. Use togehter with setFieldname() $fieldname.

#### $value

Action.php : 21
`public string $value = ''`

The text for the action button itselft

#### $visible

Action.php : 43
`public string $visible = true`

Show/hide on all pages

### Methods

#### __construct()

Action.php : 56

Constructor. Params are basically the properies of this class.

`public __construct(string $value, string $label[, callable $callback = null ][, string $position = 'both' ][, string $fieldname = '' ]) : Action`

##### Parameters

$value : string

  The text for the action button itselft

$label : string

  The text of the label for the action

$callback : callable = null

  The function to execute

$position : string = 'both'

  'top','bottom','both', 'before-field', 'after-field', 'to-field'

$fieldname : string = ''

  reference fieldname for $position

##### Return values

Action —

#### setBtnClass()

Action.php : 113

Defines the button appearance. Admin LTE button type. '','default','primary','info','success','danger','warning','accent'. '' = no button, just a link.

`public setBtnClass([string $btnClass = 'default' ]) : Action`

##### Parameters

$btnClass : string = 'default'

##### Return values

Action —

#### setCallback()

Action.php : 140

The callback function for the action

`public setCallback(callable $callback) : Action`

##### Parameters

$callback : callable

##### Return values

Action —

#### setData()

Action.php : 158

Additional data which can be set when creatig the action. (Can be accessed in the callback function)

`public setData(mixed $data) : Action`

##### Parameters

$data : mixed

##### Return values

Action —

#### setEnabled()

Action.php : 128

Enableds/disables the action

`public setEnabled([bool $enabled = true ]) : Action`

##### Parameters

$enabled : bool = true

##### Return values

Action —

#### setFaIcon()

Action.php : 107

The icon for the button (font awesome icon name)

`public setFaIcon(string $faIcon) : Action`

##### Parameters

$faIcon : string

##### Return values

Action —

#### setFieldname()

Action.php : 152

The reference fieldname for setPosition() $position

`public setFieldname(string $fieldname) : Action`

##### Parameters

$fieldname : string

##### Return values

Action —

#### setLabel()

Action.php : 83

The text of the label for the action

`public setLabel(string $label) : Action`

##### Parameters

$label : string

##### Return values

Action —

#### setOnCard()

Action.php : 95

Show/hide on card pages.

`public setOnCard([bool $onCard = true ]) : Action`

##### Parameters

$onCard : bool = true

##### Return values

Action —

#### setOnList()

Action.php : 89

Show/hide on list pages

`public setOnList([bool $onList = true ]) : Action`

##### Parameters

$onList : bool = true

##### Return values

Action —

#### setOnUpdate()

Action.php : 101

Show/hides on update pages.

`public setOnUpdate([bool $onUpdate = true ]) : Action`

##### Parameters

$onUpdate : bool = true

##### Return values

Action —

#### setPosition()

Action.php : 146

'top','bottom','both', 'before-field', 'after-field', 'to-field'. Use togehter with setFieldname() $fieldname.

`public setPosition(string $position) : Action`

##### Parameters

$position : string

##### Return values

Action —

#### setValue()

Action.php : 77

The text for the action itselft

`public setValue(string $value) : Action`

##### Parameters

$value : string

##### Return values

Action —

#### setVisible()

Action.php : 134

Show/hide on all pages

`public setVisible([bool $visible = true ]) : Action`

##### Parameters

$visible : bool = true

##### Return values

Action —

## Search results