Menu

## PostbackTemplateActionBuilder
in package
implements TemplateActionBuilder

PostbackTemplateActionBuilder.php : 29

A builder class for postback action.

### Interfaces, Classes and Traits

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

### Table of Contents

$data : string
$displayText : string|null
$fillInText : string|null
$inputOption : string|null
$label : string
__construct() : mixed
  PostbackAction constructor.
buildTemplateAction() : array<string|int, mixed>
  Builds postback action structure.

### Properties

#### $data

PostbackTemplateActionBuilder.php : 34
`private string $data`

#### $displayText

PostbackTemplateActionBuilder.php : 36
`private string|null $displayText`

#### $fillInText

PostbackTemplateActionBuilder.php : 40
`private string|null $fillInText`

#### $inputOption

PostbackTemplateActionBuilder.php : 38
`private string|null $inputOption`

#### $label

PostbackTemplateActionBuilder.php : 32
`private string $label`

### Methods

#### __construct()

PostbackTemplateActionBuilder.php : 51

PostbackAction constructor.

`public __construct(string $label, string $data[, string|null $displayText = null ][, string|null $inputOption = null ][, string|null $fillInText = null ]) : mixed`

##### Parameters

$label : string

  Label of action.

$data : string

  Data of postback.

$displayText : string|null = null

  The text which will be sent when action is executed (optional).

$inputOption : string|null = null

  The display method of such as rich menu based on user action (optional).

$fillInText : string|null = null

  String to be pre-filled in the input field when the keyboard is opened (optional).

##### Return values

mixed —

#### buildTemplateAction()

PostbackTemplateActionBuilder.php : 65

Builds postback action structure.

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

##### Return values

array<string|int, mixed> —

Built postback action structure.

## Search results