Bristol SU Support Package
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
BristolSU\Support\Action\Contracts\Action Class Reference
Inheritance diagram for BristolSU\Support\Action\Contracts\Action:
Inheritance graph
[legend]
Collaboration diagram for BristolSU\Support\Action\Contracts\Action:
Collaboration graph
[legend]

Public Member Functions

 __construct (array $data=[])
 
 handle ()
 
 getResponse ()
 
 option (string $key, $default=null)
 
 getData ()
 
 run ()
 
- Public Member Functions inherited from BristolSU\Support\Action\History\RecordsHistory
 setActionInstanceId (int $actionInstanceId)
 
 setEventFields (array $eventFields)
 
 setSettings (array $settings)
 
 saveHistory (ActionResponse $response)
 

Static Public Member Functions

static options ()
 

Private Attributes

 $data
 
 $response
 

Detailed Description

Represents a queueable action.

Definition at line 17 of file Action.php.

Constructor & Destructor Documentation

◆ __construct()

BristolSU\Support\Action\Contracts\Action::__construct ( array  $data = [])

Member Function Documentation

◆ getData()

BristolSU\Support\Action\Contracts\Action::getData ( )

Get all setting values

Returns
array

Definition at line 87 of file Action.php.

References BristolSU\Support\Action\Contracts\Action\$data, and BristolSU\Support\Action\Contracts\Action\run().

◆ getResponse()

BristolSU\Support\Action\Contracts\Action::getResponse ( )

Get the response as given by the action after running

Returns
ActionResponse|null

Definition at line 62 of file Action.php.

References BristolSU\Support\Action\Contracts\Action\$response.

Referenced by BristolSU\Support\Action\Contracts\Action\handle().

◆ handle()

BristolSU\Support\Action\Contracts\Action::handle ( )

◆ option()

BristolSU\Support\Action\Contracts\Action::option ( string  $key,
  $default = null 
)

Get a piece of information from the settings

Parameters
string$key
null$default
Returns
mixed|null

Definition at line 74 of file Action.php.

Referenced by BristolSU\Support\Action\Actions\Log\run().

◆ options()

static BristolSU\Support\Action\Contracts\Action::options ( )
staticabstract

A form schema describing the settings the actions need

Any options here will be shown to the user on setup. The results will be passed into the construct of this class.

Returns
Form

Referenced by BristolSU\Support\Action\Contracts\Action\__construct().

◆ run()

BristolSU\Support\Action\Contracts\Action::run ( )
abstract

Member Data Documentation

◆ $data

BristolSU\Support\Action\Contracts\Action::$data
private

◆ $response

BristolSU\Support\Action\Contracts\Action::$response
private

Definition at line 29 of file Action.php.

Referenced by BristolSU\Support\Action\Contracts\Action\getResponse().


The documentation for this class was generated from the following file: