/**
* Creates a button.
*
* This method creates a button. To create a POST button, you should use
* the `postButton()` method.
* Instead, to create a link with the appearance of a button, you should
* use the `button()` method provided by `HtmlHelper`.
* @param string $title The button label or an image
* @param array $options HTML attributes and options
* @return string
* @see postButton(), MeTools\View\Helper\HtmlHelper::button()
*/
public function button($title, array $options = [])
{
$options = $this->optionsDefaults(['type' => 'button'], $options);
if ($options['type'] === 'submit') {
$options = $this->addButtonClasses($options, 'success');
} else {
$options = $this->addButtonClasses($options);
}
list($title, $options) = $this->addIconToText($title, $options);
return parent::button($title, $options);
}