protected function fromArray(array $data)
{
$this->name = $data['name'];
$this->isAbstract = $data['isAbstract'];
$this->isMixin = $data['isMixin'];
$this->isQueryable = $data['isQueryable'];
$this->hasOrderableChildNodes = $data['hasOrderableChildNodes'];
$this->primaryItemName = $data['primaryItemName'] ?: null;
$this->declaredSuperTypeNames = isset($data['declaredSuperTypeNames']) && count($data['declaredSuperTypeNames']) ? $data['declaredSuperTypeNames'] : array();
$this->declaredPropertyDefinitions = new ArrayObject();
foreach ($data['declaredPropertyDefinitions'] as $propertyDef) {
$this->declaredPropertyDefinitions[] = $this->factory->get('NodeType\\PropertyDefinition', array($propertyDef, $this->nodeTypeManager));
}
$this->declaredNodeDefinitions = new ArrayObject();
foreach ($data['declaredNodeDefinitions'] as $nodeDef) {
$this->declaredNodeDefinitions[] = $this->factory->get('NodeType\\NodeDefinition', array($nodeDef, $this->nodeTypeManager));
}
}