private ?PropertyPathInterface
$propertyPath = null;
/**
* @throws LogicException if a data mapper is not provided for a compound form
*/
public function __construct(FormConfigInterface
$config) { // Compound forms always need a data mapper, otherwise calls to
// `setData` and `add` will not lead to the correct population of
// the child forms.
if ($config->
getCompound() && !
$config->
getDataMapper()) { throw new LogicException('Compound forms need a data mapper.'
);
} // If the form inherits the data from its parent, it is not necessary
// to call setData() with the default data.
if ($this->inheritData =
$config->
getInheritData()) { $this->defaultDataSet = true;
} $this->config =
$config;
$this->children =
new OrderedHashMap();