protected function parseProperties(IMetaModelDataDefinition $container)
{
if ($container->hasPropertiesDefinition()) {
$definition = $container->getPropertiesDefinition();
} else {
$definition = new DefaultPropertiesDefinition();
$container->setPropertiesDefinition($definition);
}
$metaModel = $this->getMetaModel();
$inputScreen = $this->getInputScreenDetails();
// If the current metamodels has variants add the varbase and vargroup to the definition.
if ($metaModel->hasVariants()) {
$this->buildPropertyFromDca($definition, 'varbase', $inputScreen);
$this->buildPropertyFromDca($definition, 'vargroup', $inputScreen);
}
foreach ($metaModel->getAttributes() as $attribute) {
$this->buildPropertyFromDca($definition, $attribute->getColName(), $inputScreen);
$event = new BuildAttributeEvent($metaModel, $attribute, $container, $inputScreen, $this);
// Trigger BuildAttribute Event.
$this->serviceContainer->getEventDispatcher()->dispatch($event::NAME, $event);
}
}