Menu

## Action
in package
implements Serializable

Action.php : 12

A representation of an action the user can take to affect the game state. An encapsulation of a navigation menu option.

### Interfaces, Classes and Traits

Serializable

### Table of Contents

$destinationSceneId : string
$id : string
$parameters : array<string|int, mixed>
$title : string|null
$viewpoint : Viewpoint|null
__construct() : mixed
  Construct a new action with the specified Scene as its destination.
getDestinationSceneId() : string
  Return the database ID of the destination scene, where the user will go if they take this action.
getId() : string
  Returns the unique, automatically generated identifier for this action.
getParameters() : array<string|int, mixed>
  Returns all parameters for this action.
getRenderedTitle() : string|null
  Returns the rendered action title.
getTitle() : string|null
getViewpoint() : Viewpoint|null
serialize() : mixed
setParameters() : void
  Sets all parameters for this action.
setTitle() : void
setViewpoint() : mixed
unserialize() : mixed

### Properties

#### $destinationSceneId

Action.php : 24
`protected string $destinationSceneId`

#### $id

Action.php : 14
`protected string $id`

#### $parameters

Action.php : 26
`protected array<string|int, mixed> $parameters = []`

#### $title

Action.php : 25
`protected string|null $title = null`

#### $viewpoint

Action.php : 15
`private Viewpoint|null $viewpoint = null`

### Methods

#### __construct()

Action.php : 23

Construct a new action with the specified Scene as its destination.

`public __construct(string $destinationSceneId[, string|null $title = null ][, array<string|int, mixed> $parameters = [] ]) : mixed`

##### Parameters

$destinationSceneId : string
$title : string|null = null
$parameters : array<string|int, mixed> = []

##### Return values

mixed —

#### getDestinationSceneId()

Action.php : 81

Return the database ID of the destination scene, where the user will go if they take this action.

`public getDestinationSceneId() : string`

##### Return values

string —

#### getId()

Action.php : 71

Returns the unique, automatically generated identifier for this action.

`public getId() : string`

Use this ID to refer to this action when calling Game::takeAction().

##### Return values

string —

#### getParameters()

Action.php : 125

Returns all parameters for this action.

`public getParameters() : array<string|int, mixed>`

##### Return values

array<string|int, mixed> —

#### getRenderedTitle()

Action.php : 99

Returns the rendered action title.

`public getRenderedTitle() : string|null`

##### Tags

throws
  InsecureTwigTemplateError

##### Return values

string|null —

#### getTitle()

Action.php : 89
`public getTitle() : string|null`

##### Return values

string|null —

#### getViewpoint()

Action.php : 61
`public getViewpoint() : Viewpoint|null`

##### Return values

Viewpoint|null —

#### serialize()

Action.php : 31
`public serialize() : mixed`

##### Return values

mixed —

#### setParameters()

Action.php : 134

Sets all parameters for this action.

`public setParameters(array<string|int, mixed> $parameters) : void`

##### Parameters

$parameters : array<string|int, mixed>

##### Return values

void —

#### setTitle()

Action.php : 116
`public setTitle(string|null $title) : void`

##### Parameters

$title : string|null

##### Return values

void —

#### setViewpoint()

Action.php : 53
`public setViewpoint(Viewpoint|null $viewpoint) : mixed`

##### Parameters

$viewpoint : Viewpoint|null

##### Return values

mixed —

#### unserialize()

Action.php : 41
`public unserialize(mixed $serialized) : mixed`

##### Parameters

$serialized : mixed

##### Return values

mixed —

## Search results