protected function addFilterConfiguration($code, array $dataGridConfiguration, ContainerBuilder $container)
    {
        $dataGridConfiguration['filter_config']['family'] = $dataGridConfiguration['family'];
        $filterConfig = $this->finalizeFilterConfiguration($code, $dataGridConfiguration['filter_config']);

        $definition = new Definition(
            new Parameter('sidus_eav_filter.configuration.class'),
            [
                $code,
                new Reference('doctrine'),
                new Reference('sidus_filter.filter.factory'),
                $filterConfig,
                new Reference('sidus_eav_model.family.registry'),
            ]
        );
        $definition->setPublic(false);

        $serviceId = 'sidus_eav_filter.datagrid.configuration.'.$code;
        $container->setDefinition($serviceId, $definition);

        return new Reference($serviceId);
    }