From 8b71a9e7cf5484ceab1d979b026e506e6528a07e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Sat, 8 Nov 2014 12:02:12 +0100 Subject: [PATCH] rename service name chill.custom_field_compiler to chill.custom_field.provider --- Controller/CustomFieldController.php | 2 +- DependencyInjection/CustomFieldCompilerPass.php | 6 +++--- Resources/config/services.yml | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Controller/CustomFieldController.php b/Controller/CustomFieldController.php index a45938717..8c775af1e 100644 --- a/Controller/CustomFieldController.php +++ b/Controller/CustomFieldController.php @@ -27,7 +27,7 @@ class CustomFieldController extends Controller //prepare form for new custom type $fieldChoices = array(); - foreach ($this->get('chill.custom_field_compiler')->getAllFields() + foreach ($this->get('chill.custom_field.provider')->getAllFields() as $key => $customType) { $fieldChoices[$key] = $customType->getName(); } diff --git a/DependencyInjection/CustomFieldCompilerPass.php b/DependencyInjection/CustomFieldCompilerPass.php index 94eb4d9c3..d1a2b8a14 100644 --- a/DependencyInjection/CustomFieldCompilerPass.php +++ b/DependencyInjection/CustomFieldCompilerPass.php @@ -17,13 +17,13 @@ class CustomFieldCompilerPass implements CompilerPassInterface { public function process(ContainerBuilder $container) { - if (!$container->hasDefinition('chill.custom_field_compiler')) { - throw new \LogicException('service chill.custom_field_compiler ' + if (!$container->hasDefinition('chill.custom_field.provider')) { + throw new \LogicException('service chill.custom_field.provider ' . 'is not defined.'); } $definition = $container->getDefinition( - 'chill.custom_field_compiler' + 'chill.custom_field.provider' ); $taggedServices = $container->findTaggedServiceIds( diff --git a/Resources/config/services.yml b/Resources/config/services.yml index 14bdc0f96..b077c3130 100644 --- a/Resources/config/services.yml +++ b/Resources/config/services.yml @@ -7,7 +7,7 @@ services: tags: - { name: routing.loader } - chill.custom_field_compiler: + chill.custom_field.provider: class: Chill\CustomFieldsBundle\Service\CustomFieldProvider call: - [setContainer, ["@service_container"]] @@ -15,7 +15,7 @@ services: chill.custom_field.custom_field_choice_type: class: Chill\CustomFieldsBundle\Form\CustomFieldType arguments: - - "@chill.custom_field_compiler" + - "@chill.custom_field.provider" tags: - { name: 'form.type', alias: 'custom_field_choice' } @@ -32,7 +32,7 @@ services: class: Chill\CustomFieldsBundle\Form\Type\CustomFieldType arguments: - "@doctrine.orm.entity_manager" - - "@chill.custom_field_compiler" + - "@chill.custom_field.provider" tags: - { name: 'form.type', alias: 'custom_field' }