diff --git a/app/config/admin/config.yml b/app/config/admin/config.yml index 5a8b0eab4f..9dce210baf 100644 --- a/app/config/admin/config.yml +++ b/app/config/admin/config.yml @@ -1,20 +1,15 @@ imports: - { resource: ../config.yml } + - { resource: sulu.yml } - { resource: security.yml } - { resource: ../widgets.yml } framework: router: resource: "%kernel.root_dir%/config/admin/routing.yml" - strict_requirements: ~ session: save_path: "%kernel.cache_dir%/../../sessions/admin/%kernel.environment%" -# Twig Configuration -twig: - debug: %kernel.debug% - strict_variables: %kernel.debug% - # Assetic Configuration assetic: bundles: [ ClientWebsiteBundle ] @@ -26,53 +21,7 @@ doctrine: string_functions: CAST: Sulu\Component\Rest\DQL\Cast -# SULU Content Configuration -sulu_content: - preview: - mode: auto - websocket: false - delay: 200 - # SULU Admin Configuration sulu_admin: name: %sulu_admin.name% email: %sulu_admin.email% - -# Just a dirty hack to get the jms serializer bundle correctly working -# https://github.com/schmittjoh/JMSSerializerBundle/pull/270#issuecomment-21171800 -parameters: - jms_serializer.cache_naming_strategy.class: JMS\Serializer\Naming\IdenticalPropertyNamingStrategy - -sulu_contact: - form_of_address: - male: - id: 0 - name: male - translation: contact.contacts.formOfAddress.male - female: - id: 1 - name: female - translation: contact.contacts.formOfAddress.female - -# Massive Build Configuration -massive_build: - targets: - prod: - dependencies: - database: ~ - phpcr: ~ - fixtures: ~ - phpcr_migrations: ~ - dev: - dependencies: - database: ~ - fixtures: ~ - phpcr: ~ - user: ~ - phpcr_migrations: ~ - maintain: - dependencies: - node_order: - search_index: - phpcr_migrations: ~ - diff --git a/app/config/admin/sulu.yml b/app/config/admin/sulu.yml new file mode 100644 index 0000000000..a025b87db8 --- /dev/null +++ b/app/config/admin/sulu.yml @@ -0,0 +1,41 @@ +imports: + - { resource: ../sulu.yml } + +# Just a dirty hack to get the jms serializer bundle correctly working +# https://github.com/schmittjoh/JMSSerializerBundle/pull/270#issuecomment-21171800 +parameters: + jms_serializer.cache_naming_strategy.class: JMS\Serializer\Naming\IdenticalPropertyNamingStrategy + +# Massive Build Configuration +massive_build: + targets: + prod: + dependencies: + database: ~ + phpcr: ~ + fixtures: ~ + phpcr_migrations: ~ + dev: + dependencies: + database: ~ + fixtures: ~ + phpcr: ~ + user: ~ + phpcr_migrations: ~ + maintain: + dependencies: + node_order: + search_index: + phpcr_migrations: ~ + +# Sulu Bundles +sulu_contact: + form_of_address: + male: + id: 0 + name: male + translation: contact.contacts.formOfAddress.male + female: + id: 1 + name: female + translation: contact.contacts.formOfAddress.female diff --git a/app/config/config.yml b/app/config/config.yml index 89af7191c0..42e0732efb 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -1,13 +1,16 @@ imports: - { resource: parameters.yml } - - { resource: phpcr.yml } + - { resource: services.yml } framework: #esi: ~ - translator: { fallback: "%locale%" } + #translator: { fallbacks: ["%locale%"] } secret: "%secret%" + router: + resource: "%kernel.root_dir%/config/routing.yml" + strict_requirements: ~ form: ~ - csrf_protection: false + csrf_protection: ~ validation: { enable_annotations: true } templating: engines: ['twig'] @@ -30,12 +33,10 @@ twig: assetic: debug: "%kernel.debug%" use_controller: false - write_to: "%kernel.root_dir%/../web" - #bundles: [ ] + bundles: [ ] #java: /usr/bin/java filters: - cssrewrite: - apply_to: '\.(css)$' + cssrewrite: ~ #closure: # jar: "%kernel.root_dir%/Resources/java/compiler.jar" #yui_css: @@ -61,25 +62,6 @@ doctrine: orm: auto_generate_proxy_classes: "%kernel.debug%" auto_mapping: true - mappings: - gedmo_tree: - type: "xml" - prefix: "Gedmo\Tree\Entity" - dir: "%kernel.root_dir%/../vendor/gedmo/doctrine-extensions/lib/Gedmo/Tree/Entity" - alias: "GedmoTree" # this one is optional and will default to the name set for the mapping - is_bundle: false - resolve_target_entities: - Sulu\Component\Security\Authentication\UserInterface: Sulu\Bundle\SecurityBundle\Entity\User - Sulu\Bundle\ProductBundle\Entity\ProductInterface: Sulu\Bundle\ProductBundle\Entity\Product - Sulu\Component\Security\Authentication\RoleInterface: Sulu\Bundle\SecurityBundle\Entity\Role - Sulu\Bundle\MediaBundle\Entity\CollectionInterface: Sulu\Bundle\MediaBundle\Entity\Collection - Sulu\Bundle\ContactBundle\Entity\AccountInterface: Sulu\Bundle\ContactBundle\Entity\Account - -# Doctrine Extension Configuration -stof_doctrine_extensions: - orm: - default: - tree: true # Swiftmailer Configuration swiftmailer: @@ -88,114 +70,3 @@ swiftmailer: username: "%mailer_user%" password: "%mailer_password%" spool: { type: memory } - -# FOS REST Configuration -fos_rest: - routing_loader: - default_format: "json" - -# LIIP Theme Configuration -liip_theme: - themes: ["default"] - active_theme: "default" - load_controllers: false - -# SULU Core Configuration -sulu_core: - locales: ["de","en"] - phpcr: - backend: "%phpcr_backend%" - workspace: "%phpcr_workspace%" - username: "%phpcr_user%" - password: "%phpcr_pass%" - webspace: - config_dir: "%kernel.root_dir%/Resources/webspaces" - content: - structure: - default_type: - snippet: "default" - paths: - homepage: - path: %kernel.root_dir%/Resources/pages - type: home - page: - path: "%kernel.root_dir%/Resources/pages" - type: "page" - snippet: - path: "%kernel.root_dir%/Resources/snippets" - type: "snippet" - sulu: - path: "%kernel.root_dir%/../vendor/sulu/sulu/src/Sulu/Bundle/CoreBundle/Content/templates" - type: "page" - -# SULU Media configuration -sulu_media: - search: - enabled: true - -sulu_websocket: - server: - http_host: %websocket_url% - port: %websocket_port% - -# Symfony CMF Configuration -cmf_core: - publish_workflow: - enabled: false - -sulu_http_cache: - handlers: - paths: - enabled: true - public: - max_age: 240 - shared_max_age: 240 - use_page_ttl: true - enabled: true - debug: - enabled: %kernel.debug% - proxy_client: - symfony: - enabled: true - -sulu_content: - search: - mapping: - Sulu\Bundle\ContentBundle\Document\PageDocument: - index: page - category: page - Sulu\Bundle\SnippetBundle\Document\SnippetDocument: - index: snippet - category: snippet - -massive_search: - localization_strategy: index - persistence: - doctrine_orm: - enabled: true - -doctrine_cache: - providers: - phpcr_meta: - type: %phpcr_cache% - phpcr_nodes: - type: %phpcr_cache% - -jms_serializer: - metadata: - debug: %kernel.debug% - -sulu_document_manager: - mapping: - page: - class: Sulu\Bundle\ContentBundle\Document\PageDocument - phpcr_type: sulu:page - home: - class: Sulu\Bundle\ContentBundle\Document\HomeDocument - phpcr_type: sulu:home - route: - class: Sulu\Bundle\ContentBundle\Document\RouteDocument - phpcr_type: sulu:path - snippet: - class: Sulu\Bundle\SnippetBundle\Document\SnippetDocument - phpcr_type: sulu:snippet diff --git a/app/config/services.yml b/app/config/services.yml new file mode 100644 index 0000000000..5c76fc5988 --- /dev/null +++ b/app/config/services.yml @@ -0,0 +1,9 @@ +# Learn more about services, parameters and containers at +# http://symfony.com/doc/current/book/service_container.html +parameters: +# parameter_name: value + +services: +# service_name: +# class: AppBundle\Directory\ClassName +# arguments: ["@another_service_name", "plain_value", "%parameter_name%"] diff --git a/app/config/sulu.yml b/app/config/sulu.yml new file mode 100644 index 0000000000..f6e42932f8 --- /dev/null +++ b/app/config/sulu.yml @@ -0,0 +1,145 @@ +imports: + - { resource: phpcr.yml } + +framework: + translator: { fallback: "%locale%" } + +assetic: + write_to: "%kernel.root_dir%/../web" + filters: + cssrewrite: + apply_to: "\.(css)$" + +doctrine: + orm: + mappings: + gedmo_tree: + type: "xml" + prefix: "Gedmo\Tree\Entity" + dir: "%kernel.root_dir%/../vendor/gedmo/doctrine-extensions/lib/Gedmo/Tree/Entity" + alias: "GedmoTree" # this one is optional and will default to the name set for the mapping + is_bundle: false + resolve_target_entities: + Sulu\Component\Security\Authentication\UserInterface: Sulu\Bundle\SecurityBundle\Entity\User + Sulu\Component\Security\Authentication\RoleInterface: Sulu\Bundle\SecurityBundle\Entity\Role + Sulu\Bundle\MediaBundle\Entity\CollectionInterface: Sulu\Bundle\MediaBundle\Entity\Collection + Sulu\Bundle\ContactBundle\Entity\AccountInterface: Sulu\Bundle\ContactBundle\Entity\Account + +# doctrine cache providers +doctrine_cache: + providers: + phpcr_meta: + type: %phpcr_cache% + phpcr_nodes: + type: %phpcr_cache% + +# Doctrine Extension Configuration +stof_doctrine_extensions: + orm: + default: + tree: true + +# FOS REST Configuration +fos_rest: + routing_loader: + default_format: "json" + +# LIIP Theme Configuration +liip_theme: + themes: ["default"] + active_theme: "default" + load_controllers: false + +# JMS Serializer +jms_serializer: + metadata: + debug: %kernel.debug% + +# Symfony CMF Configuration +cmf_core: + publish_workflow: + enabled: false + +# Massive Bundles +massive_search: + localization_strategy: index + persistence: + doctrine_orm: + enabled: true + +# Sulu Bundles +sulu_core: + locales: ["de","en"] + phpcr: + backend: "%phpcr_backend%" + workspace: "%phpcr_workspace%" + username: "%phpcr_user%" + password: "%phpcr_pass%" + webspace: + config_dir: "%kernel.root_dir%/Resources/webspaces" + content: + structure: + default_type: + snippet: "default" + paths: + homepage: + path: %kernel.root_dir%/Resources/pages + type: home + page: + path: "%kernel.root_dir%/Resources/pages" + type: "page" + snippet: + path: "%kernel.root_dir%/Resources/snippets" + type: "snippet" + sulu: + path: "%kernel.root_dir%/../vendor/sulu/sulu/src/Sulu/Bundle/CoreBundle/Content/templates" + type: "page" + +sulu_media: + search: + enabled: true + +sulu_websocket: + server: + http_host: %websocket_url% + port: %websocket_port% + +sulu_content: + search: + mapping: + Sulu\Bundle\ContentBundle\Document\PageDocument: + index: page + category: page + Sulu\Bundle\SnippetBundle\Document\SnippetDocument: + index: snippet + category: snippet + +sulu_document_manager: + mapping: + page: + class: Sulu\Bundle\ContentBundle\Document\PageDocument + phpcr_type: sulu:page + home: + class: Sulu\Bundle\ContentBundle\Document\HomeDocument + phpcr_type: sulu:home + route: + class: Sulu\Bundle\ContentBundle\Document\RouteDocument + phpcr_type: sulu:path + snippet: + class: Sulu\Bundle\SnippetBundle\Document\SnippetDocument + phpcr_type: sulu:snippet + +sulu_http_cache: + handlers: + paths: + enabled: true + public: + max_age: 240 + shared_max_age: 240 + use_page_ttl: true + enabled: true + debug: + enabled: %kernel.debug% + proxy_client: + symfony: + enabled: true diff --git a/app/config/website/config.yml b/app/config/website/config.yml index 2de666eeb2..f4bce83771 100644 --- a/app/config/website/config.yml +++ b/app/config/website/config.yml @@ -1,11 +1,11 @@ imports: - { resource: ../config.yml } + - { resource: sulu.yml } - { resource: security.yml } framework: router: resource: "%kernel.root_dir%/config/website/routing.yml" - strict_requirements: ~ session: save_path: "%kernel.cache_dir%/../../sessions/website/%kernel.environment%" @@ -16,13 +16,3 @@ twig: # Assetic Configuration assetic: bundles: [ ClientWebsiteBundle ] - -# Symfony CMF Configuration -cmf_routing: - chain: - routers_by_id: - router.default: 100 - cmf_routing.dynamic_router: 20 - dynamic: - enabled: true - route_provider_service_id: sulu_website.provider.content diff --git a/app/config/website/sulu.yml b/app/config/website/sulu.yml new file mode 100644 index 0000000000..9b27f6f1dc --- /dev/null +++ b/app/config/website/sulu.yml @@ -0,0 +1,12 @@ +imports: + - { resource: ../sulu.yml } + +# Symfony CMF Configuration +cmf_routing: + chain: + routers_by_id: + router.default: 100 + cmf_routing.dynamic_router: 20 + dynamic: + enabled: true + route_provider_service_id: sulu_website.provider.content diff --git a/app/config/widgets.yml.dist b/app/config/widgets.yml.dist index 1f3fdd4ad8..17e8bdd143 100644 --- a/app/config/widgets.yml.dist +++ b/app/config/widgets.yml.dist @@ -1,15 +1,3 @@ sulu_admin: widget_groups: - contact-info: - mappings: - - sulu-contact-contact-info - account-info: - mappings: - - sulu-contact-account-info - - sulu-contact-main-contact - contact-detail: - mappings: - - sulu-contact-main-account - account-detail: - mappings: - - sulu-contact-main-contact + ~