ButtonCollection
class ButtonCollection extends BaseCollection (View source)
Class ButtonCollection
Properties
protected array | $elements | Elements | from BaseCollection |
Methods
bool
validator($elements)
Valid the added element
__construct(array $buttons = [])
ButtonCollection constructor.
addPostBackButton($text, $payload = '')
Add postback button
addWebButton($text, $url)
Add web url button
$this
addAccountLinkButton($url)
Add account link button
$this
addCallButton($title, $phone)
Add phone call button
$this
addShareButton($shareContent = null)
Add share button
Details
in BaseCollection at line 28
array
getElements()
Get elements
in BaseCollection at line 38
add($element)
Add item to collection
in BaseCollection at line 50
array
toData()
Get all elements array data
in BaseCollection at line 65
bool
isEmpty()
Collection is empty
at line 114
bool
validator($elements)
Valid the added element
at line 24
__construct(array $buttons = [])
ButtonCollection constructor.
at line 39
ButtonCollection
addPostBackButton($text, $payload = '')
Add postback button
at line 54
ButtonCollection
addWebButton($text, $url)
Add web url button
at line 68
$this
addAccountLinkButton($url)
Add account link button
at line 84
$this
addCallButton($title, $phone)
Add phone call button
at line 96
$this
addShareButton($shareContent = null)
Add share button