Skip to content

Commit

Permalink
Merge pull request #59 from szymach/dev
Browse files Browse the repository at this point in the history
Move ResourceRepository services definitions out of main files
  • Loading branch information
chives authored Jan 12, 2017
2 parents ced0664 + 9ea19af commit 5149956
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
15 changes: 15 additions & 0 deletions Resources/config/context/resource.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,21 @@
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">

<parameters>
<parameter key="admin_translatable.controller.resource.class">FSi\Bundle\AdminTranslatableBundle\Controller\TranslatableResourceController</parameter>
<parameter key="admin_translatable.resource.context.class">FSi\Bundle\AdminTranslatableBundle\Doctrine\Admin\Context\ResourceRepositoryContext</parameter>
<parameter key="admin_translatable.resource.map_builder.class">FSi\Bundle\AdminTranslatableBundle\Repository\TranslatableMapBuilder</parameter>
<parameter key="admin_translatable.form_extension.translatable_resource.class">FSi\Bundle\AdminTranslatableBundle\Repository\Form\ResourceTypeExtension</parameter>
</parameters>

<services>
<!-- Controller -->
<service id="admin_translatable.controller.resource" class="%admin_translatable.controller.resource.class%">
<argument type="service" id="templating"/>
<argument type="service" id="admin.context.manager"/>
<argument>%admin.templates.resource%</argument>
</service>

<!-- Context -->
<service id="admin_translatable.resource.context" class="%admin_translatable.resource.context.class%">
<argument type="collection">
<argument type="service" id="admin.resource.context.request_handler.form_submit"/>
Expand All @@ -27,5 +37,10 @@
<argument type="service" id="fsi_doctrine_extensions.listener.translatable" />
</service>

<!-- Form -->
<service id="admin_translatable.form_extension.translatable_resource" class="%admin_translatable.form_extension.translatable_resource.class%">
<argument type="service" id="admin_translatable.resource.map_builder" />
<tag name="form.type_extension" alias="resource" />
</service>
</services>
</container>
7 changes: 0 additions & 7 deletions Resources/config/controller.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,13 @@
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">

<parameters>
<parameter key="admin_translatable.controller.resource.class">FSi\Bundle\AdminTranslatableBundle\Controller\TranslatableResourceController</parameter>
<parameter key="admin_translatable.controller.display.class">FSi\Bundle\AdminTranslatableBundle\Controller\TranslatableDisplayController</parameter>
<parameter key="admin_translatable.controller.list.class">FSi\Bundle\AdminTranslatableBundle\Controller\TranslatableListController</parameter>
<parameter key="admin_translatable.controller.form.class">FSi\Bundle\AdminTranslatableBundle\Controller\TranslatableFormController</parameter>
<parameter key="admin_translatable.controller.batch.class">FSi\Bundle\AdminTranslatableBundle\Controller\TranslatableBatchController</parameter>
</parameters>

<services>
<service id="admin_translatable.controller.resource" class="%admin_translatable.controller.resource.class%">
<argument type="service" id="templating"/>
<argument type="service" id="admin.context.manager"/>
<argument>%admin.templates.resource%</argument>
</service>

<service id="admin_translatable.controller.display" class="%admin_translatable.controller.display.class%">
<argument type="service" id="templating"/>
<argument type="service" id="admin.context.manager"/>
Expand Down
6 changes: 0 additions & 6 deletions Resources/config/form.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
<parameter key="admin_translatable.form_listener.translatable_collection.class">FSi\Bundle\AdminTranslatableBundle\Form\TranslatableCollectionListener</parameter>
<parameter key="admin_translatable.form_helper.class">FSi\Bundle\AdminTranslatableBundle\Form\TranslatableFormHelper</parameter>
<parameter key="admin_translatable.form_extension.translatable_file.class">FSi\Bundle\AdminTranslatableBundle\Form\TranslatableFSiRemovableFileExtension</parameter>
<parameter key="admin_translatable.form_extension.translatable_resource.class">FSi\Bundle\AdminTranslatableBundle\Repository\Form\ResourceTypeExtension</parameter>
</parameters>

<services>
Expand Down Expand Up @@ -54,10 +53,5 @@
<argument type="service" id="fsi_doctrine_extensions.resolver.fsi.file_path" />
<tag name="form.type_extension" alias="fsi_removable_file" />
</service>

<service id="admin_translatable.form_extension.translatable_resource" class="%admin_translatable.form_extension.translatable_resource.class%">
<argument type="service" id="admin_translatable.resource.map_builder" />
<tag name="form.type_extension" alias="resource" />
</service>
</services>
</container>

0 comments on commit 5149956

Please sign in to comment.