private function createBlockProperty(BlockMetadata $property, StructureInterface $structure = null)
{
$blockProperty = new BlockProperty($property->getName(), ['title' => $property->title, 'info_text' => $property->description], $property->getDefaultComponentName(), $property->isRequired(), $property->isLocalized(), $property->getMaxOccurs(), $property->getMinOccurs(), $property->getParameters(), [], $property->getColspan());
$blockProperty->setStructure($structure);
foreach ($property->getComponents() as $component) {
$blockPropertyType = new BlockPropertyType($component->getName(), ['title' => $component->title, 'info_text' => $component->description]);
foreach ($component->getChildren() as $property) {
$blockPropertyType->addChild($this->createProperty($property, $structure));
}
$blockProperty->addType($blockPropertyType);
}
return $blockProperty;
}