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

framework:
    #esi:             ~
    translator:      { fallback: %locale% }
    secret:          %secret%
    charset:         UTF-8
    router:          { resource: "%kernel.root_dir%/config/routing.yml" }
    form:            true
    csrf_protection: true
    validation:      { enable_annotations: true }
    templating:      { engines: ['twig'] } #assets_version: SomeVersionScheme
    session:
        default_locale: %locale%
        auto_start:     true

# Twig Configuration
twig:
    debug:            %kernel.debug%
    strict_variables: %kernel.debug%

# Assetic Configuration
assetic:
    debug:          %kernel.debug%
    use_controller: false
    filters:
        cssrewrite: ~
        # closure:
        #     jar: %kernel.root_dir%/java/compiler.jar
        # yui_css:
        #     jar: %kernel.root_dir%/java/yuicompressor-2.4.2.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

    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%

jms_security_extra:
    secure_controllers:  true
    secure_all_services: false

fos_user:
    db_driver: orm # other valid values are 'mongodb', 'couchdb'
    firewall_name: main
    user_class: Company\UserBundle\Entity\User
    
wiki_tag:
    route_for_documents_by_tag: company_other
    document_class: Company\BaseBundle\Entity\Document
    document_id_column: id
    ignore_wikipedia_error: false
    fields:
        title:
            type: string
            length: 1024
            accessor: getTitle
            weight: 1.0
        description:
            type: text
            weight: 0.5
        categories:
            type: text
            accessor: getCategoriesStr
            weight: 1.5
    # 4 REQUESTED url template for wikipedia and dbpedia request
    url_templates:
        wikipedia_api: 'http://fr.wikipedia.org/w/api.php'
        wikipedia_permalink: 'http://fr.wikipedia.org/w/index.php?oldid=%s'
        wikipedia_opensearch: 'http://fr.wikipedia.org/w/index.php?search='
        dbpedia_sparql: 'http://fr.dbpedia.org/sparql'
    # reactive_selectors is a list of jQuery selectors meant to let appear tag context search by selecting text.
    # Example of list : [ '.any_class', '#any_div .p_class', '#another_selector' ]. Write [ 'document' ] if you want the whole document/page to be reactive.
    # Do not define reactive_selectors if you want nothing to be reactive.
    reactive_selectors:
        all:      [ '.left_sheet', '#p_title .sheet_title', '#p_description' ]
        only_p:   [ '#p_title .sheet_title', '#p_description' ]
        document: [ 'document' ]
    # document_list_profile is the list of the columns displayed in a document's tag list, AND the button to sort tags.
    # The list can contain "sort_tag, order, move_up_down, id,  label, wikipedia_link, wikipedia_permalink, dbpedia_link, category, remove_wikipedia_link, alias, remove_tag_from_list, alternative_label, alternative_wikipedia_url"
    # The integers mean : 0 : never displayed and not available in the list. 1 : displayed by default. 2 : hidden by default but available in the list
    # If visibility is not defined, it means 0. Hidden columns can be not in the list, it means 0.
    # Exemple of list : ['sort_tag', 'order', 'move_up_down', 'label', 'wikipedia_link', 'remove_tag_from_list' ]
    # If document_list_profile in not defined, all columns and the sort tag button will be displayed.
    # If no param is set in the controller call, all columns and the sort tag button will be displayed. ({% render "WikiTagBundle:WikiTag:addJavascript" %})
    document_list_profile:
        all:
            sort_tag:
                visibility: 1
            order:
                label:      '##'
                visibility: 1
            move_up_down:
                visibility: 1
            id:
                label:      '#id'
                visibility: 1
            label:
                label:      '#Tag'
                visibility: 1
            wikipedia_link:
                label:      '#Lien W'
                visibility: 1
            wikipedia_permalink:
                label:      '#pLien W'
                visibility: 1
            dbpedia_link:
                label:      '#Lien D'
                visibility: 1
            category:
                label:      '#Catégorie'
                visibility: 1
            remove_wikipedia_link:
                label:      '#Supprimer le lien W'
                visibility: 1
            alias:
                label:      '#Alias'
                visibility: 1
            remove_tag_from_list:
                label:      '#Retirer le tag'
                visibility: 1
            alternative_label:
                label:      '#Label redirigé'
                visibility: 1
            alternative_wikipedia_url:
                label:      '#Lien redirigé'
                visibility: 1
        #editor :     [ 'sort_tag', 'order', 'id', 'move_up_down', 'label', 'wikipedia_link', 'wikipedia_permalink', 'dbpedia_link', 'category', 'remove_wikipedia_link', 'alias', 'remove_tag_from_list' ]
        editor:
            sort_tag:
                visibility: 1
            order:
                label:      '#'
                visibility: 1
            move_up_down:
                visibility: 1
            id:
                label:      'id'
                visibility: 1
            label:
                label:      'Tag'
                visibility: 1
            wikipedia_link:
                label:      'Lien W'
                visibility: 1
            wikipedia_permalink:
                label:      'pLien W'
                visibility: 1
            dbpedia_link:
                label:      'Lien D'
                visibility: 1
            category:
                label:      'Catégorie'
                visibility: 1
            remove_wikipedia_link:
                label:      'Supprimer le lien W'
                visibility: 1
            alias:
                label:      'Alias'
                visibility: 1
            remove_tag_from_list:
                label:      'Retirer le tag'
                visibility: 1
            alternative_label:
                label:      'Label redirigé'
                visibility: 2
            alternative_wikipedia_url:
                label:      'Lien redirigé'
                visibility: 2
        #contributor: [ 'order', 'label', 'wikipedia_link', 'wikipedia_permalink', 'delete_wikipedia_link', 'remove_tag_from_list' ]
        contributor:
            sort_tag:
                visibility: 0
            order:
                label:      '#'
                visibility: 1
            move_up_down:
                visibility: 1
            id:
                label:      'id'
                visibility: 0
            label:
                label:      'Tag'
                visibility: 1
            wikipedia_link:
                label:      'Lien W'
                visibility: 1
            wikipedia_permalink:
                label:      'pLien W'
                visibility: 1
            dbpedia_link:
                label:      'Lien D'
                visibility: 1
            category:
                label:      'Catégorie'
                visibility: 2
            remove_wikipedia_link:
                label:      'Supprimer le lien W'
                visibility: 1
            alias:
                label:      'Alias'
                visibility: 2
            remove_tag_from_list:
                label:      'Retirer le tag'
                visibility: 1
            alternative_label:
                label:      'Label redirigé'
                visibility: 2
            alternative_wikipedia_url:
                label:      'Lien redirigé'
                visibility: 2
    # Options for curl_setopt, typically proxy settings. If you want to use constant values, just write for example 'CURLOPT_PROXYAUTH' or 'CURLAUTH_NTLM'.
    # The program will check if the string gives an existing constant
    # For boolean, just write 'TRUE' or 'FALSE'. 
    #curl_options:
    #    CURLOPT_HTTPPROXYTUNNEL:  'TRUE'
    #    CURLOPT_PROXYAUTH: 'CURLAUTH_NTLM'
    #    CURLOPT_USERAGENT: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:10.0.1) Gecko/20100101 Firefox/10.0.1'
    #    CURLOPT_PROXY: 'derain.centrepompidou.lan:3128'
    #    CURLOPT_PROXYUSERPWD: 'DOM-CNAC\cavaliet:thibaut';
    #    CURLOPT_PROXYTYPE: 'CURLPROXY_HTTP'


services:
    wiki_tag.tag_test_listener:
        class: Company\BaseBundle\Event\TestListener
        arguments: [@service_container]
        tags:
            - { name: kernel.event_listener, event: wikitag.tag_changed, method: onTagCreateAction }

            