/** * Render this element using the mapped method from $tbActiveFormMethods */ public function render() { if (!empty(self::$tbActiveFormMethods[$this->type])) { $method = self::$tbActiveFormMethods[$this->type]; $model = $this->getParent()->getModel(); $attribute = $this->name; $htmlOptions = $this->prepareHtmlOptions($this->attributes); switch ($method) { case 'checkBoxListRow': case 'radioButtonListRow': case 'dropDownListRow': case 'radioButtonListInlineRow': case 'checkBoxListInlineRow': return $this->getActiveFormWidget()->{$method}($model, $attribute, $this->items, $htmlOptions); default: return $this->getActiveFormWidget()->{$method}($model, $attribute, $htmlOptions); } } else { if ($this->wrapBootstrapTags) { $error = $this->getParent()->showErrorSummary ? '' : $this->renderError(); $output = array('{label}' => $this->renderControlLabel(), '{input}' => "<div class=\"controls\">\n" . $this->renderInput() . $error . $this->renderHint() . '</div>', '{hint}' => '', '{error}' => ''); return "<div class=\"control-group\">\n" . strtr($this->layout, $output) . '</div>'; } } return parent::render(); }
public function renderLabel() { if (in_array($this->type, array('meta_tags', 'uploader', 'uploader_modal'))) { return ''; } return parent::renderLabel(); }
public function render() { if ($this->type === 'checkbox') { $output = "<div class='checkbox'><label>" . $this->renderInput() . $this->getLabel() . $this->renderHint() . "</label></div>"; return $output; } return parent::render(); }
/** * Renders a form control that is implemented via a widget. */ protected function renderWidget() { $input = parent::renderInput(); return TbHtml::activeControlGroup(null, $this->getParent()->getModel(), $this->name, array('input' => $input)); }
public function __construct($config, $parent) { parent::__construct($config, $parent); unset($this->id); }
public function renderLabel() { if (in_array($this->type, array( 'meta_tags', 'file_manager' )) ) { return ''; } return parent::renderLabel(); }