public function generateNodeTypeSchema()
{
$schema = array('inheritanceMap' => array('subTypes' => array()), 'nodeTypes' => array(), 'constraints' => $this->generateConstraints());
$nodeTypes = $this->nodeTypeManager->getNodeTypes(true);
/** @var NodeType $nodeType */
foreach ($nodeTypes as $nodeTypeName => $nodeType) {
if ($nodeType->isAbstract() === false) {
$configuration = $nodeType->getFullConfiguration();
$this->flattenAlohaFormatOptions($configuration);
$schema['nodeTypes'][$nodeTypeName] = $configuration;
$schema['nodeTypes'][$nodeTypeName]['label'] = $nodeType->getLabel();
}
$schema['inheritanceMap']['subTypes'][$nodeTypeName] = array();
foreach ($this->nodeTypeManager->getSubNodeTypes($nodeType->getName(), true) as $subNodeType) {
/** @var NodeType $subNodeType */
$schema['inheritanceMap']['subTypes'][$nodeTypeName][] = $subNodeType->getName();
}
}
return $schema;
}