MetaModels\DcGeneral\Dca\Builder\Builder::parseProperties PHP Метод

parseProperties() защищенный Метод

Parse the defined properties and populate the definition.
protected parseProperties ( MetaModels\DcGeneral\DataDefinition\IMetaModelDataDefinition $container ) : void
$container MetaModels\DcGeneral\DataDefinition\IMetaModelDataDefinition The data container.
Результат void
    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);
        }
    }