Part-DB.Part-DB-server/config/services.yaml

69 lines
2.7 KiB
YAML

# This file is the entry point to configure your own services.
# Files in the packages/ subdirectory configure your dependencies.
# Put parameters here that don't need to change on each machine where the app is deployed
# https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration
parameters:
locale: 'en' # Set the default language to use her
partdb_title: 'Part-DB' # The title shown inside of Part-DB (e.g. in the navbar and on homepage)
banner: '' # The info text shown in the homepage
use_gravatar: true # Set to false, if no Gravatar images should be used for user profiles.
default_currency: 'EUR' # The currency that should be used
media_directory: 'data/media/'
db_version_fallback: '5.6' # Be sure to override this, in your .env with your real DB version
services:
# default configuration for services in *this* file
_defaults:
autowire: true # Automatically injects dependencies in your services.
autoconfigure: true # Automatically registers your services as commands, event subscribers, etc.
# makes classes in src/ available to be used as services
# this creates a service per class whose id is the fully-qualified class name
App\:
resource: '../src/*'
exclude: '../src/{DependencyInjection,Entity,Migrations,Tests,Kernel.php}'
# controllers are imported separately to make sure services can be injected
# as action arguments even if you don't extend any base controller class
App\Controller\:
resource: '../src/Controller'
tags: ['controller.service_arguments']
app.doctrine.elementListener:
class: App\Security\EntityListeners\ElementPermissionListener
public: false
autowire: true
tags:
- { name: "doctrine.orm.entity_listener" }
tree_invalidation_listener:
class: App\EntityListeners\TreeCacheInvalidationListener
tags:
- { name: doctrine.orm.entity_listener }
attachment_delete_listener:
class: App\EntityListeners\AttachmentDeleteListener
tags:
- name: doctrine.orm.entity_listener
App\Command\UpdateExchangeRatesCommand:
arguments:
$base_current: '%default_currency%'
App\Form\Type\CurrencyEntityType:
arguments:
$base_currency: '%default_currency%'
App\Services\PricedetailHelper:
arguments:
$base_currency: '%default_currency%'
App\Services\MoneyFormatter:
arguments:
$base_currency: '%default_currency%'
# add more service definitions when explicit configuration is needed
# please note that last definitions always *replace* previous ones