adding custom dql function get_json_field_by_key and jsonaggregate

This commit is contained in:
2017-01-16 20:20:43 +01:00
parent 9d1e414e79
commit 3671918777
3 changed files with 108 additions and 1 deletions

View File

@@ -26,6 +26,9 @@ use Symfony\Component\DependencyInjection\Loader;
use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface;
use Chill\MainBundle\DependencyInjection\Widget\Factory\WidgetFactoryInterface;
use Chill\MainBundle\DependencyInjection\Configuration;
use Chill\MainBundle\Doctrine\DQL\GetJsonFieldByKey;
use Chill\MainBundle\Doctrine\DQL\Unaccent;
use Chill\MainBundle\Doctrine\DQL\JsonAggregate;
/**
* This class load config for chillMainExtension.
@@ -128,7 +131,9 @@ class ChillMainExtension extends Extension implements PrependExtensionInterface,
'orm' => array(
'dql' => array(
'string_functions' => array(
'unaccent' => 'Chill\MainBundle\Doctrine\DQL\Unaccent'
'unaccent' => Unaccent::class,
'GET_JSON_FIELD_BY_KEY' => GetJsonFieldByKey::class,
'AGGREGATE' => JsonAggregate::class
)
)
)