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()
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 116
bool
validator($elements)
Valid the added element
at line 25
__construct(array $buttons = [])
ButtonCollection constructor.
at line 40
ButtonCollection
addPostBackButton($text, $payload = '')
Add postback button
at line 55
ButtonCollection
addWebButton($text, $url)
Add web url button
at line 69
$this
addAccountLinkButton($url)
Add account link button
at line 85
$this
addCallButton($title, $phone)
Add phone call button
at line 102
$this
addShareButton()
Add share button