class Button implements MessageInterface (View source)

Class Button

Constants

TYPE_WEB

Web url button type

TYPE_POSTBACK

Postback button type

TYPE_CALL

Phone call button type

TYPE_SHARE

Share button type

TYPE_ACCOUNT_LINK

Account link

Methods

__construct($type, $title, $payload = '')

Button constructor.

array
toData()

To array for send api

string
getType()

Get button type.

$this
setExtra(array $value)

Set button extra

Details

__construct($type, $title, $payload = '')

Button constructor.

Parameters

$type
$title
$payload

array toData()

To array for send api

Return Value

array

Exceptions

UnknownTypeException

string getType()

Get button type.

Return Value

string

$this setExtra(array $value)

Set button extra

Parameters

array $value

Return Value

$this