src/Contao/Dca/Builder/Legacy/LegacyDcaDataDefinitionBuilder.php
protected function parseSingleProperty(PropertyInterface $property, array $propInfo)
    {
        foreach ($propInfo as $key => $value) {
            switch ($key) {
                case 'label':
                    $this->parseSinglePropertyLabel($property, $value);
                    break;

                case 'description':
                    if (!$property->getDescription()) {
                        $property->setDescription($value);
                    }
                    break;

                case 'default':
                    if (!$property->getDefaultValue()) {
                        $property->setDefaultValue($value);
                    }
                    break;

                case 'exclude':
                    $property->setExcluded((bool) $value);
                    break;

                case 'search':
                    $property->setSearchable((bool) $value);
                    break;

                case 'filter':
                    $property->setFilterable((bool) $value);
                    break;

                case 'inputType':
                    $property->setWidgetType($value);
                    break;

                case 'options':
                    $property->setOptions($value);
                    break;

                case 'explanation':
                    $property->setExplanation($value);
                    break;

                case 'eval':
                    $property->setExtra(
                        \array_merge(
                            (array) $property->getExtra(),
                            (array) $value
                        )
                    );
                    break;

                case 'reference':
                    $property->setExtra(
                        \array_merge(
                            (array) $property->getExtra(),
                            ['reference' => &$propInfo['reference']]
                        )
                    );
                    break;

                case 'sql':
                    $this->determineEmptyValueFromSql($property, $value);
                    break;

                default:
            }
        }

        $this->parseWidgetPageTree($property, $propInfo);
    }
protected function parseSingleProperty(PropertyInterface $property, array $propInfo)
    {
        foreach ($propInfo as $key => $value) {
            switch ($key) {
                case 'label':
                    $this->parseSinglePropertyLabel($property, $value);
                    break;

                case 'description':
                    if (!$property->getDescription()) {
                        $property->setDescription($value);
                    }
                    break;

                case 'default':
                    if (!$property->getDefaultValue()) {
                        $property->setDefaultValue($value);
                    }
                    break;

                case 'exclude':
                    $property->setExcluded((bool) $value);
                    break;

                case 'search':
                    $property->setSearchable((bool) $value);
                    break;

                case 'filter':
                    $property->setFilterable((bool) $value);
                    break;

                case 'inputType':
                    $property->setWidgetType($value);
                    break;

                case 'options':
                    $property->setOptions($value);
                    break;

                case 'explanation':
                    $property->setExplanation($value);
                    break;

                case 'eval':
                    $property->setExtra(
                        \array_merge(
                            (array) $property->getExtra(),
                            (array) $value
                        )
                    );
                    break;

                case 'reference':
                    $property->setExtra(
                        \array_merge(
                            (array) $property->getExtra(),
                            ['reference' => &$propInfo['reference']]
                        )
                    );
                    break;

                case 'sql':
                    $this->determineEmptyValueFromSql($property, $value);
                    break;

                default:
            }
        }

        $this->parseWidgetPageTree($property, $propInfo);
    }
protected function parseSingleProperty ( PropertyInterface $ property , array $ propInfo ) { foreach ( $ propInfo as $ key => $ value ) { switch ( $ key ) { case 'label' : $ this -> parseSinglePropertyLabel ( $ property , $ value ) ; break ; case 'description' : if ( ! $ property -> getDescription ( ) ) { $ property -> setDescription ( $ value ) ; } break ; case 'default' : if ( ! $ property -> getDefaultValue ( ) ) { $ property -> setDefaultValue ( $ value ) ; } break ; case 'exclude' : $ property -> setExcluded ( ( bool ) $ value ) ; break ; case 'search' : $ property -> setSearchable ( ( bool ) $ value ) ; break ; case 'filter' : $ property -> setFilterable ( ( bool ) $ value ) ; break ; case 'inputType' : $ property -> setWidgetType ( $ value ) ; break ; case 'options' : $ property -> setOptions ( $ value ) ; break ; case 'explanation' : $ property -> setExplanation ( $ value ) ; break ; case 'eval' : $ property -> setExtra ( \ array_merge ( ( array ) $ property -> getExtra ( ) , ( array ) $ value ) ) ; break ; case 'reference' : $ property -> setExtra ( \ array_merge ( ( array ) $ property -> getExtra ( ) , [ 'reference' => & $ propInfo [ 'reference' ] ] ) ) ; break ; case 'sql' : $ this -> determineEmptyValueFromSql ( $ property , $ value ) ; break ; default : } } $ this -> parseWidgetPageTree ( $ property , $ propInfo ) ; }
Parse a single property.

@param PropertyInterface $property The property to parse.
@param array             $propInfo The property information.

@return void

@SuppressWarnings(PHPMD.CyclomaticComplexity)
Parse a single property .