コード例 #1
0
ファイル: FormAbstract.php プロジェクト: apishka/form
 /**
  * Add
  *
  * @param Apishka_Form_FieldAbstract $field
  *
  * @return Apishka_Form_FormAbstract this
  */
 public function addField(Apishka_Form_FieldAbstract $field)
 {
     $this->initializeFields();
     $name = $field->getStructureName();
     if ($this->hasField($name)) {
         throw new LogicException('Field ' . var_export($name, true) . ' already exists in structure');
     }
     $this->_fields[$name] = $field->initialize($this);
     return $this;
 }