src/CRUDlex/Service.php
protected function configureDefinition(EntityDefinition $definition, array $crud)
    {
        $toConfigure = [
            'deleteCascade',
            'listFields',
            'filter',
            'childrenLabelFields',
            'pageSize',
            'initialSortField',
            'initialSortAscending',
            'navBarGroup',
            'optimisticLocking',
            'hardDeletion',
        ];
        foreach ($toConfigure as $field) {
            if (array_key_exists($field, $crud)) {
                $function = 'set'.ucfirst($field);
                $definition->$function($crud[$field]);
            }
        }
    }
protected function configureDefinition(EntityDefinition $definition, array $crud)
    {
        $toConfigure = [
            'deleteCascade',
            'listFields',
            'filter',
            'childrenLabelFields',
            'pageSize',
            'initialSortField',
            'initialSortAscending',
            'navBarGroup',
            'optimisticLocking',
            'hardDeletion',
        ];
        foreach ($toConfigure as $field) {
            if (array_key_exists($field, $crud)) {
                $function = 'set'.ucfirst($field);
                $definition->$function($crud[$field]);
            }
        }
    }
protected function configureDefinition ( EntityDefinition $ definition , array $ crud ) { $ toConfigure = [ 'deleteCascade' , 'listFields' , 'filter' , 'childrenLabelFields' , 'pageSize' , 'initialSortField' , 'initialSortAscending' , 'navBarGroup' , 'optimisticLocking' , 'hardDeletion' , ] ; foreach ( $ toConfigure as $ field ) { if ( array_key_exists ( $ field , $ crud ) ) { $ function = 'set' . ucfirst ( $ field ) ; $ definition -> $ function ( $ crud [ $ field ] ) ; } } }
Configures the EntityDefinition according to the given
CRUD entity map.

@param EntityDefinition $definition
the definition to configure
@param array $crud
the CRUD entity map
Configures the EntityDefinition according to the given CRUD entity map .