コード例 #1
0
ファイル: FormObject.php プロジェクト: new-inventor/form
 /**
  * @param string $name
  * @param string $title
  *
  * @throws ArgumentTypeException
  */
 function __construct($name, $title = '')
 {
     $this->attrs = new NamedObjectList([KeyValuePair::getClass()]);
     $this->children = new NamedObjectList([Block::getClass(), AbstractField::getClass()]);
     parent::__construct($name);
     $this->title($title);
     $this->isValid = true;
     $this->templateName = self::DEFAULT_TEMPLATE;
 }
コード例 #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);
 }