|
| 1 | +<?php |
| 2 | + |
| 3 | +/* |
| 4 | + * This file is part of Sulu. |
| 5 | + * |
| 6 | + * (c) Sulu GmbH |
| 7 | + * |
| 8 | + * This source file is subject to the MIT license that is bundled |
| 9 | + * with this source code in the file LICENSE. |
| 10 | + */ |
| 11 | + |
| 12 | +namespace Symfony\Component\DependencyInjection\Loader\Configurator; |
| 13 | + |
| 14 | +use Sulu\Content\Application\ContentDataMapper\DataMapper\AuthorDataMapper; |
| 15 | +use Sulu\Content\Application\ContentDataMapper\DataMapper\ExcerptDataMapper; |
| 16 | +use Sulu\Content\Application\ContentDataMapper\DataMapper\LinkDataMapper; |
| 17 | +use Sulu\Content\Application\ContentDataMapper\DataMapper\RoutableDataMapper; |
| 18 | +use Sulu\Content\Application\ContentDataMapper\DataMapper\SeoDataMapper; |
| 19 | +use Sulu\Content\Application\ContentDataMapper\DataMapper\ShadowDataMapper; |
| 20 | +use Sulu\Content\Application\ContentDataMapper\DataMapper\TaxonomyDataMapper; |
| 21 | +use Sulu\Content\Application\ContentDataMapper\DataMapper\TemplateDataMapper; |
| 22 | +use Sulu\Content\Application\ContentDataMapper\DataMapper\WebspaceDataMapper; |
| 23 | +use Sulu\Content\Application\ContentDataMapper\DataMapper\WorkflowDataMapper; |
| 24 | +use Symfony\Component\DependencyInjection\ContainerInterface; |
| 25 | +use Symfony\Component\DependencyInjection\Reference; |
| 26 | + |
| 27 | +return static function(ContainerConfigurator $container) { |
| 28 | + $services = $container->services(); |
| 29 | + |
| 30 | + $services->set('sulu_content.template_data_mapper', TemplateDataMapper::class) |
| 31 | + ->args([new Reference('sulu_admin.metadata_provider_registry')]) |
| 32 | + ->tag('sulu_content.data_mapper', ['priority' => 128]); |
| 33 | + |
| 34 | + $services->set('sulu_content.excerpt_data_mapper', ExcerptDataMapper::class) |
| 35 | + ->args([new Reference('sulu_admin.form_metadata_provider')]) |
| 36 | + ->tag('sulu_content.data_mapper', ['priority' => 64]); |
| 37 | + |
| 38 | + $services->set('sulu_content.taxonomy_data_mapper', TaxonomyDataMapper::class) |
| 39 | + ->args([ |
| 40 | + new Reference('sulu.repository.tag'), |
| 41 | + new Reference('sulu_content.category_factory'), |
| 42 | + new Reference('sulu_audience_targeting.target_group_factory', ContainerInterface::NULL_ON_INVALID_REFERENCE), |
| 43 | + ]) |
| 44 | + ->tag('sulu_content.data_mapper', ['priority' => 63]); |
| 45 | + |
| 46 | + $services->set('sulu_content.seo_data_mapper', SeoDataMapper::class) |
| 47 | + ->args([new Reference('sulu_admin.form_metadata_provider')]) |
| 48 | + ->tag('sulu_content.data_mapper', ['priority' => 32]); |
| 49 | + |
| 50 | + $services->set('sulu_content.workflow_data_mapper', WorkflowDataMapper::class) |
| 51 | + ->args([new Reference('sulu_content.content_workflow')]) |
| 52 | + ->tag('sulu_content.data_mapper', ['priority' => 24]); |
| 53 | + |
| 54 | + $services->set('sulu_content.webspace_data_mapper', WebspaceDataMapper::class) |
| 55 | + ->args([new Reference('sulu_core.webspace.webspace_manager')]) |
| 56 | + ->tag('sulu_content.data_mapper', ['priority' => 16]); |
| 57 | + |
| 58 | + $services->set('sulu_content.author_data_mapper', AuthorDataMapper::class) |
| 59 | + ->args([new Reference('sulu_content.contact_factory')]) |
| 60 | + ->tag('sulu_content.data_mapper', ['priority' => 8]); |
| 61 | + |
| 62 | + $services->set('sulu_content.shadow_data_mapper', ShadowDataMapper::class) |
| 63 | + ->tag('sulu_content.data_mapper', ['priority' => 4]); |
| 64 | + |
| 65 | + $services->set('sulu_content.link_data_mapper', LinkDataMapper::class) |
| 66 | + ->tag('sulu_content.data_mapper', ['priority' => 2]); |
| 67 | + |
| 68 | + $services->set('sulu_content.route_data_mapper', RoutableDataMapper::class) |
| 69 | + ->args([ |
| 70 | + new Reference('sulu_route.route_repository'), |
| 71 | + new Reference('sulu_admin.metadata_provider_registry'), |
| 72 | + ]) |
| 73 | + ->tag('sulu_content.data_mapper', ['priority' => -32]); |
| 74 | +}; |
0 commit comments