예제 #1
0
 /**
  * @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;
 }
예제 #2
0
 /**
  * @return string
  */
 public function render()
 {
     $this->renderer()->mode(Base::RENDER_STANDARD);
     return $this->control->display();
 }
예제 #3
0
 /**
  * @param Control $control
  * @return $this
  */
 public function add(Control $control)
 {
     $this->content[] = $control->display();
     return $this;
 }
예제 #4
0
 /**
  * @return array
  */
 protected function getGuarded()
 {
     return array_merge(['name', 'label', 'sronly', 'help', 'required', 'width', 'live'], parent::getGuarded());
 }
예제 #5
0
 /**
  * @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>
     ';
 }