imports:
    - { resource: parameters.yml }
    - { resource: security.yml }
    - { resource: @DCSYSYouMarketBackendBundle/Resources/config/admin.yml }

framework:
    #esi:             ~
    translator:      { fallback: "%locale%" }
    secret:          "%secret%"
    router:
        resource: "%kernel.root_dir%/config/routing.yml"
        strict_requirements: ~
    form:            ~
    csrf_protection: ~
    validation:      { enable_annotations: true }
    templating:         
        engines: ['twig']
        assets_version: "20140314"
        assets_version_format: "%%s?v%%s"
        
    default_locale:  "%locale%"
    trusted_hosts:   ~
    trusted_proxies: ~
    session:
        # handler_id set to null will use default session handler from php.ini
        handler_id:  ~
    fragments:       ~
    http_method_override: true

# Twig Configuration
twig:
    debug:            "%kernel.debug%"
    strict_variables: "%kernel.debug%"
    globals:
        assets_path: "bundles/dcsysyoumarket" #Avoid to write all basepath to the DCSYSYouMarket Bundle on all twig templates
        assetsAdmin_path: "bundles/dcsysyoumarketadmin"

# Assetic Configuration
assetic:
    debug:          "%kernel.debug%"
    use_controller: false
    bundles:        [ ]
    #java: /usr/bin/java
    filters:
        cssrewrite: ~
        #closure:
        #    jar: "%kernel.root_dir%/Resources/java/compiler.jar"
        #yui_css:
        #    jar: "%kernel.root_dir%/Resources/java/yuicompressor-2.4.7.jar"

# Doctrine Configuration
doctrine:
    dbal:
        driver:   "%database_driver%"
        host:     "%database_host%"
        port:     "%database_port%"
        dbname:   "%database_name%"
        user:     "%database_user%"
        password: "%database_password%"
        charset:  UTF8
        # if using pdo_sqlite as your database driver, add the path in parameters.yml
        # e.g. database_path: "%kernel.root_dir%/data/data.db3"
        # path:     "%database_path%"

    orm:
        auto_generate_proxy_classes: "%kernel.debug%"
        auto_mapping: true

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

# Parameters
parameters:
    mailer_default_from: no-reply@xxx.es #Must be a valid sender domain
    mailer_contact_to: xxx@xxx.es
    pagination_youmarket_limit_page: 24  

#LiipImagineBundle Configuration
liip_imagine:
    resolvers:
       default:
          web_path: ~

    filter_sets:
        avatar_top_thumb:
            quality: 75
            filters:
                thumbnail: { size: [20, 20], mode: outbound }
        product_thumb:
            quality: 100
            filters:
                thumbnail: { size: [268, 268], mode: inset }
        product_detail:
            quality: 100
            filters:
                thumbnail: { size: [670, 670], mode: inset }
        product_detail_thumb:
            quality: 80
            filters:
                thumbnail: { size: [160, 160], mode: outbound }
        avatar_store_thumb:
            quality: 100
            filters:
                thumbnail: { size: [110, 110], mode: outbound }
        avatar_user_thumb:
            quality: 100
            filters:
                thumbnail: { size: [140, 140], mode: outbound }         

sonata_admin:
    title:      YouMarket Backend
    #title_logo: bundles/acmedemo/img/fancy_acme_logo.png
    security:
        handler: sonata.admin.security.handler.noop #noop -> always true, so, we can use Symfony Firewall
sonata_block:
    default_contexts: [cms]
    blocks:
        # Enable the SonataAdminBundle block
        sonata.admin.block.admin_list:
            contexts:   [admin]
        # Your other blocks
