public static function customButton($options = [], $defOptions = []) { extract(ArrayHelper::remove($options, ['text', 'url'])); if (is_null($text)) { $text = $defOptions['text']; } $options['class'] = (isset($options['class']) ? $options['class'] . ' ' : '') . $defOptions['class']; if (!array_key_exists('glyphicon', $options)) { $options['glyphicon'] = $defOptions['glyphicon']; } return empty($url) ? static::button($text, $options) : static::a($text, $url, $options); }