/** * {@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 = []; }
public function __construct(string $name, ValueField $keyField, FieldInterface $valueField) { parent::__construct($name); $this->keyField = $keyField->setParent($this); $this->valueField = $valueField->setParent($this); }