コード例 #1
0
ファイル: FormObject.php プロジェクト: new-inventor/form
 public function toArray()
 {
     $res = parent::toArray();
     $res = array_merge($res, ['title' => $this->getTitle(), 'fullName' => $this->getFullName(), 'attrs' => $this->attributes()->toArray(), 'children' => $this->children()->toArray()]);
     return $res;
 }
コード例 #2
0
ファイル: KeyValuePair.php プロジェクト: new-inventor/form
 /**
  * KeyValuePair constructor.
  *
  * @param string $name
  * @param string $value
  * @param bool $canBeShort
  */
 public function __construct($name, $value = '', $canBeShort = false)
 {
     parent::__construct($name);
     $this->setValue($value);
     $this->setCanBeShort($canBeShort);
 }