/** * @param Control|string $content * @return $this */ public function add($content) { if ($content instanceof Control) { $this->content[] = $content->display(); } else { if (is_string($content)) { $this->content[] = $content; } } return $this; }
/** * @return string */ public function render() { $this->renderer()->mode(Base::RENDER_STANDARD); return $this->control->display(); }
/** * @param Control $control * @return $this */ public function add(Control $control) { $this->content[] = $control->display(); return $this; }
/** * @return array */ protected function getGuarded() { return array_merge(['name', 'label', 'sronly', 'help', 'required', 'width', 'live'], parent::getGuarded()); }
/** * @param Control $control * @param Group $group * @return string */ protected function renderGroupHorizontal(Control $control = null, Group $group) { $label = $this->groupLabel($group, $this->getLabelColumnClass($group)); $groupCss = array_merge(['form-group'], $group->getCss()); $render = $group->render(); return ' <div class="' . implode(' ', $groupCss) . '"> ' . $label . ' <div class="' . $this->getFieldColumnClass($group, empty($label) || $control->isSrOnly()) . '"> ' . $render . ' </div> </div> '; }