File builder/form/button/FormButtonLinkCssImg.class.php
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32:
<?php
/**
* @package Builder
* @subpackage Form\button
* @copyright © 2005-2019 PHPBoost
* @license https://www.gnu.org/licenses/gpl-3.0.html GNU/GPL-3.0
* @author Julien BRISWALTER <j1.seth@phpboost.com>
* @version PHPBoost 5.2 - last update: 2018 11 30
* @since PHPBoost 4.1 - 2014 05 08
* @contributor Julien BRISWALTER <j1.seth@phpboost.com>
* @contributor Arnaud GENET <elenwii@phpboost.com>
* @contributor Sebastien LARTIGUE <babsolune@phpboost.com>
*/
class FormButtonLinkCssImg extends AbstractFormButton
{
public function __construct($label, $link, $css_class_image = '', $text_button = '')
{
$full_label = '';
if (!empty($css_class_image))
{
$full_label = '<i class="' . $css_class_image . '" title="' . $label . '" aria-hidden="true"></i><span class="sr-only">' . $label . '</span>' . $text_button;
}
else
{
$full_label = $label;
}
parent::__construct('button', $full_label, '', 'window.location=' . TextHelper::to_js_string(Url::to_rel($link)), 'image');
}
}
?>