LINE Messaging API SDK for PHP

PostbackTemplateActionBuilder implements TemplateActionBuilder

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

Methods

__construct()

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()

Builds postback action structure.

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

Built postback action structure.

Search results