mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 17:39:06 +02:00
Improved structure of services.yaml
This commit is contained in:
parent
decc4e90fc
commit
e836a9d036
1 changed files with 94 additions and 63 deletions
|
@ -33,12 +33,20 @@ services:
|
|||
resource: '../src/Controller'
|
||||
tags: ['controller.service_arguments']
|
||||
|
||||
####################################################################################################################
|
||||
# Email
|
||||
####################################################################################################################
|
||||
|
||||
App\EventSubscriber\SetMailFromSubscriber:
|
||||
tags: ['kernel.event_subscriber']
|
||||
arguments:
|
||||
$email: '%partdb.mail.sender_email%'
|
||||
$name: '%partdb.mail.sender_name%'
|
||||
|
||||
####################################################################################################################
|
||||
# Log System
|
||||
####################################################################################################################
|
||||
|
||||
App\Services\LogSystem\EventLogger:
|
||||
arguments:
|
||||
# By default only log events which has minimum info level (debug levels are not logged)
|
||||
|
@ -49,17 +57,6 @@ services:
|
|||
# Only the event classes specified here are saved to DB (set to []) to log all events
|
||||
$whitelist: []
|
||||
|
||||
|
||||
Liip\ImagineBundle\Service\FilterService:
|
||||
alias: 'liip_imagine.service.filter'
|
||||
|
||||
app.doctrine.elementListener:
|
||||
class: App\Security\EntityListeners\ElementPermissionListener
|
||||
public: false
|
||||
autowire: true
|
||||
tags:
|
||||
- { name: "doctrine.orm.entity_listener" }
|
||||
|
||||
App\EventSubscriber\LogSystem\EventLoggerSubscriber:
|
||||
arguments:
|
||||
$save_changed_fields: '%env(bool:HISTORY_SAVE_CHANGED_FIELDS)%'
|
||||
|
@ -72,28 +69,57 @@ services:
|
|||
tags:
|
||||
- { name: 'doctrine.event_subscriber' }
|
||||
|
||||
App\Form\AttachmentFormType:
|
||||
arguments:
|
||||
$allow_attachments_downloads: '%partdb.attachments.allow_downloads%'
|
||||
|
||||
tree_invalidation_listener:
|
||||
class: App\EntityListeners\TreeCacheInvalidationListener
|
||||
tags:
|
||||
- { name: doctrine.orm.entity_listener }
|
||||
App\Services\Attachments\AttachmentSubmitHandler:
|
||||
arguments:
|
||||
$allow_attachments_downloads: '%partdb.attachments.allow_downloads%'
|
||||
$mimeTypes: '@mime_types'
|
||||
|
||||
attachment_delete_listener:
|
||||
class: App\EntityListeners\AttachmentDeleteListener
|
||||
####################################################################################################################
|
||||
# Attachment system
|
||||
####################################################################################################################
|
||||
|
||||
Liip\ImagineBundle\Service\FilterService:
|
||||
alias: 'liip_imagine.service.filter'
|
||||
|
||||
App\EntityListeners\AttachmentDeleteListener:
|
||||
tags:
|
||||
- name: doctrine.orm.entity_listener
|
||||
|
||||
# Dont use JSONSerializable Interface,
|
||||
serializer.normalizer.json_serializable:
|
||||
class: Symfony\Component\Serializer\Normalizer\JsonSerializableNormalizer
|
||||
tags:
|
||||
- {name: serializer.normalizer, priority: -9000}
|
||||
|
||||
App\Controller\RedirectController:
|
||||
App\Services\Attachments\AttachmentPathResolver:
|
||||
arguments:
|
||||
$default_locale: '%partdb.locale%'
|
||||
$enforce_index_php: '%env(bool:NO_URL_REWRITE_AVAILABLE)%'
|
||||
$project_dir: '%kernel.project_dir%'
|
||||
$media_path: '%partdb.attachments.dir.media%'
|
||||
$secure_path: '%partdb.attachments.dir.secure%'
|
||||
$footprints_path: 'public/img/footprints'
|
||||
$models_path: null
|
||||
|
||||
App\Services\Attachments\FileTypeFilterTools:
|
||||
arguments:
|
||||
$mimeTypes: '@mime_types'
|
||||
|
||||
####################################################################################################################
|
||||
# Security
|
||||
####################################################################################################################
|
||||
|
||||
App\Security\EntityListeners\ElementPermissionListener:
|
||||
tags:
|
||||
- { name: "doctrine.orm.entity_listener" }
|
||||
|
||||
####################################################################################################################
|
||||
# Cache
|
||||
####################################################################################################################
|
||||
|
||||
App\EntityListeners\TreeCacheInvalidationListener:
|
||||
tags:
|
||||
- { name: doctrine.orm.entity_listener }
|
||||
|
||||
####################################################################################################################
|
||||
# Price system
|
||||
####################################################################################################################
|
||||
App\Command\UpdateExchangeRatesCommand:
|
||||
arguments:
|
||||
$base_current: '%partdb.default_currency%'
|
||||
|
@ -110,15 +136,9 @@ services:
|
|||
arguments:
|
||||
$base_currency: '%partdb.default_currency%'
|
||||
|
||||
App\Form\AttachmentFormType:
|
||||
arguments:
|
||||
$allow_attachments_downloads: '%partdb.attachments.allow_downloads%'
|
||||
|
||||
App\Services\Attachments\AttachmentSubmitHandler:
|
||||
arguments:
|
||||
$allow_attachments_downloads: '%partdb.attachments.allow_downloads%'
|
||||
$mimeTypes: '@mime_types'
|
||||
|
||||
###################################################################################################################
|
||||
# User system
|
||||
####################################################################################################################
|
||||
App\Form\UserSettingsType:
|
||||
arguments:
|
||||
$demo_mode: '%partdb.demo_mode%'
|
||||
|
@ -131,32 +151,43 @@ services:
|
|||
arguments:
|
||||
$allow_email_pw_reset: '%partdb.users.email_pw_reset%'
|
||||
|
||||
App\Services\Attachments\AttachmentPathResolver:
|
||||
arguments:
|
||||
$project_dir: '%kernel.project_dir%'
|
||||
$media_path: '%partdb.attachments.dir.media%'
|
||||
$secure_path: '%partdb.attachments.dir.secure%'
|
||||
$footprints_path: 'public/img/footprints'
|
||||
$models_path: null
|
||||
|
||||
App\Services\Attachments\FileTypeFilterTools:
|
||||
arguments:
|
||||
$mimeTypes: '@mime_types'
|
||||
|
||||
App\Services\TFA\BackupCodeGenerator:
|
||||
arguments:
|
||||
$code_length: 8
|
||||
$code_count: 15
|
||||
|
||||
App\Services\LabelSystem\LabelTextReplacer:
|
||||
arguments:
|
||||
$providers: !tagged_iterator 'app.label_placeholder_provider'
|
||||
|
||||
App\Services\TranslationExtractor\PermissionExtractor:
|
||||
tags:
|
||||
- { name: 'translation.extractor', alias: 'permissionExtractor'}
|
||||
|
||||
|
||||
####################################################################################################################
|
||||
# Label system
|
||||
####################################################################################################################
|
||||
App\Services\LabelSystem\LabelTextReplacer:
|
||||
arguments:
|
||||
$providers: !tagged_iterator 'app.label_placeholder_provider'
|
||||
|
||||
# PartLotProvider must be invoked before all other providers, so it can override %%NAME%% placeholder
|
||||
App\Services\LabelSystem\PlaceholderProviders\PartLotProvider:
|
||||
tags:
|
||||
- { name: 'app.label_placeholder_provider', priority: 10}
|
||||
|
||||
####################################################################################################################
|
||||
# Symfony overrides
|
||||
####################################################################################################################
|
||||
|
||||
# Dont use JSONSerializable Interface,
|
||||
serializer.normalizer.json_serializable:
|
||||
class: Symfony\Component\Serializer\Normalizer\JsonSerializableNormalizer
|
||||
tags:
|
||||
- {name: serializer.normalizer, priority: -9000}
|
||||
|
||||
|
||||
####################################################################################################################
|
||||
# Miscellaneous
|
||||
####################################################################################################################
|
||||
App\Controller\RedirectController:
|
||||
arguments:
|
||||
$default_locale: '%partdb.locale%'
|
||||
$enforce_index_php: '%env(bool:NO_URL_REWRITE_AVAILABLE)%'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue