src/Contao/Dca/Builder/Legacy/LegacyDcaDataDefinitionBuilder.php
protected function parseProperties(ContainerInterface $container)
    {
        if ($container->hasPropertiesDefinition()) {
            $definition = $container->getPropertiesDefinition();
        } else {
            $definition = new DefaultPropertiesDefinition();
            $container->setPropertiesDefinition($definition);
        }

        foreach ((array) $this->getFromDca('fields') as $propName => $propInfo) {
            if ($definition->hasProperty($propName)) {
                $property = $definition->getProperty($propName);
            } else {
                $property = new DefaultProperty($propName);
                $definition->addProperty($property);
            }

            // Some extensions create invalid DCA information and the DCA must therefore be validated.
            if (!\is_array($propInfo)) {
                continue;
            }

            $this->parseSingleProperty($property, $propInfo);

            $extra = $property->getExtra();
            if (isset($extra['orderField'])
                && \array_key_exists($extra['orderField'], (array) $this->getFromDca('fields'))
            ) {
                if (!$definition->hasProperty($extra['orderField'])) {
                    $definition->addProperty(new DefaultProperty($extra['orderField']));
                }

                $orderProperty = $definition->getProperty($extra['orderField']);
                $this->parseOrderProperty($property, $orderProperty);
            }
        }
    }
protected function parseProperties(ContainerInterface $container)
    {
        if ($container->hasPropertiesDefinition()) {
            $definition = $container->getPropertiesDefinition();
        } else {
            $definition = new DefaultPropertiesDefinition();
            $container->setPropertiesDefinition($definition);
        }

        foreach ((array) $this->getFromDca('fields') as $propName => $propInfo) {
            if ($definition->hasProperty($propName)) {
                $property = $definition->getProperty($propName);
            } else {
                $property = new DefaultProperty($propName);
                $definition->addProperty($property);
            }

            // Some extensions create invalid DCA information and the DCA must therefore be validated.
            if (!\is_array($propInfo)) {
                continue;
            }

            $this->parseSingleProperty($property, $propInfo);

            $extra = $property->getExtra();
            if (isset($extra['orderField'])
                && \array_key_exists($extra['orderField'], (array) $this->getFromDca('fields'))
            ) {
                if (!$definition->hasProperty($extra['orderField'])) {
                    $definition->addProperty(new DefaultProperty($extra['orderField']));
                }

                $orderProperty = $definition->getProperty($extra['orderField']);
                $this->parseOrderProperty($property, $orderProperty);
            }
        }
    }
protected function parseProperties ( ContainerInterface $ container ) { if ( $ container -> hasPropertiesDefinition ( ) ) { $ definition = $ container -> getPropertiesDefinition ( ) ; } else { $ definition = new DefaultPropertiesDefinition ( ) ; $ container -> setPropertiesDefinition ( $ definition ) ; } foreach ( ( array ) $ this -> getFromDca ( 'fields' ) as $ propName => $ propInfo ) { if ( $ definition -> hasProperty ( $ propName ) ) { $ property = $ definition -> getProperty ( $ propName ) ; } else { $ property = new DefaultProperty ( $ propName ) ; $ definition -> addProperty ( $ property ) ; } // Some extensions create invalid DCA information and the DCA must therefore be validated. if ( ! \ is_array ( $ propInfo ) ) { continue ; } $ this -> parseSingleProperty ( $ property , $ propInfo ) ; $ extra = $ property -> getExtra ( ) ; if ( isset ( $ extra [ 'orderField' ] ) && \ array_key_exists ( $ extra [ 'orderField' ] , ( array ) $ this -> getFromDca ( 'fields' ) ) ) { if ( ! $ definition -> hasProperty ( $ extra [ 'orderField' ] ) ) { $ definition -> addProperty ( new DefaultProperty ( $ extra [ 'orderField' ] ) ) ; } $ orderProperty = $ definition -> getProperty ( $ extra [ 'orderField' ] ) ; $ this -> parseOrderProperty ( $ property , $ orderProperty ) ; } } }
Parse the defined properties and populate the definition.

@param ContainerInterface $container The container where the data shall be stored.

@return void
Parse the defined properties and populate the definition .