imports:
    - { resource: parameters.yml }
    - { resource: security.yml }
    - { resource: services.yml }
    - { resource: '@D2CoreBundle/Resources/config/services.yml' }
    - { resource: '@D2UserBundle/Resources/config/services.yml' }
    - { resource: '@D2CustomerBundle/Resources/config/services.yml' }
    - { resource: '@D2ContentBundle/Resources/config/services.yml' }
    - { resource: '@D2BlogBundle/Resources/config/services.yml' }
    - { resource: '@D2CaseStudiesBundle/Resources/config/services.yml' }
    - { resource: "@D2ExpertBundle/Resources/config/services.yml" }
    - { resource: "@D2ChatBundle/Resources/config/services.yml" }
    - { resource: "@D2ResourceBundle/Resources/config/services.yml" }
    - { resource: "@D2CommentBundle/Resources/config/services.yml" }
    - { resource: "@D2CollectionBundle/Resources/config/services.yml" }
    - { resource: "@D2NewsBundle/Resources/config/services.yml" }

# Put parameters here that don't need to change on each machine where the app is deployed
# http://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration
parameters:
    locale: en
    # Registration
    country_override: true        								# override country filter for allow registration
    # System Email
    email_system_admin: development@easysmsoffice.co.za        			# general system administrator
    # Blog Parameters
    d2_blog.comments.latest_comment_limit: 10

framework:
    #esi:             ~
    translator:      { fallbacks: ["%locale%"] }
    secret:          "%secret%"
    router:
        resource: "%kernel.root_dir%/config/routing.yml"
        strict_requirements: ~
    form:            ~
    csrf_protection: ~
    validation:      { enable_annotations: true }
    #serializer:      { enable_annotations: true }
    templating:
        engines: ['twig']
    default_locale:  "%locale%"
    trusted_hosts:   ~
    trusted_proxies: ~
    session:
        cookie_lifetime: 7200
        gc_maxlifetime: 3600
    fragments:       ~
    http_method_override: true

# Twig Configuration
twig:
    debug:            "%kernel.debug%"
    strict_variables: "%kernel.debug%"
    
# Assetic Configuration
assetic:
    debug:          %kernel.debug%
    use_controller: false
    #bundles:        [ ]
    #java: /usr/bin/java
    filters:
       less:
           node: /usr/bin/node
           node_paths: [/usr/lib/node_modules]
           apply_to: "\.less$"
       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:   pdo_mysql
        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:
        #   1. add the path in parameters.yml
        #     e.g. database_path: "%kernel.root_dir%/data/data.db3"
        #   2. Uncomment database_path in parameters.yml.dist
        #   3. Uncomment next line:
        #     path:     "%database_path%"

    orm:
        auto_generate_proxy_classes: "%kernel.debug%"
        entity_managers:
            default:
                hydrators:
                    FlatArrayHydrator: D2\CoreBundle\DependencyInjection\Doctrine\CustomHydrators\FlatArrayHydrator
                naming_strategy: doctrine.orm.naming_strategy.underscore
                auto_mapping: true
                dql:
                    string_functions:
                        lpad: D2\CoreBundle\DependencyInjection\Doctrine\CustomDQLFunctions\LPad
                        rpad: D2\CoreBundle\DependencyInjection\Doctrine\CustomDQLFunctions\RPad
                        group_concat: D2\CoreBundle\DependencyInjection\Doctrine\CustomDQLFunctions\GroupConcat
                        SOUNDEX: D2\CoreBundle\DependencyInjection\Doctrine\CustomDQLFunctions\Soundex

# Swiftmailer Configuration
swiftmailer:
    # must remove line below in production env
    delivery_address: %mailer_debug_addr%
    transport: %mailer_transport%
    host:      %mailer_host%
    port :     %mailer_port%
    username:  %mailer_user%
    password:  %mailer_password%
    auth_mode:  login
    spool:     { type: memory }

# FosUserBundle
fos_user:
    db_driver: orm 
    firewall_name: main
    user_class: D2\UserBundle\Entity\User
    registration:
        form:
            type: d2_user_registration
        confirmation:
            from_email:
                address:        webmaster@camoc.co.za
                sender_name:    Camoc
            enabled: false
    profile:
        form:
            type: d2_user_profile
    change_password:
        form:
            type: fos_user_change_password
    from_email:
        address:        webmaster@camoc.co.za
        sender_name:    "Camoc"
    resetting:
        email:
            from_email:
                address:        webmaster@camoc.co.za
                sender_name:    "Camoc"

fos_message:
    db_driver: orm
    thread_class: D2\ChatBundle\Entity\Thread
    message_class: D2\ChatBundle\Entity\Message
    new_thread_form:
      type:               FOS\MessageBundle\FormType\NewThreadMultipleMessageFormType
      handler:            fos_message.new_thread_multiple_form.handler
      model:              FOS\MessageBundle\FormModel\NewThreadMultipleMessage
      name:               message
      
# KnpMenuBundle    
knp_menu:
    # use "twig: false" to disable the Twig extension and the TwigRenderer
    twig:
        template: KnpMenuBundle::menu.html.twig
    #  if true, enables the helper for PHP templates
    templating: false
    # the renderer to use, list is also available by default
    default_renderer: twig

knp_paginator:
    template:
        pagination: paginator-bootstrap.html.twig

mopa_bootstrap:
    menu: ~  # enables twig helpers for menu
    form:
        show_legend: false              # default is true
        show_child_legend: false        # default is false
        error_type: 'block'             # default is null
        render_optional_text: false
    

mobile_detect:
    redirect:
        mobile: ~
        tablet: ~
    switch_device_view: ~
    
eko_feed:
    feeds:
        camoc:
            title:       'CAMOC NEWS'
            description: 'Latests articles'
            link:        'http://camoc.local/feed/rss'
            encoding:    'utf-8'
            author:      'Camoc Admin' # Only required for Atom feeds    

stfalcon_tinymce:
    include_jquery: true
    tinymce_jquery: true
    selector: ".tinymce"
    language: %locale%
    theme:
        simple:
            theme: "modern"
            menubar: false
            plugins:
                - "advlist autolink lists link image charmap print preview hr anchor pagebreak"
                - "searchreplace wordcount visualblocks visualchars code fullscreen"
                - "insertdatetime media nonbreaking save table contextmenu directionality"
                - "template paste textcolor"
            toolbar1: "undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | preview"
            toolbar2: "bullist outdent indent | sizeselect fontselect fontsizeselect forecolor backcolor"
            fontsize_formats: "8pt 10pt 12pt 14pt 18pt 24pt 36pt"
            
