Ejemplo n.º 1
0
 public function formatElement()
 {
     static $widget_counter = 1;
     $html = rex_var_medialist::getWidget($widget_counter, $this->getAttribute('name'), $this->getValue(), $this->args);
     ++$widget_counter;
     return $html;
 }
Ejemplo n.º 2
0
 public function getHtml()
 {
     $buttonId = $this->buttonId;
     $value = htmlspecialchars($this->value);
     $name = $this->attributes['name'];
     $args = $this->args;
     $field = rex_var_medialist::getWidget($buttonId, $name, $value, $args);
     return $field;
 }
<?php

$buttonId = $counter;
$name = $this->getFieldName();
$value = htmlspecialchars($this->getValue());
$categoryId = intval($this->getElement(4));
$preview = $this->getElement(3);
$types = trim($this->getElement(5));
$widget = rex_var_medialist::getWidget($buttonId, $name, $value, ['category' => $categoryId, 'preview' => $preview, 'types' => $types]);
$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>