public function formatElement() { static $widget_counter = 1; $html = rex_var_linklist::getWidget($widget_counter, $this->getAttribute('name'), $this->getValue(), ['category' => $this->category_id]); ++$widget_counter; return $html; }
public function getHtml() { $buttonId = $this->buttonId; $category = $this->categoryId; $value = htmlspecialchars($this->value); $name = $this->attributes['name']; $field = rex_var_linklist::getWidget($buttonId, $name, $value, ['category' => $category]); return $field; }
$n['field'] = $assets; $n['note'] = rex_i18n::rawMsg('emailobfuscator_config_assets_note', rex_url::backendPage('packages', ['subpage' => 'help', 'package' => $this->getPackageId()])); $formElements[] = $n; $fragment = new rex_fragment(); $fragment->setVar('elements', $formElements, false); $content .= $fragment->parse('core/form/form.php'); $content .= ' </fieldset>'; /* whitelist */ $content .= ' <fieldset> <legend>' . $this->i18n('config_whitelist') . '</legend>'; $formElements = []; $n = []; $n['label'] = '<label for="emailobfuscator-config-articles">' . $this->i18n('config_articles') . '</label>'; $n['field'] = rex_var_linklist::getWidget(1, 'config[articles]', $this->getConfig('articles')); $formElements[] = $n; $n = []; $n['label'] = '<label for="emailobfuscator-config-templates">' . $this->i18n('config_templates') . '</label>'; $select = new rex_select(); $select->setId('emailobfuscator-config-templates'); $select->setMultiple(); $select->setSize(10); $select->setAttribute('class', 'form-control'); $select->setName('config[templates][]'); $select->addSqlOptions('SELECT `name`, `id` FROM `' . rex::getTablePrefix() . 'template` ORDER BY `name` ASC'); $select->setSelected($this->getConfig('templates')); $n['field'] = $select->get(); $formElements[] = $n; $fragment = new rex_fragment(); $fragment->setVar('elements', $formElements, false);