2018-01-12 19:39:07 +00: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:
|
2018-01-17 18:55:26 +00:00
|
|
|
locale: en
|
2018-11-28 17:22:05 +00:00
|
|
|
app_locales: en|de|it|fr|es|ru|ar|hu|pt_BR
|
2018-01-12 19:39:07 +00:00
|
|
|
|
2016-10-20 20:10:41 +00:00
|
|
|
services:
|
2018-01-12 19:39:07 +00: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.
|
2018-01-21 21:50:46 +00:00
|
|
|
bind:
|
|
|
|
$projectDirectory: "%kernel.project_dir%"
|
2019-01-21 11:49:22 +00:00
|
|
|
$hardLimit: "%kimai.timesheet.active_entries.hard_limit%"
|
2018-01-12 19:39:07 +00: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/*'
|
2019-03-14 02:34:54 +00:00
|
|
|
exclude: '../src/{DependencyInjection,Entity,Migrations,Tests,Kernel.php,Constants.php}'
|
2018-01-12 19:39:07 +00: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-07 14:11:03 +00:00
|
|
|
# ================================================================================
|
2018-01-12 19:39:07 +00:00
|
|
|
# APPLICATION CORE
|
2018-01-07 14:11:03 +00:00
|
|
|
# ================================================================================
|
|
|
|
|
2018-01-17 18:55:26 +00:00
|
|
|
App\EventSubscriber\RedirectToLocaleSubscriber:
|
2018-01-12 19:39:07 +00:00
|
|
|
arguments: ['@router', '%app_locales%', '%locale%']
|
2018-01-05 17:18:09 +00:00
|
|
|
|
2018-07-27 18:19:56 +00:00
|
|
|
App\Calendar\Service:
|
|
|
|
arguments:
|
|
|
|
$config: "%kimai.calendar%"
|
|
|
|
|
2018-08-17 21:17:02 +00:00
|
|
|
App\Repository\WidgetRepository:
|
|
|
|
arguments:
|
|
|
|
$widgets: "%kimai.widgets%"
|
|
|
|
|
|
|
|
App\Controller\DashboardController:
|
|
|
|
arguments:
|
|
|
|
$dashboard: "%kimai.dashboard%"
|
|
|
|
|
2018-09-02 10:10:49 +00:00
|
|
|
App\Twig\MarkdownExtension:
|
|
|
|
arguments:
|
|
|
|
$timesheetAsMarkdown: "%kimai.timesheet.markdown%"
|
|
|
|
|
2019-03-11 13:46:30 +00:00
|
|
|
App\Controller\CustomerController:
|
2018-10-21 13:27:43 +00:00
|
|
|
arguments:
|
|
|
|
$defaults: "%kimai.defaults%"
|
2019-02-03 20:24:30 +00:00
|
|
|
|
2019-03-14 02:34:54 +00:00
|
|
|
App\Configuration\LanguageFormattings:
|
2019-02-03 20:24:30 +00:00
|
|
|
arguments:
|
|
|
|
$languageSettings: "%kimai.languages%"
|
|
|
|
|
2018-01-07 14:11:03 +00:00
|
|
|
# ================================================================================
|
2018-01-12 19:39:07 +00:00
|
|
|
# DATABASE
|
2018-01-07 14:11:03 +00:00
|
|
|
# ================================================================================
|
2016-10-20 20:10:41 +00:00
|
|
|
|
2018-01-12 19:39:07 +00:00
|
|
|
# service that prefixes every database table
|
2018-01-21 21:50:46 +00:00
|
|
|
App\Doctrine\TablePrefixSubscriber:
|
2018-01-12 19:39:07 +00:00
|
|
|
class: App\Doctrine\TablePrefixSubscriber
|
2018-01-05 13:10:08 +00:00
|
|
|
tags:
|
2018-01-12 19:39:07 +00:00
|
|
|
- { name: doctrine.event_subscriber }
|
2018-01-05 13:10:08 +00:00
|
|
|
|
2018-02-07 11:51:00 +00:00
|
|
|
# updates timesheet records and apply configured rate & rounding rules
|
2018-01-21 21:50:46 +00:00
|
|
|
App\Doctrine\TimesheetSubscriber:
|
2018-01-16 20:35:23 +00:00
|
|
|
class: App\Doctrine\TimesheetSubscriber
|
2018-02-07 11:51:00 +00:00
|
|
|
arguments: [!tagged timesheet.calculator]
|
2018-01-06 18:45:49 +00:00
|
|
|
tags:
|
2019-03-11 13:46:30 +00:00
|
|
|
- { name: doctrine.event_subscriber, priority: 50 }
|
2018-01-06 18:45:49 +00:00
|
|
|
|
2019-02-20 19:06:19 +00:00
|
|
|
# make sure, that sqlite supports foreign keys and cascade deletes
|
|
|
|
App\Doctrine\SqliteSessionInitSubscriber:
|
|
|
|
class: App\Doctrine\SqliteSessionInitSubscriber
|
|
|
|
tags:
|
|
|
|
- { name: doctrine.event_listener, event: postConnect }
|
|
|
|
|
2018-01-07 14:11:03 +00:00
|
|
|
# ================================================================================
|
|
|
|
# FORMS
|
|
|
|
# ================================================================================
|
2018-01-06 18:45:49 +00:00
|
|
|
|
2018-01-12 23:20:41 +00:00
|
|
|
App\Form\Type\UserRoleType:
|
2018-01-05 13:10:08 +00:00
|
|
|
arguments: ["%security.role_hierarchy.roles%"]
|
2018-10-23 21:59:38 +00:00
|
|
|
|
|
|
|
App\Form\Type\LanguageType:
|
|
|
|
arguments: ["%app_locales%"]
|
2018-01-05 13:10:08 +00:00
|
|
|
|
2018-06-21 16:25:11 +00:00
|
|
|
App\Form\Extension\DocumentationLinkExtension:
|
|
|
|
tags:
|
|
|
|
- { name: form.type_extension, extended_type: Symfony\Component\Form\Extension\Core\Type\FormType }
|
|
|
|
|
2018-11-06 22:35:09 +00:00
|
|
|
App\Form\Extension\EnhancedChoiceTypeExtension:
|
|
|
|
arguments: ["%kimai.theme.select_type%"]
|
|
|
|
tags:
|
|
|
|
- { name: form.type_extension, extended_type: Symfony\Bridge\Doctrine\Form\Type\EntityType }
|
|
|
|
|
2019-01-21 11:49:22 +00:00
|
|
|
App\Form\TimesheetEditForm:
|
|
|
|
arguments:
|
|
|
|
$durationOnly: "%kimai.timesheet.duration_only%"
|
|
|
|
|
2019-01-21 12:10:53 +00:00
|
|
|
App\Form\Extension\SelectWithApiDataExtension:
|
|
|
|
tags:
|
|
|
|
- { name: form.type_extension, extended_type: Symfony\Bridge\Doctrine\Form\Type\EntityType }
|
|
|
|
|
2019-02-08 17:24:33 +00:00
|
|
|
App\Validator\Constraints\TimesheetValidator:
|
|
|
|
arguments:
|
|
|
|
$ruleset: "%kimai.timesheet.rules%"
|
2019-03-06 09:24:27 +00:00
|
|
|
$durationOnly: "%kimai.timesheet.duration_only%"
|
2019-02-08 17:24:33 +00:00
|
|
|
|
2018-01-07 14:11:03 +00:00
|
|
|
# ================================================================================
|
|
|
|
# THEME
|
|
|
|
# ================================================================================
|
2018-01-06 18:45:49 +00:00
|
|
|
|
2018-07-09 16:25:08 +00:00
|
|
|
KevinPapst\AdminLTEBundle\Helper\ContextHelper:
|
|
|
|
alias: admin_lte_theme.context_helper
|
|
|
|
|
2018-02-07 11:51:00 +00:00
|
|
|
# ================================================================================
|
|
|
|
# TIMESHEET RECORD CALCULATOR
|
|
|
|
# ================================================================================
|
|
|
|
|
|
|
|
App\Timesheet\Calculator\DurationCalculator:
|
|
|
|
arguments: ["%kimai.timesheet.rounding%"]
|
|
|
|
|
|
|
|
App\Timesheet\Calculator\RateCalculator:
|
|
|
|
arguments: ["%kimai.timesheet.rates%"]
|
2018-08-08 21:10:45 +00:00
|
|
|
|
2018-11-26 12:20:32 +00:00
|
|
|
# ================================================================================
|
|
|
|
# SECURITY & VOTER
|
|
|
|
# ================================================================================
|
|
|
|
|
|
|
|
App\Security\RolePermissionManager:
|
|
|
|
arguments: ["%kimai.permissions%"]
|
|
|
|
|
2018-08-08 21:10:45 +00:00
|
|
|
# ================================================================================
|
|
|
|
# REPOSITORIES
|
|
|
|
# ================================================================================
|
|
|
|
|
2018-08-17 21:17:02 +00:00
|
|
|
App\Repository\TimesheetRepository:
|
|
|
|
class: Doctrine\ORM\EntityRepository
|
|
|
|
factory: ['@doctrine.orm.entity_manager', getRepository]
|
|
|
|
arguments: ['App\Entity\Timesheet']
|
|
|
|
|
2018-08-08 21:10:45 +00:00
|
|
|
App\Repository\UserRepository:
|
|
|
|
class: Doctrine\ORM\EntityRepository
|
|
|
|
factory: ['@doctrine.orm.entity_manager', getRepository]
|
|
|
|
arguments: ['App\Entity\User']
|
|
|
|
|
|
|
|
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']
|
|
|
|
|
|
|
|
App\Repository\CustomerRepository:
|
|
|
|
class: Doctrine\ORM\EntityRepository
|
|
|
|
factory: ['@doctrine.orm.entity_manager', getRepository]
|
|
|
|
arguments: ['App\Entity\Customer']
|
2018-09-02 09:36:04 +00:00
|
|
|
|
|
|
|
App\Repository\InvoiceTemplateRepository:
|
|
|
|
class: Doctrine\ORM\EntityRepository
|
|
|
|
factory: ['@doctrine.orm.entity_manager', getRepository]
|
|
|
|
arguments: ['App\Entity\InvoiceTemplate']
|
2018-09-20 23:27:56 +00:00
|
|
|
|
|
|
|
App\Repository\InvoiceDocumentRepository:
|
|
|
|
class: App\Repository\InvoiceDocumentRepository
|
|
|
|
arguments: ['%kimai.invoice.documents%']
|