20
config/bundles.php
Normal file
20
config/bundles.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
|
||||
Symfony\Bundle\WebServerBundle\WebServerBundle::class => ['dev' => true],
|
||||
Doctrine\Bundle\DoctrineCacheBundle\DoctrineCacheBundle::class => ['all' => true],
|
||||
Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true],
|
||||
Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle::class => ['dev' => true, 'test' => true],
|
||||
Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true],
|
||||
Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle::class => ['all' => true],
|
||||
Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true],
|
||||
Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true],
|
||||
Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true],
|
||||
Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true],
|
||||
Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle::class => ['all' => true],
|
||||
Avanzu\AdminThemeBundle\AvanzuAdminThemeBundle::class => ['all' => true],
|
||||
WhiteOctober\PagerfantaBundle\WhiteOctoberPagerfantaBundle::class => ['all' => true],
|
||||
Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true],
|
||||
Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true, 'test' => true],
|
||||
];
|
||||
14
config/packages/avanzu_admin_theme.yml
Normal file
14
config/packages/avanzu_admin_theme.yml
Normal file
@@ -0,0 +1,14 @@
|
||||
avanzu_admin_theme:
|
||||
use_twig: true
|
||||
use_assetic: true
|
||||
bower_bin: "/usr/local/bin/bower"
|
||||
options:
|
||||
default_avatar: images/default_avatar.png
|
||||
skin: skin-green-light
|
||||
fixed_layout: false
|
||||
boxed_layout: false
|
||||
collapsed_sidebar: true
|
||||
mini_sidebar: true
|
||||
control_sidebar: false
|
||||
knp_menu:
|
||||
enable: false
|
||||
16
config/packages/dev/easy_log_handler.yaml
Normal file
16
config/packages/dev/easy_log_handler.yaml
Normal file
@@ -0,0 +1,16 @@
|
||||
services:
|
||||
EasyCorp\EasyLog\EasyLogHandler:
|
||||
public: false
|
||||
arguments: ['%kernel.logs_dir%/%kernel.environment%.log']
|
||||
|
||||
#// FIXME: How to add this configuration automatically without messing up with the monolog configuration?
|
||||
#monolog:
|
||||
# handlers:
|
||||
# buffered:
|
||||
# type: buffer
|
||||
# handler: easylog
|
||||
# channels: ['!event']
|
||||
# level: debug
|
||||
# easylog:
|
||||
# type: service
|
||||
# id: EasyCorp\EasyLog\EasyLogHandler
|
||||
19
config/packages/dev/monolog.yaml
Normal file
19
config/packages/dev/monolog.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
monolog:
|
||||
handlers:
|
||||
main:
|
||||
type: stream
|
||||
path: "%kernel.logs_dir%/%kernel.environment%.log"
|
||||
level: debug
|
||||
channels: ["!event"]
|
||||
# uncomment to get logging in your browser
|
||||
# you may have to allow bigger header sizes in your Web server configuration
|
||||
#firephp:
|
||||
# type: firephp
|
||||
# level: info
|
||||
#chromephp:
|
||||
# type: chromephp
|
||||
# level: info
|
||||
console:
|
||||
type: console
|
||||
process_psr_3_messages: false
|
||||
channels: ["!event", "!doctrine", "!console"]
|
||||
3
config/packages/dev/routing.yaml
Normal file
3
config/packages/dev/routing.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
framework:
|
||||
router:
|
||||
strict_requirements: true
|
||||
4
config/packages/dev/swiftmailer.yaml
Normal file
4
config/packages/dev/swiftmailer.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
# See https://symfony.com/doc/current/email/dev_environment.html
|
||||
swiftmailer:
|
||||
# send all emails to a specific address
|
||||
#delivery_addresses: ['me@example.com']
|
||||
6
config/packages/dev/web_profiler.yaml
Normal file
6
config/packages/dev/web_profiler.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
web_profiler:
|
||||
toolbar: true
|
||||
intercept_redirects: false
|
||||
|
||||
framework:
|
||||
profiler: { only_exceptions: false }
|
||||
27
config/packages/doctrine.yaml
Normal file
27
config/packages/doctrine.yaml
Normal file
@@ -0,0 +1,27 @@
|
||||
parameters:
|
||||
# Adds a fallback DATABASE_URL if the env var is not set.
|
||||
# This allows you to run cache:warmup even if your
|
||||
# environment variables are not available yet.
|
||||
# You should not need to change this value.
|
||||
env(DATABASE_URL): ''
|
||||
|
||||
doctrine:
|
||||
dbal:
|
||||
# configure these for your database server
|
||||
driver: 'pdo_mysql'
|
||||
server_version: '5.7'
|
||||
charset: utf8mb4
|
||||
|
||||
# With Symfony 3.3, remove the `resolve:` prefix
|
||||
url: '%env(resolve:DATABASE_URL)%'
|
||||
orm:
|
||||
auto_generate_proxy_classes: '%kernel.debug%'
|
||||
naming_strategy: doctrine.orm.naming_strategy.underscore
|
||||
auto_mapping: true
|
||||
mappings:
|
||||
App:
|
||||
is_bundle: false
|
||||
type: annotation
|
||||
dir: '%kernel.project_dir%/src/Entity'
|
||||
prefix: 'App\Entity'
|
||||
alias: Kimai
|
||||
86
config/packages/doctrine_extensions_mysql.yaml
Normal file
86
config/packages/doctrine_extensions_mysql.yaml
Normal file
@@ -0,0 +1,86 @@
|
||||
doctrine:
|
||||
orm:
|
||||
dql:
|
||||
datetime_functions:
|
||||
convert_tz: DoctrineExtensions\Query\Mysql\ConvertTz
|
||||
date: DoctrineExtensions\Query\Mysql\Date
|
||||
date_format: DoctrineExtensions\Query\Mysql\DateFormat
|
||||
dateadd: DoctrineExtensions\Query\Mysql\DateAdd
|
||||
datesub: DoctrineExtensions\Query\Mysql\DateSub
|
||||
datediff: DoctrineExtensions\Query\Mysql\DateDiff
|
||||
day: DoctrineExtensions\Query\Mysql\Day
|
||||
dayname: DoctrineExtensions\Query\Mysql\DayName
|
||||
dayofweek: DoctrineExtensions\Query\Mysql\DayOfWeek
|
||||
dayofyear: DoctrineExtensions\Query\Mysql\DayOfYear
|
||||
div: DoctrineExtensions\Query\Mysql\Div
|
||||
from_unixtime: DoctrineExtensions\Query\Mysql\FromUnixtime
|
||||
last_day: DoctrineExtensions\Query\Mysql\LastDay
|
||||
minute: DoctrineExtensions\Query\Mysql\Minute
|
||||
now: DoctrineExtensions\Query\Mysql\Now
|
||||
month: DoctrineExtensions\Query\Mysql\Month
|
||||
monthname: DoctrineExtensions\Query\Mysql\MonthName
|
||||
second: DoctrineExtensions\Query\Mysql\Second
|
||||
strtodate: DoctrineExtensions\Query\Mysql\StrToDate
|
||||
time: DoctrineExtensions\Query\Mysql\Time
|
||||
timediff: DoctrineExtensions\Query\Mysql\TimeDiff
|
||||
timestampadd: DoctrineExtensions\Query\Mysql\TimestampAdd
|
||||
timestampdiff: DoctrineExtensions\Query\Mysql\TimestampDiff
|
||||
timetosec: DoctrineExtensions\Query\Mysql\TimeToSec
|
||||
week: DoctrineExtensions\Query\Mysql\Week
|
||||
weekday: DoctrineExtensions\Query\Mysql\WeekDay
|
||||
year: DoctrineExtensions\Query\Mysql\Year
|
||||
yearweek: DoctrineExtensions\Query\Mysql\YearWeek
|
||||
unix_timestamp: DoctrineExtensions\Query\Mysql\UnixTimestamp
|
||||
|
||||
numeric_functions:
|
||||
acos: DoctrineExtensions\Query\Mysql\Acos
|
||||
asin: DoctrineExtensions\Query\Mysql\Asin
|
||||
atan2: DoctrineExtensions\Query\Mysql\Atan2
|
||||
atan: DoctrineExtensions\Query\Mysql\Atan
|
||||
bit_count: DoctrineExtensions\Query\Mysql\BitCount
|
||||
bit_xor: DoctrineExtensions\Query\Mysql\BitXor
|
||||
ceil: DoctrineExtensions\Query\Mysql\Ceil
|
||||
cos: DoctrineExtensions\Query\Mysql\Cos
|
||||
cot: DoctrineExtensions\Query\Mysql\Cot
|
||||
floor: DoctrineExtensions\Query\Mysql\Floor
|
||||
hour: DoctrineExtensions\Query\Mysql\Hour
|
||||
pi: DoctrineExtensions\Query\Mysql\Pi
|
||||
power: DoctrineExtensions\Query\Mysql\Power
|
||||
quarter: DoctrineExtensions\Query\Mysql\Quarter
|
||||
rand: DoctrineExtensions\Query\Mysql\Rand
|
||||
round: DoctrineExtensions\Query\Mysql\Round
|
||||
stddev: DoctrineExtensions\Query\Mysql\StdDev
|
||||
sin: DoctrineExtensions\Query\Mysql\Sin
|
||||
std: DoctrineExtensions\Query\Mysql\Std
|
||||
tan: DoctrineExtensions\Query\Mysql\Tan
|
||||
|
||||
string_functions:
|
||||
ascii: DoctrineExtensions\Query\Mysql\Ascii
|
||||
binary: DoctrineExtensions\Query\Mysql\Binary
|
||||
char_length: DoctrineExtensions\Query\Mysql\CharLength
|
||||
concat_ws: DoctrineExtensions\Query\Mysql\ConcatWs
|
||||
countif: DoctrineExtensions\Query\Mysql\CountIf
|
||||
crc32: DoctrineExtensions\Query\Mysql\Crc32
|
||||
degrees: DoctrineExtensions\Query\Mysql\Degrees
|
||||
field: DoctrineExtensions\Query\Mysql\Field
|
||||
find_in_set: DoctrineExtensions\Query\Mysql\FindInSet
|
||||
greatest: DoctrineExtensions\Query\Mysql\Greatest
|
||||
group_concat: DoctrineExtensions\Query\Mysql\GroupConcat
|
||||
ifelse: DoctrineExtensions\Query\Mysql\IfElse
|
||||
ifnull: DoctrineExtensions\Query\Mysql\IfNull
|
||||
least: DoctrineExtensions\Query\Mysql\Least
|
||||
lpad: DoctrineExtensions\Query\Mysql\Lpad
|
||||
match_against: DoctrineExtensions\Query\Mysql\MatchAgainst
|
||||
md5: DoctrineExtensions\Query\Mysql\Md5
|
||||
nullif: DoctrineExtensions\Query\Mysql\NullIf
|
||||
radians: DoctrineExtensions\Query\Mysql\Radians
|
||||
regexp: DoctrineExtensions\Query\Mysql\Regexp
|
||||
replace: DoctrineExtensions\Query\Mysql\Replace
|
||||
rpad: DoctrineExtensions\Query\Mysql\Rpad
|
||||
sha1: DoctrineExtensions\Query\Mysql\Sha1
|
||||
sha2: DoctrineExtensions\Query\Mysql\Sha2
|
||||
soundex: DoctrineExtensions\Query\Mysql\Soundex
|
||||
substring_index: DoctrineExtensions\Query\Mysql\SubstringIndex
|
||||
uuid_short: DoctrineExtensions\Query\Mysql\UuidShort
|
||||
hex: DoctrineExtensions\Query\Mysql\Hex
|
||||
unhex: DoctrineExtensions\Query\Mysql\Unhex
|
||||
50
config/packages/doctrine_extensions_sqlite.yaml
Normal file
50
config/packages/doctrine_extensions_sqlite.yaml
Normal file
@@ -0,0 +1,50 @@
|
||||
doctrine:
|
||||
orm:
|
||||
dql:
|
||||
datetime_functions:
|
||||
date: DoctrineExtensions\Query\Sqlite\Date
|
||||
date_format: DoctrineExtensions\Query\Sqlite\DateFormat
|
||||
#dateadd: DoctrineExtensions\Query\Sqlite\DateAdd
|
||||
#datediff: DoctrineExtensions\Query\Sqlite\DateDiff
|
||||
day: DoctrineExtensions\Query\Sqlite\Day
|
||||
dayname: DoctrineExtensions\Query\Sqlite\DayName
|
||||
minute: DoctrineExtensions\Query\Sqlite\Minute
|
||||
#month: DoctrineExtensions\Query\Sqlite\Month
|
||||
#monthname: DoctrineExtensions\Query\Sqlite\MonthName
|
||||
second: DoctrineExtensions\Query\Sqlite\Second
|
||||
month: DoctrineExtensions\Query\Sqlite\Month
|
||||
strftime: DoctrineExtensions\Query\Sqlite\StrfTime
|
||||
#strtodate: DoctrineExtensions\Query\Sqlite\StrToDate
|
||||
#time: DoctrineExtensions\Query\Sqlite\Time
|
||||
#timestampadd: DoctrineExtensions\Query\Sqlite\TimestampAdd
|
||||
#timestampdiff: DoctrineExtensions\Query\Sqlite\TimestampDiff
|
||||
week: DoctrineExtensions\Query\Sqlite\Week
|
||||
weekday: DoctrineExtensions\Query\Sqlite\WeekDay
|
||||
year: DoctrineExtensions\Query\Sqlite\Year
|
||||
|
||||
|
||||
string_functions:
|
||||
# binary: DoctrineExtensions\Query\Sqlite\Binary
|
||||
# char_length: DoctrineExtensions\Query\Sqlite\CharLength
|
||||
concat_ws: DoctrineExtensions\Query\Sqlite\ConcatWs
|
||||
# countif: DoctrineExtensions\Query\Sqlite\CountIf
|
||||
# crc32: DoctrineExtensions\Query\Sqlite\Crc32
|
||||
# degrees: DoctrineExtensions\Query\Sqlite\Degrees
|
||||
# field: DoctrineExtensions\Query\Sqlite\Field
|
||||
# find_in_set: DoctrineExtensions\Query\Sqlite\FindInSet
|
||||
# group_concat: DoctrineExtensions\Query\Sqlite\GroupConcat
|
||||
# ifelse: DoctrineExtensions\Query\Sqlite\IfElse
|
||||
ifnull: DoctrineExtensions\Query\Sqlite\IfNull
|
||||
# match_against: DoctrineExtensions\Query\Sqlite\MatchAgainst
|
||||
# md5: DoctrineExtensions\Query\Sqlite\Md5
|
||||
# nullif: DoctrineExtensions\Query\Sqlite\NullIf
|
||||
# radians: DoctrineExtensions\Query\Sqlite\Radians
|
||||
# regexp: DoctrineExtensions\Query\Sqlite\Regexp
|
||||
replace: DoctrineExtensions\Query\Sqlite\Replace
|
||||
# sha1: DoctrineExtensions\Query\Sqlite\Sha1
|
||||
# sha2: DoctrineExtensions\Query\Sqlite\Sha2
|
||||
# soundex: DoctrineExtensions\Query\Sqlite\Soundex
|
||||
# uuid_short: DoctrineExtensions\Query\Sqlite\UuidShort
|
||||
|
||||
numeric_functions:
|
||||
round: DoctrineExtensions\Query\Sqlite\Round
|
||||
5
config/packages/doctrine_migrations.yaml
Normal file
5
config/packages/doctrine_migrations.yaml
Normal file
@@ -0,0 +1,5 @@
|
||||
doctrine_migrations:
|
||||
dir_name: '%kernel.project_dir%/src/Migrations'
|
||||
# namespace is arbitrary but should be different from App\Migrations
|
||||
# as migrations classes should NOT be autoloaded
|
||||
namespace: DoctrineMigrations
|
||||
26
config/packages/framework.yaml
Normal file
26
config/packages/framework.yaml
Normal file
@@ -0,0 +1,26 @@
|
||||
framework:
|
||||
secret: '%env(APP_SECRET)%'
|
||||
default_locale: en
|
||||
csrf_protection: ~
|
||||
#http_method_override: true
|
||||
|
||||
# Enables session support. Note that the session will ONLY be started if you read or write from it.
|
||||
# Remove or comment this section to explicitly disable session support.
|
||||
session:
|
||||
handler_id: session.handler.native_file
|
||||
save_path: "%kernel.project_dir%/var/sessions/%kernel.environment%"
|
||||
|
||||
#esi: ~
|
||||
#fragments: ~
|
||||
php_errors:
|
||||
log: true
|
||||
|
||||
cache:
|
||||
# The app cache caches to the filesystem by default. Other options include:
|
||||
|
||||
# Redis
|
||||
#app: cache.adapter.redis
|
||||
#default_redis_provider: redis://localhost
|
||||
|
||||
# APCu (not recommended with heavy random-write workloads as memory fragmentation can cause perf issues)
|
||||
#app: cache.adapter.apcu
|
||||
9
config/packages/kimai.yml
Normal file
9
config/packages/kimai.yml
Normal file
@@ -0,0 +1,9 @@
|
||||
twig:
|
||||
# form_themes:
|
||||
# - "bootstrap_3_layout.html.twig"
|
||||
# - "form/fields.html.twig"
|
||||
globals:
|
||||
kimai_context:
|
||||
date_1: "d.m.Y" # used for display in timesheets
|
||||
box_color: "green" # a color for ???
|
||||
active_warning: 3 # display a warning color if the user has at least X active recordings
|
||||
31
config/packages/prod/doctrine.yaml
Normal file
31
config/packages/prod/doctrine.yaml
Normal file
@@ -0,0 +1,31 @@
|
||||
doctrine:
|
||||
orm:
|
||||
metadata_cache_driver:
|
||||
type: service
|
||||
id: doctrine.system_cache_provider
|
||||
query_cache_driver:
|
||||
type: service
|
||||
id: doctrine.system_cache_provider
|
||||
result_cache_driver:
|
||||
type: service
|
||||
id: doctrine.result_cache_provider
|
||||
|
||||
services:
|
||||
doctrine.result_cache_provider:
|
||||
class: Symfony\Component\Cache\DoctrineProvider
|
||||
public: false
|
||||
arguments:
|
||||
- '@doctrine.result_cache_pool'
|
||||
doctrine.system_cache_provider:
|
||||
class: Symfony\Component\Cache\DoctrineProvider
|
||||
public: false
|
||||
arguments:
|
||||
- '@doctrine.system_cache_pool'
|
||||
|
||||
framework:
|
||||
cache:
|
||||
pools:
|
||||
doctrine.result_cache_pool:
|
||||
adapter: cache.app
|
||||
doctrine.system_cache_pool:
|
||||
adapter: cache.system
|
||||
17
config/packages/prod/monolog.yaml
Normal file
17
config/packages/prod/monolog.yaml
Normal file
@@ -0,0 +1,17 @@
|
||||
monolog:
|
||||
handlers:
|
||||
main:
|
||||
type: fingers_crossed
|
||||
action_level: error
|
||||
handler: nested
|
||||
excluded_404s:
|
||||
# regex: exclude all 404 errors from the logs
|
||||
- ^/
|
||||
nested:
|
||||
type: stream
|
||||
path: "%kernel.logs_dir%/%kernel.environment%.log"
|
||||
level: debug
|
||||
console:
|
||||
type: console
|
||||
process_psr_3_messages: false
|
||||
channels: ["!event", "!doctrine"]
|
||||
3
config/packages/routing.yaml
Normal file
3
config/packages/routing.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
framework:
|
||||
router:
|
||||
strict_requirements: ~
|
||||
56
config/packages/security.yaml
Normal file
56
config/packages/security.yaml
Normal file
@@ -0,0 +1,56 @@
|
||||
security:
|
||||
encoders:
|
||||
App\Entity\User: bcrypt
|
||||
|
||||
# https://symfony.com/doc/current/book/security.html#where-do-users-come-from-user-providers
|
||||
providers:
|
||||
database_users:
|
||||
entity: { class: App\Entity\User, property: username }
|
||||
|
||||
firewalls:
|
||||
dev:
|
||||
pattern: ^/(_(profiler|wdt)|css|images|js)/
|
||||
security: false
|
||||
|
||||
secured_area:
|
||||
# does what it says
|
||||
logout_on_user_change: true
|
||||
|
||||
# this firewall applies to all URLs
|
||||
pattern: ^/
|
||||
|
||||
# but the firewall does not require login on every page
|
||||
# denying access is done in access_control or in your controllers
|
||||
anonymous: ~
|
||||
|
||||
# This allows the user to login by submitting a username and password
|
||||
# Reference: http://symfony.com/doc/current/cookbook/security/form_login_setup.html
|
||||
form_login:
|
||||
# The route name that the login form submits to
|
||||
check_path: security_login
|
||||
# The name of the route where the login form lives
|
||||
# When the user tries to access a protected page, they are redirected here
|
||||
login_path: security_login
|
||||
# Secure the login form against CSRF
|
||||
# Reference: http://symfony.com/doc/current/cookbook/security/csrf_in_login_form.html
|
||||
csrf_token_generator: security.csrf.token_manager
|
||||
|
||||
logout:
|
||||
# The route name the user can go to in order to logout
|
||||
path: security_logout
|
||||
# The name of the route to redirect to after logging out
|
||||
target: homepage
|
||||
|
||||
role_hierarchy:
|
||||
ROLE_USER: ROLE_CUSTOMER
|
||||
ROLE_TEAMLEAD: ROLE_USER
|
||||
ROLE_ADMIN: ROLE_TEAMLEAD
|
||||
ROLE_SUPER_ADMIN: ROLE_ADMIN
|
||||
|
||||
access_control:
|
||||
# this is a catch-all for the admin area
|
||||
# additional security lives in the controllers
|
||||
- { path: '^/(%app_locales%)$', role: IS_AUTHENTICATED_FULLY }
|
||||
- { path: '^/(%app_locales%)/login', role: IS_AUTHENTICATED_ANONYMOUSLY }
|
||||
- { path: '^/(%app_locales%)/admin', roles: ROLE_ADMIN }
|
||||
|
||||
3
config/packages/swiftmailer.yaml
Normal file
3
config/packages/swiftmailer.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
swiftmailer:
|
||||
url: '%env(MAILER_URL)%'
|
||||
spool: { type: 'memory' }
|
||||
4
config/packages/test/framework.yaml
Normal file
4
config/packages/test/framework.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
framework:
|
||||
test: ~
|
||||
session:
|
||||
storage_id: session.storage.mock_file
|
||||
7
config/packages/test/monolog.yaml
Normal file
7
config/packages/test/monolog.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
monolog:
|
||||
handlers:
|
||||
main:
|
||||
type: stream
|
||||
path: "%kernel.logs_dir%/%kernel.environment%.log"
|
||||
level: debug
|
||||
channels: ["!event"]
|
||||
2
config/packages/test/swiftmailer.yaml
Normal file
2
config/packages/test/swiftmailer.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
swiftmailer:
|
||||
disable_delivery: true
|
||||
6
config/packages/test/web_profiler.yaml
Normal file
6
config/packages/test/web_profiler.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
web_profiler:
|
||||
toolbar: false
|
||||
intercept_redirects: false
|
||||
|
||||
framework:
|
||||
profiler: { collect: false }
|
||||
7
config/packages/translation.yaml
Normal file
7
config/packages/translation.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
framework:
|
||||
default_locale: '%locale%'
|
||||
translator:
|
||||
paths:
|
||||
- '%kernel.project_dir%/translations'
|
||||
fallbacks:
|
||||
- '%locale%'
|
||||
11
config/packages/twig.yaml
Normal file
11
config/packages/twig.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
twig:
|
||||
#paths: ['%kernel.project_dir%/templates']
|
||||
debug: '%kernel.debug%'
|
||||
strict_variables: '%kernel.debug%'
|
||||
# TODO move me to kimai config
|
||||
globals:
|
||||
kimai_context:
|
||||
date_1: "d.m.Y" # used for display in timesheets
|
||||
box_color: "green" # a color for ???
|
||||
active_warning: 3 # display a warning color if the user has at least X active recordings
|
||||
|
||||
12
config/packages/twig_extensions.yaml
Normal file
12
config/packages/twig_extensions.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
services:
|
||||
_defaults:
|
||||
public: false
|
||||
autowire: true
|
||||
autoconfigure: true
|
||||
|
||||
#Twig\Extensions\ArrayExtension: ~
|
||||
#Twig\Extensions\DateExtension: ~
|
||||
Twig\Extensions\IntlExtension: ~
|
||||
#Twig\Extensions\TextExtension: ~
|
||||
Twig\Extensions\StringLoader:
|
||||
class: Twig_Extension_StringLoader
|
||||
11
config/routes.yaml
Normal file
11
config/routes.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
homepage:
|
||||
path: /{_locale}
|
||||
defaults:
|
||||
_controller: FrameworkBundle:Redirect:redirect
|
||||
route: timesheet
|
||||
permanent: true
|
||||
|
||||
avanzu_admin_profile:
|
||||
path: /{_locale}/profile/{username}
|
||||
options:
|
||||
avanzu_admin_route: profile
|
||||
8
config/routes/annotations.yaml
Normal file
8
config/routes/annotations.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
controllers:
|
||||
resource: '../src/Controller/'
|
||||
type: annotation
|
||||
prefix: /{_locale}
|
||||
requirements:
|
||||
_locale: '%app_locales%'
|
||||
defaults:
|
||||
_locale: '%locale%'
|
||||
8
config/routes/dev/avanzu_admin_theme.yml
Normal file
8
config/routes/dev/avanzu_admin_theme.yml
Normal file
@@ -0,0 +1,8 @@
|
||||
|
||||
# ========================================================================
|
||||
# Demo routes, only work with "avanzu_admin_theme/enable_demo: true"
|
||||
# ========================================================================
|
||||
|
||||
#avanzu_admin:
|
||||
# prefix: /admin
|
||||
# resource: "@AvanzuAdminThemeBundle/Resources/config/routes.yml"
|
||||
7
config/routes/dev/twig.yaml
Normal file
7
config/routes/dev/twig.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
_errors:
|
||||
resource: '@TwigBundle/Resources/config/routing/errors.xml'
|
||||
prefix: /_error
|
||||
requirements:
|
||||
_locale: '%app_locales%'
|
||||
defaults:
|
||||
_locale: '%locale%'
|
||||
7
config/routes/dev/web_profiler.yaml
Normal file
7
config/routes/dev/web_profiler.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
web_profiler_wdt:
|
||||
resource: '@WebProfilerBundle/Resources/config/routing/wdt.xml'
|
||||
prefix: /_wdt
|
||||
|
||||
web_profiler_profiler:
|
||||
resource: '@WebProfilerBundle/Resources/config/routing/profiler.xml'
|
||||
prefix: /_profiler
|
||||
156
config/services.yaml
Normal file
156
config/services.yaml
Normal file
@@ -0,0 +1,156 @@
|
||||
# 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'
|
||||
app_locales: en|de
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
# 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/{Entity,Migrations,Tests}'
|
||||
|
||||
# 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']
|
||||
|
||||
# add more service definitions when explicit configuration is needed
|
||||
# please note that last definitions always *replace* previous ones
|
||||
|
||||
# ================================================================================
|
||||
# APPLICATION CORE
|
||||
# ================================================================================
|
||||
|
||||
# a route listener, that injects the locale through a URL directory
|
||||
app.redirect_to_preferred_locale_listener:
|
||||
class: App\EventListener\RedirectToPreferredLocaleListener
|
||||
arguments: ['@router', '%app_locales%', '%locale%']
|
||||
tags:
|
||||
- { name: kernel.event_listener, event: kernel.request, method: onKernelRequest }
|
||||
|
||||
# additional menu entries for the timesheet bundle
|
||||
timesheet.configure_menu_listener:
|
||||
class: App\EventListener\Menu
|
||||
tags:
|
||||
- { name: kernel.event_listener, event: app.main_menu_configure, method: onMainMenuConfigure }
|
||||
- { name: kernel.event_listener, event: app.admin_menu_configure, method: onAdminMenuConfigure }
|
||||
|
||||
# ================================================================================
|
||||
# DATABASE
|
||||
# ================================================================================
|
||||
|
||||
# service that prefixes every database table
|
||||
app.tableprefix_subscriber:
|
||||
class: App\Doctrine\TablePrefixSubscriber
|
||||
arguments: ["%env(resolve:DATABASE_PREFIX)%"]
|
||||
tags:
|
||||
- { name: doctrine.event_subscriber }
|
||||
|
||||
# updates timesheet records, to make sure they are calculated and can't be manipulated by the users
|
||||
app.database_listener.timesheet:
|
||||
class: App\EventListener\TimesheetListener
|
||||
tags:
|
||||
- { name: doctrine.event_listener, event: prePersist, lazy: true }
|
||||
- { name: doctrine.event_listener, event: preUpdate, lazy: true }
|
||||
|
||||
# Uncomment the following lines to define a service for the Timesheet Doctrine repository.
|
||||
# It's not mandatory to create these services, but if you use repositories a lot,
|
||||
# these services can simplify your code:
|
||||
#
|
||||
# app.post_repository:
|
||||
# class: Doctrine\ORM\EntityRepository
|
||||
# factory: ['@doctrine.orm.entity_manager', getRepository]
|
||||
# arguments: [App\Entity\Timesheet]
|
||||
#
|
||||
# // traditional code inside a controller
|
||||
# $entityManager = $this->getDoctrine()->getManager();
|
||||
# $posts = $entityManager->getRepository('KimaiBundle:User')->findAll();
|
||||
#
|
||||
# // same code using repository services
|
||||
# $posts = $this->get('app.user_repository')->findAll();
|
||||
|
||||
# ================================================================================
|
||||
# EVENTS and LISTENER / SUBSCRIBER
|
||||
# ================================================================================
|
||||
|
||||
# event-listener to populate the navigation
|
||||
app.menu_builder:
|
||||
class: App\EventListener\MenuBuilder
|
||||
arguments: ["@event_dispatcher", "@security.authorization_checker"]
|
||||
tags:
|
||||
- { name: kernel.event_listener, event: theme.sidebar_setup_menu, method: onSetupNavbar }
|
||||
|
||||
# ================================================================================
|
||||
# FORMS
|
||||
# ================================================================================
|
||||
|
||||
# form to edit user roles
|
||||
app.admin.user_role:
|
||||
class: App\Form\Type\UserRoleType
|
||||
arguments: ["%security.role_hierarchy.roles%"]
|
||||
tags:
|
||||
- { name: form.type }
|
||||
|
||||
# ================================================================================
|
||||
# CONSOLE COMMANDS
|
||||
# ================================================================================
|
||||
|
||||
App\Command\RunCodeSnifferCommand:
|
||||
arguments:
|
||||
$projectDirectory: "%kernel.project_dir%"
|
||||
|
||||
App\Command\RunUnitTestsCommand:
|
||||
class: App\Command\RunUnitTestsCommand
|
||||
arguments:
|
||||
$projectDirectory: "%kernel.project_dir%"
|
||||
|
||||
App\Command\RunIntegrationTestsCommand:
|
||||
class: App\Command\RunIntegrationTestsCommand
|
||||
arguments:
|
||||
$projectDirectory: "%kernel.project_dir%"
|
||||
|
||||
# ================================================================================
|
||||
# THEME
|
||||
# ================================================================================
|
||||
|
||||
App\Twig\Extensions:
|
||||
arguments: ['%app_locales%']
|
||||
|
||||
avanzu_admin_theme.navbar_user_listener:
|
||||
class: App\EventListener\NavbarShowUserListener
|
||||
arguments: ["@security.token_storage"]
|
||||
tags:
|
||||
- { name: kernel.event_listener, event: theme.navbar_user, method: onShowUser }
|
||||
- { name: kernel.event_listener, event: theme.sidebar_user, method: onShowUser }
|
||||
|
||||
# avanzu_admin_theme.navbar_task_listener:
|
||||
# class: "%avanzu_admin_theme.navbar_task_listener.class%"
|
||||
# tags:
|
||||
# - { name: kernel.event_listener, event: theme.tasks, method: onListTasks }
|
||||
#
|
||||
# avanzu_admin_theme.navbar_notify_listener:
|
||||
# class: "%avanzu_admin_theme.navbar_notify_listener.class%"
|
||||
# tags:
|
||||
# - { name: kernel.event_listener, event: theme.notifications, method: onListNotifications }
|
||||
#
|
||||
# avanzu_admin_theme.navbar_msg_listener:
|
||||
# class: "%avanzu_admin_theme.navbar_msg_listener.class%"
|
||||
# tags:
|
||||
# - { name: kernel.event_listener, event: theme.messages, method: onListMessages }
|
||||
#
|
||||
# avanzu_admin_theme.setup_menu_listener:
|
||||
# class: "%avanzu_admin_theme.setup_menu_listener.class%"
|
||||
# tags:
|
||||
# - { name: kernel.event_listener, event: theme.sidebar_setup_menu, method: onSetupMenu }
|
||||
# - { name: kernel.event_listener, event: theme.breadcrumb, method: onSetupMenu }
|
||||
Reference in New Issue
Block a user