class GenericTemplate extends Template (View source)

Class GenericTemplate

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

IMAGE_HORIZONTAL

Horizontal image

IMAGE_SQUARE

Square image

Properties

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

Methods

__construct($sender, $elements = [])

Generic constructor.

mixed
getSender()

Get sender id

from Message
array
toData()

To array for send api

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

No description

$this
setImageRatio($value)

Set image aspect ratio

string
getImageRatio()

Get image ratio

Details

__construct($sender, $elements = [])

Generic constructor.

Parameters

$sender
$elements

mixed getSender()

Get sender id

Return Value

mixed

array toData()

To array for send api

Return Value

array

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

Return Value

mixed

$this setImageRatio($value)

Set image aspect ratio

Parameters

$value

Return Value

$this

string getImageRatio()

Get image ratio

Return Value

string