ButtonTemplateBuilder
in package
implements
TemplateBuilder
A builder class for button template message.
Tags
Interfaces, Classes and Traits
- TemplateBuilder
- The interface that has a responsibility to build template message.
Table of Contents
- $actionBuilders : array<string|int, TemplateActionBuilder>
- $defaultAction : TemplateActionBuilder|null
- $imageAspectRatio : string|null
- $imageBackgroundColor : string|null
- $imageSize : string|null
- $template : array<string|int, mixed>
- $text : string|null
- $thumbnailImageUrl : string|null
- $title : string|null
- __construct() : mixed
- ButtonTemplateBuilder constructor.
- buildTemplate() : array<string|int, mixed>
- Builds button template message structure.
Properties
$actionBuilders
private
array<string|int, TemplateActionBuilder>
$actionBuilders
$defaultAction
private
TemplateActionBuilder|null
$defaultAction
$imageAspectRatio
private
string|null
$imageAspectRatio
$imageBackgroundColor
private
string|null
$imageBackgroundColor
$imageSize
private
string|null
$imageSize
$template
private
array<string|int, mixed>
$template
$text
private
string|null
$text
$thumbnailImageUrl
private
string|null
$thumbnailImageUrl
$title
private
string|null
$title
Methods
__construct()
ButtonTemplateBuilder constructor.
public
__construct([string|null $title = null ][, string|null $text = null ][, string|null $thumbnailImageUrl = null ][, array<string|int, TemplateActionBuilder> $actionBuilders = [] ][, string|null $imageAspectRatio = null ][, string|null $imageSize = null ][, string|null $imageBackgroundColor = null ][, TemplateActionBuilder|null $defaultAction = null ]) : mixed
Parameters
- $title : string|null = null
- $text : string|null = null
- $thumbnailImageUrl : string|null = null
- $actionBuilders : array<string|int, TemplateActionBuilder> = []
- $imageAspectRatio : string|null = null
- $imageSize : string|null = null
- $imageBackgroundColor : string|null = null
- $defaultAction : TemplateActionBuilder|null = null
Return values
mixed —buildTemplate()
Builds button template message structure.
public
buildTemplate() : array<string|int, mixed>