for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the LineMob package.
*
* (c) Ishmael Doss <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace LineMob\Core\Template;
/**
* @author YokYukYik <[email protected]>
class ButtonsTemplate extends AbstractTemplate
{
use ActionTemplateTrait;
* @var string
public $altText = 'This is buttons template.';
public $title = 'Menu';
public $text = 'Please select';
public $thumbnail;
* @var Action[]
public $actions = [];
* @param $label
* @param $text
public function addMessageAction($label, $text)
$this->actions[] = new Action($label, $text, Action::TYPE_MESSAGE);
}
* @param $link
public function addUriAction($label, $link)
$this->actions[] = new Action($label, $link, Action::TYPE_URI);
* @param $data
public function addPostbackAction($label, $data)
$this->actions[] = new Action($label, $data, Action::TYPE_POSTBACK);