CRUDlex\ServiceProvider::validateEntityDefinition PHP Method

validateEntityDefinition() protected method

Validates the parsed entity definition.
protected validateEntityDefinition ( Pimple\Container $app, array $entityDefinition )
$app Pimple\Container the application container
$entityDefinition array the entity definition to validate
    protected function validateEntityDefinition(Container $app, array $entityDefinition)
    {
        $doValidate = !$app->offsetExists('crud.validateentitydefinition') || $app['crud.validateentitydefinition'] === true;
        if ($doValidate) {
            $validator = $app->offsetExists('crud.entitydefinitionvalidator') ? $app['crud.entitydefinitionvalidator'] : new EntityDefinitionValidator();
            $validator->validate($entityDefinition);
        }
    }