public function formatElement() { static $widget_counter = 1; $html = rex_var_link::getWidget($widget_counter, $this->getAttribute('name'), $this->getValue(), ['category' => $this->category_id]); ++$widget_counter; return $html; }
public function getHtml() { $buttonId = $this->buttonId; $categoryId = $this->categoryId; $value = htmlspecialchars($this->value); $name = $this->attributes['name']; $field = rex_var_link::getWidget($buttonId, $name, $value, ['category' => $categoryId]); return $field; }
<?php $buttonId = $counter; $categoryId = 0; $name = $this->getFieldName(); $value = htmlspecialchars($this->getValue()); $widget = rex_var_link::getWidget($buttonId, $name, $value, ['category' => $categoryId]); $class_group = trim('form-group yform-element ' . $this->getHTMLClass() . ' ' . $this->getWarningClass()); ?> <div class="<?php echo $class_group; ?> " id="<?php echo $this->getHTMLId(); ?> "> <label class="control-label" for="<?php echo $this->getFieldId(); ?> "><?php echo $this->getLabel(); ?> </label> <?php echo $widget; ?> </div>