protected function loadAliasingConfig(ContainerBuilder $container, $aliasingConfig, $loader)
    {
        $loader->load('aliasing.xml');

        $listenerDefinition = $container->getDefinition('zicht_url.aliasing_listener');
        if ($aliasingConfig['exclude_patterns']) {
            $listenerDefinition->addMethodCall('setExcludePatterns', [$aliasingConfig['exclude_patterns']]);
        }

        $listenerDefinition->addMethodCall('setIsParamsEnabled', [$aliasingConfig['enable_params']]);

        if ($aliasingConfig['automatic_entities']) {
            $automaticAliasDoctrineDefinition = $container->getDefinition('zicht_url.aliasing.doctrine.subscriber');

            foreach ($aliasingConfig['automatic_entities'] as $entityClass) {
                $automaticAliasDoctrineDefinition->addMethodCall('addEntityClass', [$entityClass]);
            }
        }
    }