imports:
    - { resource: parameters.yml }
    - { resource: security.yml }

framework:
    #esi:             ~
    translator:
        paths:
            - '%kernel.project_dir%/translations'
        fallback: en
    secret:          "%secret%"
    router:
        resource: "%kernel.project_dir%/config/routing.yml"
        strict_requirements: "%kernel.debug%"
    form:            true
    csrf_protection: true
    validation:      { enable_annotations: true }
    templating:
        engines: ['twig', 'php']
    assets:
        version: '%assets_version%'
        version_format: '%%s?version=%%s'
    default_locale: en
    session:
        name:                 BAPID
        handler_id:           '%session_handler%'
        save_path:            '%kernel.project_dir%/var/sessions/%kernel.environment%'
        gc_maxlifetime:       3600
        cookie_httponly:      true
        cookie_secure:        'auto'
    fragments:
        enabled:              true
        path:                 /_fragment # used for controller action in template
    serializer:
        enabled:              true

# Twig Configuration
twig:
    debug:                    "%kernel.debug%"
    strict_variables:         "%kernel.debug%"
    exception_controller:     null # use framework.error_controller instead
    globals:
        bap:
            layout:           base.html.twig  # default layout across all Oro bundles

# Swiftmailer Configuration
swiftmailer:
    transport:                "%mailer_transport%"
    host:                     "%mailer_host%"
    port:                     "%mailer_port%"
    encryption:               "%mailer_encryption%"
    username:                 "%mailer_user%"
    password:                 "%mailer_password%"
    spool:                    { type: memory }

fos_rest:
    body_listener:
        decoders:
            json: fos_rest.decoder.json
    view:
        failed_validation:    HTTP_BAD_REQUEST
        default_engine:       php
        formats:
            json:             true
            xml:              false
    format_listener:
        rules:
            - { path: '^/api/rest', priorities: [ json ], fallback_format: json, prefer_extension: false }
            - { path: '^%web_backend_prefix%/api/rest', priorities: [ json ], fallback_format: json, prefer_extension: false }
            - { path: '^/api/soap', stop: true }
            - { path: '^/', stop: true }
    routing_loader:
        default_format:       json

fos_js_routing:
    routes_to_expose: ['oro_.*']

oro_frontend:
    routes_to_expose: ['oro_.*']

stof_doctrine_extensions:
    default_locale: en
    translation_fallback: true
    orm:
        default:
            translatable:     true
            tree:             true

oro_translation:
    locales: [en, fr]
    templating: "OroUIBundle:Form:translatable.html.twig"

lexik_maintenance:
    authorized:
        path:                 'maintenance|.*\.js'             # "maintenance" is only for demo purposes, remove in production!
#        ips:                  ["127.0.0.1"]                   # Optional. Authorized ip addresses
    driver:
        class:                Lexik\Bundle\MaintenanceBundle\Drivers\FileDriver
        options:
            file_path:        '%kernel.project_dir%/var/cache/maintenance_lock'

#
# ORO Bundles config
#
oro_distribution:
    entry_point: ~

oro_theme:
    active_theme: oro

oro_message_queue:
    transport:
        '%message_queue_transport%': '%message_queue_transport_config%'

oro_locale:
    formatting_code: en
    language: en

oro_attachment:
  upload_file_mime_types:
    - application/msword
    - application/vnd.ms-excel
    - application/pdf
    - application/zip
    - image/gif
    - image/jpeg
    - image/png
  upload_image_mime_types:
    - image/gif
    - image/jpeg
    - image/png
