Menu

## ButtonTemplateBuilder
in package
implements TemplateBuilder

ButtonTemplateBuilder.php : 33

A builder class for button template message.

##### Tags

SuppressWarnings

  (PHPMD.NPathComplexity)

### 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

ButtonTemplateBuilder.php : 54
`private array<string|int, TemplateActionBuilder> $actionBuilders`

#### $defaultAction

ButtonTemplateBuilder.php : 62
`private TemplateActionBuilder|null $defaultAction`

#### $imageAspectRatio

ButtonTemplateBuilder.php : 45
`private string|null $imageAspectRatio`

#### $imageBackgroundColor

ButtonTemplateBuilder.php : 51
`private string|null $imageBackgroundColor`

#### $imageSize

ButtonTemplateBuilder.php : 48
`private string|null $imageSize`

#### $template

ButtonTemplateBuilder.php : 57
`private array<string|int, mixed> $template`

#### $text

ButtonTemplateBuilder.php : 39
`private string|null $text`

#### $thumbnailImageUrl

ButtonTemplateBuilder.php : 42
`private string|null $thumbnailImageUrl`

#### $title

ButtonTemplateBuilder.php : 36
`private string|null $title`

### Methods

#### __construct()

ButtonTemplateBuilder.php : 76

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

ButtonTemplateBuilder.php : 101

Builds button template message structure.

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

##### Return values

array<string|int, mixed> —

## Search results