PostbackTemplateActionBuilder
in package
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
$data
private
string
$data
$displayText
private
string|null
$displayText
$fillInText
private
string|null
$fillInText
$inputOption
private
string|null
$inputOption
$label
private
string
$label
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.