src/CRUDlex/Service.php
protected function createDefinition(TranslatorInterface $translator, EntityDefinitionFactoryInterface $entityDefinitionFactory, array $crud, $name)
    {
        $label               = array_key_exists('label', $crud) ? $crud['label'] : $name;
        $localeLabels        = $this->getLocaleLabels($crud);
        $standardFieldLabels = [
            'id' => $translator->trans('crudlex.label.id'),
            'created_at' => $translator->trans('crudlex.label.created_at'),
            'updated_at' => $translator->trans('crudlex.label.updated_at')
        ];

        $definition = $entityDefinitionFactory->createEntityDefinition(
            $crud['table'],
            $crud['fields'],
            $label,
            $localeLabels,
            $standardFieldLabels,
            $this
        );
        $this->configureDefinition($definition, $crud);
        return $definition;
    }
protected function createDefinition(TranslatorInterface $translator, EntityDefinitionFactoryInterface $entityDefinitionFactory, array $crud, $name)
    {
        $label               = array_key_exists('label', $crud) ? $crud['label'] : $name;
        $localeLabels        = $this->getLocaleLabels($crud);
        $standardFieldLabels = [
            'id' => $translator->trans('crudlex.label.id'),
            'created_at' => $translator->trans('crudlex.label.created_at'),
            'updated_at' => $translator->trans('crudlex.label.updated_at')
        ];

        $definition = $entityDefinitionFactory->createEntityDefinition(
            $crud['table'],
            $crud['fields'],
            $label,
            $localeLabels,
            $standardFieldLabels,
            $this
        );
        $this->configureDefinition($definition, $crud);
        return $definition;
    }
protected function createDefinition ( TranslatorInterface $ translator , EntityDefinitionFactoryInterface $ entityDefinitionFactory , array $ crud , $ name ) { $ label = array_key_exists ( 'label' , $ crud ) ? $ crud [ 'label' ] : $ name ; $ localeLabels = $ this -> getLocaleLabels ( $ crud ) ; $ standardFieldLabels = [ 'id' => $ translator -> trans ( 'crudlex.label.id' ) , 'created_at' => $ translator -> trans ( 'crudlex.label.created_at' ) , 'updated_at' => $ translator -> trans ( 'crudlex.label.updated_at' ) ] ; $ definition = $ entityDefinitionFactory -> createEntityDefinition ( $ crud [ 'table' ] , $ crud [ 'fields' ] , $ label , $ localeLabels , $ standardFieldLabels , $ this ) ; $ this -> configureDefinition ( $ definition , $ crud ) ; return $ definition ; }
Creates and setups an EntityDefinition instance.

@param TranslatorInterface $translator
the Translator to use for some standard field labels
@param EntityDefinitionFactoryInterface $entityDefinitionFactory
the EntityDefinitionFactory to use
@param array $crud
the parsed YAML of a CRUD entity
@param string $name
the name of the entity

@return EntityDefinition
the EntityDefinition good to go
Creates and setups an EntityDefinition instance .