Пример #1
0
 /**
  * {@inhertidoc}
  */
 public function __construct(string $name, FieldInterface $valueField)
 {
     if ($valueField instanceof ArrayField) {
         throw new \InvalidArgumentException("unexpected value provided for 'valueField'; nesting " . "instances of " . __CLASS__ . " is not permitted");
     }
     parent::__construct($name);
     $this->valueField = $valueField->setParent($this);
     $this->defaultValue = [];
 }
Пример #2
0
 public function __construct(string $name, ValueField $keyField, FieldInterface $valueField)
 {
     parent::__construct($name);
     $this->keyField = $keyField->setParent($this);
     $this->valueField = $valueField->setParent($this);
 }