コード例 #1
0
ファイル: CForm.php プロジェクト: alcr33k/ccloak
 /**
  * Add a form element
  *
  * @param array $form     details for the form
  * @param array $elements all the elements
  *
  * @return $this CForm
  */
 public function create($form = [], $elements = [])
 {
     $this->form = $form;
     if (!empty($elements)) {
         foreach ($elements as $key => $element) {
             $this->elements[$key] = CFormElement::Create($key, $element);
         }
     }
     $this->output = [];
     return $this;
 }
コード例 #2
0
ファイル: CForm.php プロジェクト: fnlive/Anax-MVC
 /**
  * Constructor
  */
 public function __construct($form = array(), $elements = array())
 {
     $this->form = $form;
     if (!empty($elements)) {
         foreach ($elements as $key => $element) {
             $this->elements[$key] = CFormElement::Create($key, $element);
         }
     }
     $this->output = array();
 }