class ListTemplate extends Template (View source)

Class ListTemplate

Traits

Class Quickable

Constants

TYPE_IMAGE

Image type

TYPE_AUDIO

Audio type

TYPE_VIDEO

Video type

TYPE_FILE

File type

TYPE_LOCATION

Location type

TYPE_TEMPLATE

Template type

STYLE_LATGE

Top style large

STYLE_COMPACT

Top style compact

Properties

protected QuickReplyCollection $quicks from Quickable
protected BaseCollection $collections from Template

Methods

__construct($sender, array $elements = [])

ListTemplate constructor.

mixed
getSender()

Get sender id

from Message
array
toData()

No description

array
getPayload()

Get payload

$this
setPayload(array $payload)

Set Payload

$this
enableReuse()

Enable reuse

$this
disableReuse()

Disable reuse

$this
setAttachmentId($id)

Set attachment id

bootQuick()

Boot quick

from Quickable
$this
addQuick($quick)

No description

from Quickable
bool
isEmpty()

No description

from Quickable
array
makeQuickReply($data = [])

No description

from Quickable
$this
add($elements)

Add elements

from Template
mixed
__call($name, $arguments)

No description

from Template
getCollections()

Get collection

from Template
$this
disableShare()

Disable share

from Template
mixed
collection()

Collection class name

getButton()

No description

$this
setButton(Button $value)

No description

$this
setTopStyle($style)

Set top style

string
getTopStyle()

Get top style

Details

__construct($sender, array $elements = [])

ListTemplate constructor.

Parameters

$sender
array $elements

mixed getSender()

Get sender id

Return Value

mixed

array toData()

Return Value

array

Exceptions

ListElementCountException

array getPayload()

Get payload

Return Value

array

$this setPayload(array $payload)

Set Payload

Parameters

array $payload

Return Value

$this

$this enableReuse()

Enable reuse

Return Value

$this

$this disableReuse()

Disable reuse

Return Value

$this

$this setAttachmentId($id)

Set attachment id

Parameters

$id

Return Value

$this

bootQuick()

Boot quick

$this addQuick($quick)

Parameters

$quick

Return Value

$this

bool isEmpty()

Return Value

bool

array makeQuickReply($data = [])

Parameters

$data

Return Value

array

$this add($elements)

Add elements

Parameters

$elements

Return Value

$this

mixed __call($name, $arguments)

Parameters

$name
$arguments

Return Value

mixed

BaseCollection getCollections()

Get collection

Return Value

BaseCollection

$this disableShare()

Disable share

Return Value

$this

protected mixed collection()

Collection class name

Return Value

mixed

Button getButton()

Return Value

Button

$this setButton(Button $value)

Parameters

Button $value

Return Value

$this

$this setTopStyle($style)

Set top style

Parameters

$style

Return Value

$this

string getTopStyle()

Get top style

Return Value

string