0
0
Fork 0
mirror of https://github.com/kevinpapst/kimai2.git synced 2025-03-22 08:23:26 +00:00
kevinpapst_kimai2/config/services.yaml

258 lines
9.8 KiB
YAML
Raw Permalink Normal View History

2018-01-12 20:39:07 +01:00
# 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
2020-10-26 01:27:10 +02:00
app_locales: ar|cs|de|de_CH|da|en|eo|es|eu|fi|fr|he|hu|it|ja|ko|nl|pl|pt_BR|ro|ru|sk|sv|tr|vi|zh_CN
2018-01-12 20:39:07 +01:00
2016-10-20 22:10:41 +02:00
services:
2018-01-12 20:39:07 +01:00
# 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.
public: false # Allows optimizing the container by removing unused services; this also means
# fetching services directly from the container via $container->get() won't work.
# The best practice is to be explicit about your dependencies anyway.
bind:
2019-06-07 22:48:39 +02:00
$projectDirectory: '%kernel.project_dir%'
$kernelEnvironment: '%kernel.environment%'
2018-01-12 20:39:07 +01:00
# 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/*'
2020-10-07 19:44:55 +02:00
exclude: '../src/{DependencyInjection,Entity,Event,Migrations,Tests,Kernel.php,Constants.php}'
2018-01-12 20:39:07 +01:00
# 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']
# ================================================================================
2018-01-12 20:39:07 +01:00
# APPLICATION CORE
# ================================================================================
App\EventSubscriber\RedirectToLocaleSubscriber:
2018-01-12 20:39:07 +01:00
arguments: ['@router', '%app_locales%', '%locale%']
App\Repository\WidgetRepository:
arguments:
2019-06-07 22:48:39 +02:00
$widgets: '%kimai.widgets%'
App\Controller\DashboardController:
arguments:
2019-06-07 22:48:39 +02:00
$dashboard: '%kimai.dashboard%'
App\Configuration\MailConfiguration:
arguments: ['%env(MAILER_FROM)%']
App\Configuration\LanguageFormattings:
2019-06-07 22:48:39 +02:00
arguments: ['%kimai.languages%']
App\Configuration\TimesheetConfiguration:
arguments:
2019-06-07 22:48:39 +02:00
$settings: '%kimai.timesheet%'
2019-05-19 16:16:20 +02:00
App\Configuration\CalendarConfiguration:
arguments:
2019-06-07 22:48:39 +02:00
$settings: '%kimai.calendar%'
2019-05-19 16:16:20 +02:00
App\Configuration\FormConfiguration:
arguments:
2019-06-07 22:48:39 +02:00
$settings: '%kimai.defaults%'
App\Configuration\SystemConfiguration:
arguments:
2019-06-07 22:48:39 +02:00
$settings: '%kimai.config%'
App\Configuration\ThemeConfiguration:
arguments:
2019-06-07 22:48:39 +02:00
$settings: '%kimai.theme%'
App\Configuration\LdapConfiguration:
arguments: ['%kimai.ldap%']
2019-03-22 14:37:25 +01:00
App\Utils\MPdfConverter:
arguments: ['%kernel.cache_dir%']
2019-04-08 18:38:56 +02:00
App\Plugin\PluginManager:
arguments: [!tagged kimai.plugin]
App\Validator\Constraints\TimesheetValidator:
arguments: [!tagged timesheet.validator]
App\Widget\WidgetService:
arguments:
$renderer: !tagged widget.renderer
App\Utils\Translator:
decorates: translator
arguments:
$localDomains: '%kimai.i18n_domains%'
App\Utils\FileHelper:
arguments:
$dataDir: '%kimai.data_dir%'
# ================================================================================
2018-01-12 20:39:07 +01:00
# DATABASE
# ================================================================================
2016-10-20 22:10:41 +02:00
# updates timesheet records and apply configured rate & rounding rules
App\Doctrine\TimesheetSubscriber:
class: App\Doctrine\TimesheetSubscriber
arguments: [!tagged timesheet.calculator]
tags:
- { name: doctrine.event_subscriber, priority: 50 }
# updates timestampable columns (higher priority, so the TimesheetSubscriber will be executed later)
Gedmo\Timestampable\TimestampableListener:
class: Gedmo\Timestampable\TimestampableListener
tags:
- { name: doctrine.event_subscriber, priority: 60 }
calls:
- [ setAnnotationReader, [ "@annotation_reader" ] ]
# make sure, that sqlite supports foreign keys and cascade deletes
App\Doctrine\SqliteSessionInitSubscriber:
class: App\Doctrine\SqliteSessionInitSubscriber
tags:
- { name: doctrine.event_listener, event: postConnect }
2020-06-11 16:54:51 +02:00
# store and retrieve sessions in and from database
App\Security\SessionHandler:
arguments:
- !service { class: PDO, factory: ['@database_connection', 'getWrappedConnection'] }
# ================================================================================
# FORMS
# ================================================================================
App\Form\Type\LanguageType:
2019-06-07 22:48:39 +02:00
arguments: ['%app_locales%']
# ================================================================================
# THEME
# ================================================================================
KevinPapst\AdminLTEBundle\Helper\ContextHelper:
alias: admin_lte_theme.context_helper
# ================================================================================
# TIMESHEET RECORD CALCULATOR
# ================================================================================
App\Timesheet\RoundingService:
arguments:
$roundingModes: !tagged timesheet.rounding_mode
$rules: '%kimai.timesheet.rounding%'
App\Timesheet\Calculator\RateCalculator:
2019-06-07 22:48:39 +02:00
arguments: ['%kimai.timesheet.rates%']
2018-08-08 23:10:45 +02:00
App\Timesheet\TrackingModeService:
arguments:
$modes: !tagged timesheet.tracking_mode
# ================================================================================
# SECURITY & VOTER
# ================================================================================
2019-06-07 22:48:39 +02:00
App\Security\RoleService:
arguments:
$roles: '%security.role_hierarchy.roles%'
2019-06-07 22:48:39 +02:00
App\Security\RolePermissionManager:
2019-08-20 14:02:15 +02:00
arguments:
$permissions: '%kimai.permissions%'
2019-06-07 22:48:39 +02:00
# ================================================================================
# LDAP
# ================================================================================
2020-01-31 19:47:34 +01:00
App\Ldap\LdapAuthenticationProvider:
2019-06-07 22:48:39 +02:00
arguments: ['@App\Security\UserChecker', '', '', '', '@App\Configuration\LdapConfiguration', '%security.authentication.hide_user_not_found%']
2018-08-08 23:10:45 +02:00
# ================================================================================
# REPOSITORIES
# ================================================================================
App\Repository\TimesheetRepository:
class: Doctrine\ORM\EntityRepository
factory: ['@doctrine.orm.entity_manager', getRepository]
arguments: ['App\Entity\Timesheet']
2018-08-08 23:10:45 +02:00
App\Repository\UserRepository:
class: Doctrine\ORM\EntityRepository
factory: ['@doctrine.orm.entity_manager', getRepository]
arguments: ['App\Entity\User']
2019-08-16 01:22:33 +02:00
App\Repository\TeamRepository:
class: Doctrine\ORM\EntityRepository
factory: ['@doctrine.orm.entity_manager', getRepository]
arguments: ['App\Entity\Team']
2018-08-08 23:10:45 +02:00
App\Repository\ActivityRepository:
class: Doctrine\ORM\EntityRepository
factory: ['@doctrine.orm.entity_manager', getRepository]
arguments: ['App\Entity\Activity']
App\Repository\ProjectRepository:
class: Doctrine\ORM\EntityRepository
factory: ['@doctrine.orm.entity_manager', getRepository]
arguments: ['App\Entity\Project']
2019-05-12 01:40:04 +02:00
App\Repository\TagRepository:
class: Doctrine\ORM\EntityRepository
factory: ['@doctrine.orm.entity_manager', getRepository]
arguments: ['App\Entity\Tag']
2018-08-08 23:10:45 +02:00
App\Repository\CustomerRepository:
class: Doctrine\ORM\EntityRepository
factory: ['@doctrine.orm.entity_manager', getRepository]
arguments: ['App\Entity\Customer']
App\Repository\InvoiceTemplateRepository:
class: Doctrine\ORM\EntityRepository
factory: ['@doctrine.orm.entity_manager', getRepository]
arguments: ['App\Entity\InvoiceTemplate']
App\Repository\ConfigurationRepository:
class: Doctrine\ORM\EntityRepository
factory: ['@doctrine.orm.entity_manager', getRepository]
arguments: ['App\Entity\Configuration']
App\Repository\RoleRepository:
class: Doctrine\ORM\EntityRepository
factory: ['@doctrine.orm.entity_manager', getRepository]
arguments: ['App\Entity\Role']
App\Repository\RolePermissionRepository:
class: Doctrine\ORM\EntityRepository
factory: ['@doctrine.orm.entity_manager', getRepository]
arguments: ['App\Entity\RolePermission']
App\Repository\InvoiceDocumentRepository:
class: App\Repository\InvoiceDocumentRepository
arguments: ['%kimai.invoice.documents%']
2020-02-10 20:29:43 +01:00
App\Repository\CustomerRateRepository:
class: Doctrine\ORM\EntityRepository
factory: ['@doctrine.orm.entity_manager', getRepository]
arguments: ['App\Entity\CustomerRate']
App\Repository\ActivityRateRepository:
class: Doctrine\ORM\EntityRepository
factory: ['@doctrine.orm.entity_manager', getRepository]
arguments: ['App\Entity\ActivityRate']
App\Repository\ProjectRateRepository:
class: Doctrine\ORM\EntityRepository
factory: ['@doctrine.orm.entity_manager', getRepository]
arguments: ['App\Entity\ProjectRate']
App\Repository\InvoiceRepository:
class: Doctrine\ORM\EntityRepository
factory: ['@doctrine.orm.entity_manager', getRepository]
arguments: ['App\Entity\Invoice']