217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
|
return sprintf('<a class="icn-btn" data-icon="%s" href="%s" %s>%s</a>', Utils::iconUnicode($shape), $this->escape($href), $params, $this->escape($label));
}
protected function formInput(array $params)
{
static $params_list = ['value', 'default', 'type', 'help', 'label', 'name', 'options', 'source'];
$value = null;
$options = null;
// Extract params and keep attributes separated
$attributes = array_diff_key($params, array_flip($params_list));
$params = array_intersect_key($params, array_flip($params_list));
extract($params, \EXTR_SKIP);
if (!isset($name, $type)) {
throw new \InvalidArgumentException('Missing name or type');
|
<
<
<
|
217
218
219
220
221
222
223
224
225
226
227
228
229
230
|
return sprintf('<a class="icn-btn" data-icon="%s" href="%s" %s>%s</a>', Utils::iconUnicode($shape), $this->escape($href), $params, $this->escape($label));
}
protected function formInput(array $params)
{
static $params_list = ['value', 'default', 'type', 'help', 'label', 'name', 'options', 'source'];
// Extract params and keep attributes separated
$attributes = array_diff_key($params, array_flip($params_list));
$params = array_intersect_key($params, array_flip($params_list));
extract($params, \EXTR_SKIP);
if (!isset($name, $type)) {
throw new \InvalidArgumentException('Missing name or type');
|