コード例 #1
0
ファイル: Bootstrap3.php プロジェクト: fuelphp/fieldset
 /**
  * Renders the whole form, wrapping a table in <form> tags.
  *
  * @param  Form $form
  *
  * @return string
  *
  * @since 2.0
  */
 public function renderForm(Form $form)
 {
     $content = '';
     foreach ($form as $element) {
         $content .= $this->render($element);
     }
     $form->setAttribute('role', 'form');
     return Html::tag('form', $form->getAttributes(), $content);
 }
コード例 #2
0
ファイル: BasicRender.php プロジェクト: fuelphp/fieldset
 /**
  * Renders the whole form, wrapping a table in <form> tags.
  *
  * @param  Form $form
  *
  * @return string
  *
  * @since 2.0
  */
 public function renderForm(Form $form)
 {
     foreach ($form as $element) {
         $this->render($element);
     }
     $tableRender = new SimpleTable();
     $tableContent = $tableRender->renderTable($this->table);
     return Html::tag('form', $form->getAttributes(), $tableContent);
 }