Menu

## RichMenuSwitchTemplateActionBuilder
in package
implements TemplateActionBuilder

RichMenuSwitchTemplateActionBuilder.php : 30

A builder class for rich menu switch action.

### Interfaces, Classes and Traits

TemplateActionBuilder
  The interface that has a responsibility to build template action.

### Table of Contents

$data : string
$label : string|null
$richMenuAliasId : string
__construct() : mixed
  RichMenuSwitchAction constructor.
buildTemplateAction() : array<string|int, mixed>
  Builds rich menu switch action structure.

### Properties

#### $data

RichMenuSwitchTemplateActionBuilder.php : 35
`private string $data`

#### $label

RichMenuSwitchTemplateActionBuilder.php : 37
`private string|null $label`

#### $richMenuAliasId

RichMenuSwitchTemplateActionBuilder.php : 33
`private string $richMenuAliasId`

### Methods

#### __construct()

RichMenuSwitchTemplateActionBuilder.php : 46

RichMenuSwitchAction constructor.

`public __construct(string $richMenuAliasId, string $data[, string $label = null ]) : mixed`

##### Parameters

$richMenuAliasId : string

  The rich menu to be switched to.

$data : string

  Returned text when postback event is triggered.

$label : string = null

  Label of action.

##### Return values

mixed —

#### buildTemplateAction()

RichMenuSwitchTemplateActionBuilder.php : 58

Builds rich menu switch action structure.

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

##### Return values

array<string|int, mixed> —

Built rich menu switch action structure.

## Search results