mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Move Doctrine DBAL configuration in the appropriate and already existing code section.
This commit is contained in:
parent
bafbc2dd74
commit
cb897cfef1
@ -35,6 +35,8 @@ use Chill\MainBundle\Doctrine\DQL\OverlapsI;
|
||||
use Symfony\Component\DependencyInjection\Definition;
|
||||
use Symfony\Component\DependencyInjection\Reference;
|
||||
use Chill\MainBundle\Doctrine\DQL\Replace;
|
||||
use Chill\MainBundle\Doctrine\Type\NativeDateIntervalType;
|
||||
use Chill\MainBundle\Doctrine\Type\PointType;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
/**
|
||||
@ -186,28 +188,30 @@ class ChillMainExtension extends Extension implements PrependExtensionInterface,
|
||||
],
|
||||
],
|
||||
],
|
||||
// This is mandatory since we are using postgis as database.
|
||||
'dbal' => [
|
||||
'mapping_types' => [
|
||||
'geometry' => 'string',
|
||||
],
|
||||
],
|
||||
],
|
||||
);
|
||||
|
||||
//add dbal types (default entity_manager)
|
||||
$container->prependExtensionConfig('doctrine', array(
|
||||
'dbal' => [
|
||||
'types' => [
|
||||
'dateinterval' => [
|
||||
'class' => \Chill\MainBundle\Doctrine\Type\NativeDateIntervalType::class
|
||||
],
|
||||
'point' => [
|
||||
'class' => \Chill\MainBundle\Doctrine\Type\PointType::class
|
||||
]
|
||||
]
|
||||
]
|
||||
));
|
||||
$container
|
||||
->prependExtensionConfig(
|
||||
'doctrine',
|
||||
[
|
||||
'dbal' => [
|
||||
// This is mandatory since we are using postgis as database.
|
||||
'mapping_types' => [
|
||||
'geometry' => 'string',
|
||||
],
|
||||
'types' => [
|
||||
'dateinterval' => [
|
||||
'class' => NativeDateIntervalType::class
|
||||
],
|
||||
'point' => [
|
||||
'class' => PointType::class
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
);
|
||||
|
||||
//add current route to chill main
|
||||
$container->prependExtensionConfig('chill_main', array(
|
||||
|
Loading…
x
Reference in New Issue
Block a user