Adding sonata working settings.

1.10.x
Julio Montoya 11 years ago
parent b5b3f683cc
commit d7bd8021f9
  1. 145
      app/config/assetic.yml
  2. 165
      app/config/config.yml
  3. 10
      app/config/config_dev.yml
  4. 4
      app/config/config_prod.yml
  5. 12
      app/config/fos/fos_rest.yml
  6. 26
      app/config/fos/fos_user.yml
  7. 23
      app/config/knp/knp_behat.yml
  8. 11
      app/config/knp/knp_paginator.yml
  9. 53
      app/config/parameters.yml.dist
  10. 27
      app/config/routing.yml
  11. 14
      app/config/routing_admin.yml
  12. 58
      app/config/routing_api.yml
  13. 14
      app/config/routing_dev.yml
  14. 83
      app/config/routing_front.yml
  15. 87
      app/config/security.yml
  16. 125
      app/config/sonata/sonata_admin.yml
  17. 85
      app/config/sonata/sonata_block.yml
  18. 33
      app/config/sonata/sonata_cache.yml
  19. 13
      app/config/sonata/sonata_classification.yml
  20. 6
      app/config/sonata/sonata_core.yml
  21. 70
      app/config/sonata/sonata_formatter.yml
  22. 12
      app/config/sonata/sonata_intl.yml
  23. 181
      app/config/sonata/sonata_media.yml
  24. 28
      app/config/sonata/sonata_news.yml
  25. 36
      app/config/sonata/sonata_notification.yml
  26. 137
      app/config/sonata/sonata_page.yml
  27. 45
      app/config/sonata/sonata_seo.yml
  28. 21
      app/config/sonata/sonata_timeline.yml
  29. 59
      app/config/sonata/sonata_user.yml

@ -0,0 +1,145 @@
assetic:
debug: false # %kernel.debug%
use_controller: false
read_from: %kernel.root_dir%/../web
write_to: %kernel.root_dir%/../web
bundles: [] # disable bundles parsing
filters:
cssrewrite: ~
yui_js: { jar: "%kernel.root_dir%/../bin/yuicompressor.jar" }
yui_css: { jar: "%kernel.root_dir%/../bin/yuicompressor.jar" }
assets:
# see http://sonata-project.org/blog/2012/5/15/assetic-package-configuration
#
sonata_jqueryui_js:
inputs:
- %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.core.js
- %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.widget.js
- %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.mouse.js
- %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.draggable.js
- %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.droppable.js
- %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.resizable.js
- %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.selectable.js
- %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.sortable.js
- %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.effect.js
# - %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.accordion.js
# - %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.autocomplete.js
# - %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.button.js
# - %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.datepicker.js
# - %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.dialog.js
# - %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.effect-blind.js
# - %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.effect-bounce.js
# - %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.effect-clip.js
# - %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.effect-drop.js
# - %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.effect-explode.js
# - %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.effect-fade.js
# - %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.effect-fold.js
# - %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.effect-highlight.js
# - %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.effect-pulsate.js
# - %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.effect-scale.js
# - %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.effect-shake.js
# - %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.effect-slide.js
# - %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.effect-transfer.js
# - %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.menu.js
- %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.position.js
# - %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.progressbar.js
# - %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.slider.js
# - %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.spinner.js
# - %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.tabs.js
- %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/jquery.ui.tooltip.js
# - %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/ui/i18n/jquery-ui-i18n.js
filters:
- yui_js
sonata_jqueryui_css:
inputs:
- %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/themes/base/jquery-ui.css
filters:
- cssrewrite
- yui_css
sonata_formatter_js:
inputs:
# do not uncomment this, ckeditor behave badly when compacted...
#- %kernel.root_dir%/../web/bundles/sonataformatter/vendor/ckeditor/ckeditor.js
- %kernel.root_dir%/../web/bundles/sonataformatter/vendor/markitup-markitup/markitup/jquery.markitup.js
- %kernel.root_dir%/../web/bundles/sonataformatter/markitup/sets/markdown/set.js
- %kernel.root_dir%/../web/bundles/sonataformatter/markitup/sets/html/set.js
- %kernel.root_dir%/../web/bundles/sonataformatter/markitup/sets/textile/set.js
filters:
- yui_js
sonata_formatter_css:
inputs:
- %kernel.root_dir%/../web/bundles/sonataformatter/markitup/skins/sonata/style.css
- %kernel.root_dir%/../web/bundles/sonataformatter/markitup/sets/markdown/style.css
- %kernel.root_dir%/../web/bundles/sonataformatter/markitup/sets/html/style.css
- %kernel.root_dir%/../web/bundles/sonataformatter/markitup/sets/textile/style.css
filters:
- cssrewrite
- yui_css
sonata_admin_js:
inputs:
- %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jquery/dist/jquery.js
- %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jquery.scrollTo/jquery.scrollTo.js
# - %kernel.root_dir%/../web/bundles/sonataadmin/vendor/bootstrap-datepicker/js/bootstrap-datepicker.js
- %kernel.root_dir%/../web/bundles/sonatacore/vendor/moment/min/moment.min.js
- %kernel.root_dir%/../web/bundles/sonataadmin/vendor/bootstrap/dist/js/bootstrap.js
- %kernel.root_dir%/../web/bundles/sonataadmin/vendor/x-editable/dist/bootstrap3-editable/js/bootstrap-editable.js
- %kernel.root_dir%/../web/bundles/sonatacore/vendor/eonasdan-bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min.js
- %kernel.root_dir%/../web/bundles/sonataadmin/vendor/select2/select2.js
- %kernel.root_dir%/../web/bundles/sonataadmin/jquery/jquery.form.js
- %kernel.root_dir%/../web/bundles/sonataadmin/jquery/jquery.confirmExit.js
- %kernel.root_dir%/../web/bundles/sonataadmin/App.js
- %kernel.root_dir%/../web/bundles/sonataadmin/Admin.js
filters:
- yui_js
sonata_admin_css:
inputs:
- %kernel.root_dir%/../web/bundles/sonataadmin/vendor/bootstrap/dist/css/bootstrap.min.css
- %kernel.root_dir%/../web/bundles/sonataadmin/vendor/AdminLTE/css/font-awesome.min.css
- %kernel.root_dir%/../web/bundles/sonataadmin/vendor/AdminLTE/css/ionicons.min.css
- %kernel.root_dir%/../web/bundles/sonataadmin/vendor/AdminLTE/css/AdminLTE.css
- %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jqueryui/themes/flick/jquery-ui.min.css
- %kernel.root_dir%/../web/bundles/sonataadmin/vendor/select2/select2.css
- %kernel.root_dir%/../web/bundles/sonataadmin/vendor/select2/select2-bootstrap.css
- %kernel.root_dir%/../web/bundles/sonataadmin/vendor/x-editable/dist/bootstrap3-editable/css/bootstrap-editable.css
- %kernel.root_dir%/../web/bundles/sonatacore/vendor/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.min.css
- %kernel.root_dir%/../web/bundles/sonataadmin/css/styles.css
- %kernel.root_dir%/../web/bundles/sonataadmin/css/layout.css
filters:
- cssrewrite
- yui_css
sonata_front_js:
inputs:
- %kernel.root_dir%/../web/bundles/sonataadmin/vendor/jquery/dist/jquery.js
- %kernel.root_dir%/../web/bundles/sonataadmin/vendor/bootstrap/dist/js/bootstrap.js
- %kernel.root_dir%/../web/bundles/sonataproduct/js/product.js
- %kernel.root_dir%/../web/bundles/sonatacore/js/base.js
- %kernel.root_dir%/../web/bundles/sonatacore/select2/select2.min.js
- %kernel.root_dir%/../web/bundles/sonatademo/js/demo.js
filters:
- yui_js
sonata_front_css:
inputs:
- %kernel.root_dir%/../web/bundles/sonataadmin/vendor/bootstrap/dist/css/bootstrap.min.css
- %kernel.root_dir%/../web/bundles/sonatacore/select2/select2.css
- %kernel.root_dir%/../web/bundles/mopabootstrap/css/datepicker.css
- %kernel.root_dir%/../web/bundles/sonatademo/css/demo.css
filters:
- cssrewrite
- yui_css

@ -1,6 +1,39 @@
imports:
- { resource: parameters.yml }
- { resource: security.yml }
- { resource: assetic.yml }
- { resource: @ChamiloLMSCoreBundle/Resources/config/admin.yml }
# Mopa Bootstrap
- { resource: mopa/mopa_bootstrap.yml }
# Knp Paginator
- { resource: knp/knp_paginator.yml }
# FriendOfSymfony Bundles
#- { resource: fos/fos_comment.yml }
- { resource: fos/fos_rest.yml }
- { resource: fos/fos_user.yml }
#- { resource: fos/fos_elastica.yml }
# Sonata Core Bundles
- { resource: sonata/sonata_block.yml }
- { resource: sonata/sonata_formatter.yml }
- { resource: sonata/sonata_cache.yml }
#- { resource: sonata/sonata_seo.yml }
- { resource: sonata/sonata_timeline.yml }
- { resource: sonata/sonata_intl.yml }
- { resource: sonata/sonata_core.yml }
# Sonata Feature Bundles
- { resource: sonata/sonata_admin.yml }
- { resource: sonata/sonata_page.yml }
- { resource: sonata/sonata_media.yml }
- { resource: sonata/sonata_news.yml }
- { resource: sonata/sonata_user.yml }
- { resource: sonata/sonata_notification.yml }
- { resource: sonata/sonata_classification.yml }
framework:
#esi: ~
@ -23,11 +56,23 @@ framework:
handler_id: ~
fragments: ~
http_method_override: true
session:
cookie_lifetime: 1440
# Twig Configuration
twig:
debug: "%kernel.debug%"
strict_variables: "%kernel.debug%"
base_template_class: Sonata\CacheBundle\Twig\TwigTemplate14
form:
resources:
- 'SonataFormatterBundle:Form:formatter.html.twig'
- 'SonataMediaBundle:Form:media_widgets.html.twig'
- 'SonataCoreBundle:Form:datepicker.html.twig'
exception_controller: 'FOS\RestBundle\Controller\ExceptionController::showAction'
paths:
"%kernel.root_dir%/../src/ChamiloLMS/CoreBundle/Resources/views/default": template_style
@ -84,26 +129,33 @@ assetic:
apply_to: "\.less$"
cssrewrite: ~
braincrafted_bootstrap:
less_filter: lessphp
#braincrafted_bootstrap:
#less_filter: lessphp
# 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%"
default_connection: default
connections:
default:
driver: "%database_driver%"
host: "%database_host%"
port: "%database_port%"
dbname: "%database_name%"
user: "%database_user%"
password: "%database_password%"
charset: UTF8
types:
json: Sonata\Doctrine\Types\JsonType
#currency: Sonata\Component\Currency\CurrencyDoctrineType
orm:
auto_generate_proxy_classes: "%kernel.debug%"
auto_mapping: true
default_entity_manager: default
# auto_mapping: true
entity_managers:
default:
auto_mapping: true
mappings: ~
# Swiftmailer Configuration
swiftmailer:
@ -113,53 +165,15 @@ swiftmailer:
password: "%mailer_password%"
spool: { type: memory }
sonata_block:
default_contexts: [cms]
blocks:
sonata.admin.block.admin_list:
contexts: [admin]
#sonata.admin_doctrine_orm.block.audit:
# contexts: [admin]
sonata.block.service.text:
sonata.block.service.rss:
sonata.block.service.course:
sonata.block.service.menu:
# Some specific block from the SonataMediaBundle
#sonata.media.block.media:
#sonata.media.block.gallery:
#sonata.media.block.feature_media:
sonata_media:
# if you don't use default namespace configuration
#class:
# media: MyVendor\MediaBundle\Entity\Media
# gallery: MyVendor\MediaBundle\Entity\Gallery
# gallery_has_media: MyVendor\MediaBundle\Entity\GalleryHasMedia
default_context: default
db_driver: doctrine_orm # or doctrine_mongodb, doctrine_phpcr
contexts:
default: # the default context is mandatory
providers:
- sonata.media.provider.dailymotion
- sonata.media.provider.youtube
- sonata.media.provider.image
- sonata.media.provider.file
formats:
small: { width: 100 , quality: 70}
big: { width: 500 , quality: 70}
cdn:
server:
path: /uploads/media # http://media.sonata-project.org/
filesystem:
local:
directory: %kernel.root_dir%/../web/uploads/media
create: false
jms_security_extra:
secure_all_services: false
jms_serializer:
metadata:
directories:
- { path: %kernel.root_dir%/../vendor/sonata-project/user-bundle/Resources/config/serializer/FOSUserBundle, namespace_prefix: 'FOS\UserBundle' }
#- { path: %kernel.root_dir%/../vendor/sonata-project/ecommerce/src/BasketBundle/Resources/config/serializer/Component, namespace_prefix: 'Sonata\Component\Basket' }
- { path: %kernel.root_dir%/../vendor/sonata-project/datagrid-bundle/Resources/config/serializer, namespace_prefix: 'Sonata\DatagridBundle' }
knp_menu:
twig: # use "twig: false" to disable the Twig extension and the TwigRenderer
@ -167,9 +181,26 @@ knp_menu:
templating: false # if true, enables the helper for PHP templates
default_renderer: twig # The renderer to use, list is also available by default
chamilo:
system_version: 10.0.0
system_stable: false
software_name: chamilo
software_url: http://www.chamilo.org/
platform_charset: utf-8
# %kernel.root_dir%/DoctrineMigrations
doctrine_migrations:
dir_name: %kernel.root_dir%/../vendor/chamilo/chash/src/Chash/Migrations
namespace: Chash\Migrations
table_name: chamilo_migration_versions
name: Chamilo Migrations
fos_advanced_encoder:
encoders:
FOS\UserBundle\Model\UserInterface: sha512
legacy_encoder:
id: chamilolms.userbundle.encoder
sonata_admin:
title: ChamiloLMS
title_logo: apple-touch-icon.png
nelmio_api_doc: ~
sensio_framework_extra:
view: { annotations: false }
router: { annotations: true }
request: { converters: true }

@ -2,9 +2,7 @@ imports:
- { resource: config.yml }
framework:
router:
resource: "%kernel.root_dir%/config/routing_dev.yml"
strict_requirements: true
router: { resource: "%kernel.root_dir%/config/routing_dev.yml" }
profiler: { only_exceptions: false }
web_profiler:
@ -17,9 +15,9 @@ monolog:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: debug
console:
type: console
bubble: false
# console:
# type: console
# bubble: false
# uncomment to get logging in your browser
# you may have to allow bigger header sizes in your Web server configuration
#firephp:

@ -21,5 +21,5 @@ monolog:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: debug
console:
type: console
# console:
# type: console

@ -0,0 +1,12 @@
fos_rest:
param_fetcher_listener: true
body_listener: true
format_listener: true
view:
view_response_listener: force
body_converter:
enabled: false
validate: true
exception:
messages:
'Symfony\Component\HttpKernel\Exception\NotFoundHttpException': true

@ -0,0 +1,26 @@
fos_user:
db_driver: orm # can be orm or odm
firewall_name: main
# if you change the class configuration, please also alter the sonata_user.yml file
user_class: Application\Sonata\UserBundle\Entity\User
group:
group_class: Application\Sonata\UserBundle\Entity\Group
group_manager: sonata.user.orm.group_manager
service:
user_manager: sonata.user.orm.user_manager
registration:
form:
type: fos_user_profile
handler: fos_user.profile.form.handler.default
name: fos_user_profile_form
validation_groups: [ProfileCustom]
profile:
form:
type: fos_user_profile
handler: fos_user.profile.form.handler.default
name: fos_user_profile_form
validation_groups: [ProfileCustom]

@ -0,0 +1,23 @@
#
# References :
# Behat - BDD framework : http://docs.behat.org/bundle/index.html
# Mink - Web acceptance testing : http://mink.behat.org/
#
mink:
base_url: http://localhost/app_dev.php
show_cmd: mate %%s
# default_session: sahi # use Javascript engine
default_session: goutte # use for real HTTP test (remote server)
# default_session: symfony # use symfony http client, test local symfony project
goutte:
server_parameters:
host: http://localhost
sahi:
host: x.local
behat: ~

@ -0,0 +1,11 @@
knp_paginator:
page_range: 5 # default page range used in pagination control
default_options:
page_name: page # page query parameter name
sort_field_name: sort # sort field query parameter name
sort_direction_name: direction # sort direction query parameter name
distinct: true # ensure distinct results, useful when ORM queries are using GROUP BY statements
template:
pagination: MopaBootstrapBundle:Pagination:sliding.html.twig # sliding pagination controls template
# sortable: MopaBootstrapBundle:Pagination:sortable_link.html.twig # sort link template
# pagination: KnpPaginatorBundle:Pagination:twitter_bootstrap_v3_pagination.html.twig

@ -1,28 +1,35 @@
parameters:
database_driver: pdo_mysql
database_host: 127.0.0.1
database_port: ~
database_name: chamilo10
database_user: root
database_driver: pdo_mysql
database_host: 127.0.0.1
database_port: null
database_name: chamilo
database_user: root
database_password: root
mailer_transport: smtp
mailer_host: 127.0.0.1
mailer_user: ~
mailer_password: ~
locale: en
secret: ThisTokenIsNotSoSecretChangeIt
path.data: ~
path.temp: ~
path.courses: ~
path.logs: ~
session_lifetime: ~
security_key: ~
mailer_transport: smtp
mailer_host: 127.0.0.1
mailer_user: null
mailer_password: null
locale: en
secret: ThisTokenIsNotSoSecretChangeIt
path.data: null
path.temp: null
path.courses: null
path.logs: null
session_lifetime: null
security_key: null
password_encryption: sha1
deny_delete_users: false
login_as_forbidden_globally: false
name_order_conventions:
name_order_conventions: null
sonata_admin.title: 'Chamilo LMS'
sonata_admin.logo_title: /bundles/sonataadmin/logo_title.png
sonata_news.blog_title: 'Campus blog'
sonata_news.blog_link: 'http://awesome-blog.ltd'
sonata_news.blog_description: 'My Awesome blog description'
sonata_news.salt: ThisTokenIsNotSoSecretChangeIt
sonata_news.comment.emails:
- mail@example.org
sonata_news.comment.email_from: no-reply@example.org
sonata_media.cdn.host: /uploads/media
sonata_user.google_authenticator.server: demo.sonata-project.org
sonata_page.varnish.command: if [ ! -r "/etc/varnish/secret" ]; then echo "VALID ERROR :/"; else varnishadm -S /etc/varnish/secret -T 127.0.0.1:6082 {{ COMMAND }} "{{ EXPRESSION }}"; fi; # you need to adapt this line to work with your configuration

@ -1,18 +1,23 @@
main:
resource: "@ChamiloLMSCoreBundle/Resources/config/routing.yml"
chamilo_lms_course:
resource: "@ChamiloLMSCourseBundle/Resources/config/routing.yml"
prefix: /
login_check:
path: /login_check
_front:
resource: routing_front.yml
login:
path: /login
defaults: { _controller: ChamiloLMSCoreBundle:Security:login }
_admin:
resource: routing_admin.yml
prefix: /admin
secured_logout:
pattern: /secured/logout
_api:
resource: routing_api.yml
prefix: /api
logout:
pattern: /secured/logout
core_bundle:
resource: "@ChamiloLMSCoreBundle/Resources/config/routing.yml"
root:
path: /
logout:
path: /logout

@ -0,0 +1,14 @@
# cross links between kernels
admin:
resource: '@SonataAdminBundle/Resources/config/routing/sonata_admin.xml'
_sonata_admin:
resource: .
type: sonata_admin
soanata_user_admin:
resource: '@SonataUserBundle/Resources/config/routing/admin_security.xml'
sonata_media_pixlr:
resource: '@SonataMediaBundle/Resources/config/routing/pixlr.xml'
prefix: /admin/media

@ -0,0 +1,58 @@
NelmioApiDocBundle:
resource: "@NelmioApiDocBundle/Resources/config/routing.yml"
prefix: /doc
sonata_api_classification:
type: rest
prefix: /classification
resource: "@SonataClassificationBundle/Resources/config/routing/api.xml"
sonata_api_news:
type: rest
prefix: /news
resource: "@SonataNewsBundle/Resources/config/routing/api.xml"
sonata_api_media:
type: rest
prefix: /media
resource: "@SonataMediaBundle/Resources/config/routing/api.xml"
sonata_api_notification:
type: rest
prefix: /notification
resource: "@SonataNotificationBundle/Resources/config/routing/api.xml"
#sonata_api_ecommerce_product:
# type: rest
# prefix: /ecommerce
# resource: "@SonataProductBundle/Resources/config/routing/api.xml"
#
#sonata_api_ecommerce_order:
# type: rest
# prefix: /ecommerce
# resource: "@SonataOrderBundle/Resources/config/routing/api.xml"
#
#sonata_api_ecommerce_invoice:
# type: rest
# prefix: /ecommerce
# resource: "@SonataInvoiceBundle/Resources/config/routing/api.xml"
#
#sonata_api_ecommerce_customer:
# type: rest
# prefix: /ecommerce
# resource: "@SonataCustomerBundle/Resources/config/routing/api.xml"
#
#sonata_api_ecommerce_basket:
# type: rest
# prefix: /ecommerce
# resource: "@SonataBasketBundle/Resources/config/routing/api.xml"
sonata_api_page:
type: rest
prefix: /page
resource: "@SonataPageBundle/Resources/config/routing/api.xml"
sonata_api_user:
type: rest
prefix: /user
resource: "@SonataUserBundle/Resources/config/routing/api.xml"

@ -1,3 +1,10 @@
_main:
resource: routing.yml
#_assetic:
# resource: .
# type: assetic
_wdt:
resource: "@WebProfilerBundle/Resources/config/routing/wdt.xml"
prefix: /_wdt
@ -5,10 +12,3 @@ _wdt:
_profiler:
resource: "@WebProfilerBundle/Resources/config/routing/profiler.xml"
prefix: /_profiler
_configurator:
resource: "@SensioDistributionBundle/Resources/config/routing/webconfigurator.xml"
prefix: /_configurator
_main:
resource: routing.yml

@ -0,0 +1,83 @@
# these 2 references : sonata_demo and sonata_qa can be safely removed
#sonata_demo:
# resource: "@SonataDemoBundle/Resources/config/routing/demo.xml"
#
#sonata_qa:
# resource: "@SonataQABundle/Resources/config/routing/qa.xml"
sonata_user_security:
resource: "@SonataUserBundle/Resources/config/routing/sonata_security_1.xml"
sonata_user_resetting:
resource: "@SonataUserBundle/Resources/config/routing/sonata_resetting_1.xml"
prefix: /resetting
sonata_user_profile:
resource: "@SonataUserBundle/Resources/config/routing/sonata_profile_1.xml"
prefix: /profile
sonata_user_register:
resource: "@SonataUserBundle/Resources/config/routing/sonata_registration_1.xml"
prefix: /register
sonata_user_change_password:
resource: "@SonataUserBundle/Resources/config/routing/sonata_change_password_1.xml"
prefix: /profile
sonata_cache_cache:
resource: '@SonataCacheBundle/Resources/config/routing/cache.xml'
prefix: /
sonata_page_cache:
resource: '@SonataPageBundle/Resources/config/routing/cache.xml'
prefix: /
sonata_page_exceptions:
resource: '@SonataPageBundle/Resources/config/routing/exceptions.xml'
prefix: /page
sonata_media_gallery:
resource: '@SonataMediaBundle/Resources/config/routing/gallery.xml'
prefix: /media/gallery
sonata_media_media:
resource: '@SonataMediaBundle/Resources/config/routing/media.xml'
prefix: /media
#
#sonata_customer:
# resource: @SonataCustomerBundle/Resources/config/routing/customer.xml
# prefix: /shop/user
#
#sonata_basket:
# resource: @SonataBasketBundle/Resources/config/routing/basket.xml
# prefix: /shop/basket
#
#sonata_order:
# resource: @SonataOrderBundle/Resources/config/routing/order.xml
# prefix: /shop/user/order
#
#sonata_product_catalog:
# resource: @SonataProductBundle/Resources/config/routing/catalog.xml
# prefix: /shop/catalog
#
#sonata_product:
# resource: @SonataProductBundle/Resources/config/routing/product.xml
# prefix: /shop/product
#
#sonata_payment:
# resource: @SonataPaymentBundle/Resources/config/routing/payment.xml
# prefix: /shop/payment
#
#sonata_invoice:
# resource: @SonataInvoiceBundle/Resources/config/routing/invoice.xml
# prefix: /shop/user/invoice
blog:
resource: '@SonataNewsBundle/Resources/config/routing/news.xml'
prefix: /blog
#fos_comment:
# type: rest
# resource: "@FOSCommentBundle/Resources/config/routing.yml"
# prefix: /comments
# defaults: { _format: html }

@ -1,14 +1,21 @@
security:
encoders:
ChamiloLMS\CoreBundle\Entity\User:
algorithm: %password_encryption%
encode_as_base64: false
iterations: 1
FOS\UserBundle\Model\UserInterface:
id: chamilolms.userbundle.encoder
role_hierarchy:
ROLE_SONATA_ADMIN: ROLE_USER
ROLE_ADMIN:
- ROLE_SONATA_ADMIN
- ROLE_QUESTION_MANAGER
- ROLE_SESSION_MANAGER
- ROLE_TEACHER
- ROLE_DIRECTOR
- ROLE_JURY_PRESIDENT
ROLE_SUPER_ADMIN: [ROLE_SONATA_ADMIN, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH]
ROLE_GLOBAL_ADMIN: [ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH]
ROLE_ADMIN: [ROLE_USER, ROLE_QUESTION_MANAGER, ROLE_SESSION_MANAGER, ROLE_TEACHER, ROLE_DIRECTOR, ROLE_JURY_PRESIDENT]
ROLE_RRHH: [ROLE_TEACHER]
ROLE_TEACHER: [ROLE_STUDENT]
ROLE_QUESTION_MANAGER: [ROLE_STUDENT, ROLE_QUESTION_MANAGER]
@ -16,31 +23,69 @@ security:
ROLE_STUDENT: [ROLE_STUDENT]
ROLE_ANONYMOUS: [ROLE_ANONYMOUS]
ROLE_SUPER_ADMIN: [ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH]
SONATA:
- ROLE_SONATA_PAGE_ADMIN_PAGE_EDIT # if you are not using acl then this line must be uncommented
- ROLE_SONATA_PAGE_ADMIN_BLOCK_EDIT
access_decision_manager:
strategy: unanimous
providers:
users_db:
entity: { class: ChamiloLMSCoreBundle:User, property: username }
fos_userbundle:
id: fos_user.user_manager
firewalls:
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
pattern: ^/(_(profiler|wdt)|css|images|js|admin/_(wdt|profiler)|api/_(wdt|profiler))/
security: false
admin:
pattern: /admin(.*)
context: user
form_login:
provider: fos_userbundle
login_path: /admin/login
use_forward: false
check_path: /admin/login_check
failure_path: null
logout:
path: /admin/logout
anonymous: true
secured:
pattern: ^/
main:
pattern: .*
context: user
form_login:
login_path: login
check_path: login_check
provider: fos_userbundle
login_path: /login
use_forward: false
check_path: /login_check
failure_path: null
success_handler: listener.login_success_handler
logout:
path: /secured/logout
path: /logout
target: /
success_handler: listener.logout_success_handler
anonymous: ~
provider: users_db
#http_basic:
# realm: "Secured Demo Area"
invalidate_session: false
handlers: ['sonata.page.cms_manager_selector']
anonymous: true
access_control:
#- { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY, requires_channel: https }
# URL of FOSUserBundle which need to be available to anonymous users
- { path: ^/login$, role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY }
# Admin login page needs to be access without credential
- { path: ^/admin/login$, role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/admin/logout$, role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/admin/login_check$, role: IS_AUTHENTICATED_ANONYMOUSLY }
# Secured part of the site
# This config requires being logged for the whole site and having the admin role for the admin part.
# Change these rules to adapt them to your needs
- { path: ^/admin/, role: [ROLE_ADMIN, ROLE_SONATA_ADMIN] }
- { path: ^/profile/, role: IS_AUTHENTICATED_FULLY }
- { path: ^/.*, role: IS_AUTHENTICATED_ANONYMOUSLY }
acl:
connection: default

@ -0,0 +1,125 @@
# more information can be found here http://sonata-project.org/bundles/admin
sonata_admin:
# default value, change it to sonata.admin.security.handler.acl to use ACL
security:
handler: sonata.admin.security.handler.role
title: %sonata_admin.title%
title_logo: %sonata_admin.logo_title%
options:
html5_validate: false # does not use html5 validation
pager_links: 5 # pager max links to display
templates:
# default global templates
# the layout template include javascript/stylesheet to the formatter bundle,
# if you don't need it use the default one: SonataAdminBundle::standard_layout.html.twig
#layout: ApplicationSonataAdminBundle::layout.html.twig
layout: SonataAdminBundle::standard_layout.html.twig
ajax: SonataAdminBundle::ajax_layout.html.twig
# default value if done set, actions templates, should extends a global templates
list: SonataAdminBundle:CRUD:list.html.twig
show: SonataAdminBundle:CRUD:show.html.twig
edit: SonataAdminBundle:CRUD:edit.html.twig
dashboard:
blocks:
- { position: left, type: sonata.admin.block.admin_list }
# - { position: right, type: sonata.admin_doctrine_orm.block.audit}
- { position: center, type: sonata.block.service.text, settings: { content: "<h2>Welcome!</h2> You can customize this dashboard by editing the sonata_admin.yml file. The current dashboard presents the recent items from the NewsBundle and a timeline with the latest action"} }
- { position: center, type: sonata.timeline.block.timeline, settings: { context: SONATA_ADMIN, max_per_page: 25 }}
#- { position: center, type: sonata.news.block.recent_posts, settings: { title: Recent Posts, number: 7, mode: admin }}
- { position: left, type: sonata.block.service.text, settings: { content: "<div class='panel panel-default'><div class='panel-heading'><h3 class='panel-title'>Welcome!</h3></div><div class='panel-body'>You can customize this dashboard by editing the <code>sonata_admin.yml</code> file. The current dashboard presents the recent items from the NewsBundle and a non-statistical e-commerce information.</div></div>"} }
#- { position: center, type: sonata.news.block.recent_comments, settings: { title: Recent Comments, number: 7, mode: admin }}
#- { position: right, type: sonata.order.block.recent_orders, settings: { title: Recent Orders, number: 5, mode: admin }}
#- { position: right, type: sonata.customer.block.recent_customers, settings: { title: Recent Customers, number: 5, mode: admin }}
#- { position: right, type: sonata.block.service.rss, settings: { title: Sonata Project's Feeds, url: http://sonata-project.org/blog/archive.rss }}
groups:
sonata.admin.group.content:
label: sonata_content
label_catalogue: SonataDemoBundle
icon: '<i class="fa fa-th"></i>'
items:
#- sonata.page.admin.page
- sonata.news.admin.comment
- sonata.news.admin.post
- sonata.media.admin.media
- sonata.media.admin.gallery
#- sonata.comment.admin.thread
#sonata.admin.group.ecommerce:
# label: sonata_ecommerce
# label_catalogue: SonataAdminBundle
# items:
# - sonata.customer.admin.customer
# - sonata.invoice.admin.invoice
# - sonata.order.admin.order
# - sonata.product.admin.product
sonata.admin.group.classification:
label: sonata_classification
label_catalogue: SonataClassificationBundle
icon: '<i class="fa fa-sitemap"></i>'
items:
- sonata.classification.admin.category
- sonata.classification.admin.tag
- sonata.classification.admin.collection
sonata.admin.group.site_builder:
label: Site Builder
label_catalogue: SonataDemoBundle
icon: '<i class="fa fa-puzzle-piece"></i>'
items:
- sonata.page.admin.page
- sonata.page.admin.site
sonata.admin.group.administration:
label: sonata_administration
label_catalogue: SonataAdminBundle
icon: '<i class="fa fa-cogs"></i>'
items:
- sonata.user.admin.user
- sonata.user.admin.group
#- sonata.page.admin.site
- sonata.page.admin.site
- sonata.notification.admin.message
sonata.admin.group.lms:
label: LMS
icon: '<i class="fa fa-play-circle"></i>'
label_catalogue: SonataAdminBundle
items:
- sonata.admin.course
- sonata.admin.session
assets:
stylesheets:
# The sandbox includes default pre-optimized version of some css and js
# So you can either use them, and add your custom assets here
# ~ or ~
# tweak the assetic.yml and the following lines
- assetic/sonata_admin_css.css
- assetic/sonata_formatter_css.css
- assetic/sonata_jqueryui_css.css
- bundles/sonatademo/css/demo.css
# - bundles/sonataformatter/markitup/skins/sonata/style.css
# - bundles/sonataformatter/markitup/sets/markdown/style.css
# - bundles/sonataformatter/markitup/sets/html/style.css
# - bundles/sonataformatter/markitup/sets/textile/style.css
# - bundles/sonataadmin/vendor/bootstrap/dist/css/bootstrap.min.css
# - bundles/sonataadmin/vendor/AdminLTE/css/font-awesome.min.css
# - bundles/sonataadmin/vendor/AdminLTE/css/ionicons.min.css
# - bundles/sonataadmin/vendor/AdminLTE/css/AdminLTE.css
# - bundles/sonataadmin/vendor/jqueryui/themes/flick/jquery-ui.min.css
# - bundles/sonataadmin/vendor/select2/select2.css
# - bundles/sonataadmin/vendor/select2/select2-bootstrap.css
# - bundles/sonataadmin/vendor/x-editable/dist/bootstrap3-editable/css/bootstrap-editable.css
# - bundles/sonataadmin/css/styles.css
# - bundles/sonataadmin/css/layout.css
javascripts:
- assetic/sonata_admin_js.js
- assetic/sonata_jqueryui_js.js
- assetic/sonata_formatter_js.js
- bundles/sonataformatter/vendor/ckeditor/ckeditor.js
#- sonata.demo.admin.car
#- sonata.demo.admin.engine

@ -0,0 +1,85 @@
sonata_block:
context_manager: sonata.page.block.context_manager
default_contexts: [sonata_page_bundle]
http_cache:
listener: true
menus:
"ChamiloLMSCoreBundle:MainMenuBuilder:mainMenu": "Main Menu"
blocks:
sonata.admin.block.admin_list:
contexts: [admin]
sonata.timeline.block.timeline:
contexts: [admin]
sonata.admin.block.search_result:
contexts: [admin]
#sonata.admin_doctrine_orm.block.audit:
# contexts: [admin]
# Chamilo blocks
chamilolms.corebundle.block.course:
chamilolms.corebundle.block.breadcrumb:
chamilolms.corebundle.block.main_menu:
# Builtin Block
sonata.block.service.text:
sonata.block.service.container:
sonata.block.service.rss:
sonata.block.service.menu:
sonata.block.service.template:
# PageBundle's Blocks
sonata.page.block.container:
# cache: sonata.cache.memcached
# cache: sonata.cache.predis
# cache: sonata.page.cache.esi # if you are using the PageBundle
# cache: sonata.block.cache.esi # if you are using the BlockBundle without the PageBundle
sonata.page.block.children_pages:
sonata.page.block.breadcrumb:
# MediaBundle's Blocks
sonata.media.block.media:
sonata.media.block.gallery:
sonata.media.block.feature_media:
# NewsBundle's Blocks
sonata.news.block.recent_comments:
sonata.news.block.recent_posts:
# TimelineBundle's Blocks
sonata.timeline.block.timeline:
sonata.timeline.block.timeline:
contexts: [admin]
# UserBundle's Blocks
sonata.user.block.account:
cache: sonata.page.cache.js_async
#cache: sonata.page.cache.esi
contexts: [user]
sonata.user.block.menu:
contexts: [user]
# SeoBundle's Blocks
sonata.seo.block.social.container:
sonata.seo.block.email.share_button:
sonata.seo.block.facebook.like_box:
sonata.seo.block.facebook.like_button:
sonata.seo.block.facebook.send_button:
sonata.seo.block.facebook.share_button:
sonata.seo.block.pinterest.pin_button:
sonata.seo.block.twitter.share_button:
sonata.seo.block.twitter.follow_button:
sonata.seo.block.twitter.hashtag_button:
sonata.seo.block.twitter.mention_button:
sonata.seo.block.twitter.embed:
sonata.demo.block.newsletter:
# Formatter
sonata.formatter.block.formatter:
sonata.seo.block.breadcrumb.homepage:

@ -0,0 +1,33 @@
#
# more information can be found here http://sonata-project.org/bundles/cache
#
#sonata_cache:
# caches:
# esi:
# servers:
# - varnishadm -T 127.0.0.1:2000 {{ COMMAND }} "{{ EXPRESSION }}"
#
# ssi:
# token: TheToken
#
# mongo:
# database: cache
# collection: cache
# servers:
# - {host: 127.0.0.1, port: 27017, user: username, password: pASS'}
# - {host: 127.0.0.2}
#
# memcached:
# prefix: test # prefix to ensure there is no clash between instances
# servers:
# - {host: 127.0.0.1, port: 11211, weight: 0}
#
# predis:
# servers:
# - {host: 127.0.0.1, port: 11211, database: 6379}
#
# apc:
# token: s3cur3 # token used to clear the related cache
# prefix: test # prefix to ensure there is no clash between instances
# servers:
# - { domain: kooqit.local, ip: 127.0.0.1, port: 80}

@ -0,0 +1,13 @@
sonata_classification:
# ...
doctrine:
orm:
entity_managers:
default:
#metadata_cache_driver: apc
#query_cache_driver: apc
#result_cache_driver: apc
mappings:
ApplicationSonataClassificationBundle: ~
SonataClassificationBundle: ~

@ -0,0 +1,6 @@
sonata_core:
flashmessage:
error:
css_class: danger
success:

@ -0,0 +1,70 @@
#
# more information can be found here http://sonata-project.org/bundles/formatter
#
sonata_formatter:
formatters:
markdown:
service: sonata.formatter.text.markdown
extensions:
- sonata.formatter.twig.control_flow
- sonata.formatter.twig.gist
- sonata.media.formatter.twig
text:
service: sonata.formatter.text.text
extensions:
- sonata.formatter.twig.control_flow
- sonata.formatter.twig.gist
- sonata.media.formatter.twig
rawhtml:
service: sonata.formatter.text.raw
extensions:
- sonata.formatter.twig.control_flow
- sonata.formatter.twig.gist
- sonata.media.formatter.twig
richhtml:
service: sonata.formatter.text.raw
extensions:
- sonata.formatter.twig.control_flow
- sonata.formatter.twig.gist
- sonata.media.formatter.twig
ckeditor:
templates:
browser: 'SonataFormatterBundle:Ckeditor:browser.html.twig'
upload: 'SonataFormatterBundle:Ckeditor:upload.html.twig'
# This section can be used to include the SonataMediaBundle with CKEDITOR
# => http://sonata-project.org/bundles/media/master/doc/reference/extra.html#ckeditor-integration
# there is also a configuration in the sonata_formatter section (see sonata_formatter.yml)
ivory_ck_editor:
default_config: default
configs:
default:
filebrowserBrowseRoute: admin_sonata_media_media_ckeditor_browser
filebrowserImageBrowseRoute: admin_sonata_media_media_ckeditor_browser
# Display images by default when clicking the image dialog browse button
filebrowserImageBrowseRouteParameters:
provider: sonata.media.provider.image
filebrowserUploadRoute: admin_sonata_media_media_ckeditor_upload
filebrowserUploadRouteParameters:
provider: sonata.media.provider.file
# Upload file as image when sending a file from the image dialog
filebrowserImageUploadRoute: admin_sonata_media_media_ckeditor_upload
filebrowserImageUploadRouteParameters:
provider: sonata.media.provider.image
context: default # Optional, to upload in a custom context
news:
filebrowserBrowseRoute: admin_sonata_media_media_ckeditor_browser
filebrowserImageBrowseRoute: admin_sonata_media_media_ckeditor_browser
# Display images by default when clicking the image dialog browse button
filebrowserImageBrowseRouteParameters:
provider: sonata.media.provider.image
filebrowserUploadRoute: admin_sonata_media_media_ckeditor_upload
filebrowserUploadRouteParameters:
provider: sonata.media.provider.file
# Upload file as image when sending a file from the image dialog
filebrowserImageUploadRoute: admin_sonata_media_media_ckeditor_upload
filebrowserImageUploadRouteParameters:
provider: sonata.media.provider.image
context: news # Optional, to upload in a custom context

@ -0,0 +1,12 @@
#
# more information can be found here http://sonata-project.org/bundles/intl
#
sonata_intl:
locale: ~
timezone:
# if service is left blank, the chain detector will be used with detectors
# defined in the dedicated section
service: ~
detectors:
- sonata.intl.timezone_detector.user # default value if SonataUserBundle is available
- sonata.intl.timezone_detector.locale # default value

@ -0,0 +1,181 @@
#
# more information can be found here http://sonata-project.org/bundles/media
#
sonata_media:
db_driver: doctrine_orm # | doctrine_mongodb
default_context: default
contexts:
default: # the default context is mandatory
download:
mode: http # X-Sendfile | http
providers:
- sonata.media.provider.dailymotion
- sonata.media.provider.youtube
- sonata.media.provider.image
- sonata.media.provider.file
- sonata.media.provider.vimeo
formats:
small: { width: 100, quality: 100}
big: { width: 970 , quality: 100}
news:
providers:
- sonata.media.provider.dailymotion
- sonata.media.provider.youtube
- sonata.media.provider.image
formats:
abstract: { width: 100, quality: 100}
wide: { width: 820, quality: 100}
sonata_collection:
providers:
- sonata.media.provider.image
formats:
preview: { width: 100, quality: 100}
wide: { width: 820, quality: 100}
sonata_category:
providers:
- sonata.media.provider.image
formats:
preview: { width: 100, quality: 100}
wide: { width: 820, quality: 100}
sonata_product:
providers:
- sonata.media.provider.image
formats:
preview: { width: 100, quality: 100}
small: { width: 300, quality: 100}
large: { width: 750, quality: 100}
cdn:
# define the public base url for the uploaded media
server:
path: %sonata_media.cdn.host%
filesystem:
# define where the uploaded file will be stored
local:
directory: %kernel.root_dir%/../web/uploads/media
create: true
providers:
# ...
file:
# the resizer must be set to false, otherwhise this can delete icon files from the fs
resizer: false
image:
thumbnail: sonata.media.thumbnail.format # default value
# thumbnail: sonata.media.thumbnail.consumer.format # can be used to dispatch the resize action to async task
# thumbnail: sonata.media.thumbnail.liip_imagine # use the LiipImagineBundle to resize the image
vimeo:
thumbnail: sonata.media.thumbnail.format # default value
# thumbnail: sonata.media.thumbnail.consumer.format # can be used to dispatch the resize action to async task
# thumbnail: sonata.media.thumbnail.liip_imagine # use the LiipImagineBundle to resize the image
youtube:
thumbnail: sonata.media.thumbnail.format # default value
# thumbnail: sonata.media.thumbnail.consumer.format # can be used to dispatch the resize action to async task
# thumbnail: sonata.media.thumbnail.liip_imagine # use the LiipImagineBundle to resize the image
dailymotion:
thumbnail: sonata.media.thumbnail.format # default value
# thumbnail: sonata.media.thumbnail.consumer.format # can be used to dispatch the resize action to async task
# thumbnail: sonata.media.thumbnail.liip_imagine # use the LiipImagineBundle to resize the image
pixlr:
enabled: true
referrer: Demo - Sonata Project
resizer:
simple:
# mode: outbound
mode: inset
#
# The LiipImagineBundle can be used if you want to convert on demand an image
# to a specific format. (ie a controller render the file)
# more information can be found here : https://github.com/liip/LiipImagineBundle
#
#liip_imagine:
# filter_sets:
#
# # this configuration match the sonata_media configuration format definition
# sonata_product_preview:
# quality: 75
# controller_action: 'SonataMediaBundle:Media:liipImagineFilter'
# filters:
# thumbnail: { size: [100, 100], mode: outbound }
#
# sonata_product_small:
# quality: 75
# controller_action: 'SonataMediaBundle:Media:liipImagineFilter'
# filters:
# thumbnail: { size: [200, 100], mode: outbound }
#
# sonata_product_large:
# quality: 75
# controller_action: 'SonataMediaBundle:Media:liipImagineFilter'
# filters:
# thumbnail: { size: [600, 100], mode: outbound }
#
# news_abstract:
# quality: 75
# controller_action: 'SonataMediaBundle:Media:liipImagineFilter'
# filters:
# thumbnail: { size: [100, 100], mode: outbound }
#
# news_wide:
# quality: 75
# controller_action: 'SonataMediaBundle:Media:liipImagineFilter'
# filters:
# thumbnail: { size: [820, 100], mode: outbound }
#
# sonata_collection_preview:
# quality: 75
# controller_action: 'SonataMediaBundle:Media:liipImagineFilter'
# filters:
# thumbnail: { size: [100, 100], mode: outbound }
#
# sonata_collection_wide:
# quality: 75
# controller_action: 'SonataMediaBundle:Media:liipImagineFilter'
# filters:
# thumbnail: { size: [820, 100], mode: outbound }
#
# sonata_category_preview:
# quality: 75
# controller_action: 'SonataMediaBundle:Media:liipImagineFilter'
# filters:
# thumbnail: { size: [100, 100], mode: outbound }
#
# sonata_category_wide:
# quality: 75
# controller_action: 'SonataMediaBundle:Media:liipImagineFilter'
# filters:
# thumbnail: { size: [820, 100], mode: outbound }
#
# default_small:
# quality: 75
# controller_action: 'SonataMediaBundle:Media:liipImagineFilter'
# filters:
# thumbnail: { size: [100, 100], mode: outbound }
#
# default_big:
# quality: 75
# controller_action: 'SonataMediaBundle:Media:liipImagineFilter'
# filters:
# thumbnail: { size: [820, 70], mode: outbound }
# Enable Doctrine to map the provided entities
doctrine:
orm:
entity_managers:
default:
mappings:
ApplicationSonataMediaBundle: ~
SonataMediaBundle: ~

@ -0,0 +1,28 @@
#
# more information can be found here http://sonata-project.org/bundles/news
#
sonata_news:
title: %sonata_news.blog_title%
link: %sonata_news.blog_link%
description: %sonata_news.blog_description%
salt: %sonata_news.salt%
# permalink_generator: sonata.news.permalink.category # /party/new-year
permalink_generator: sonata.news.permalink.date # /2011/12/31/new-year
# comment options
comment:
notification:
emails: %sonata_news.comment.emails%
from: %sonata_news.comment.email_from%
template: 'SonataNewsBundle:Mail:comment_notification.txt.twig'
# Enable Doctrine to map the provided entities
doctrine:
orm:
entity_managers:
default:
mappings:
ApplicationSonataNewsBundle: ~
SonataNewsBundle: ~

@ -0,0 +1,36 @@
sonata_notification:
backend: sonata.notification.backend.postpone
# backend: sonata.notification.backend.doctrine
# backend: sonata.notification.backend.rabbitmq
# queues:
# default:
# queue: message
# routing_key: ''
# backends:
# doctrine:
# max_age: 86400 # max age in second
# pause: 500000 # delay in microseconds
# states: # raising errors level
# in_progress: 10
# error: 20
# open: 100
# done: 10000
# rabbitmq:
# exchange: router
# connection:
# host: localhost
# user: guest
# pass: guest
# port: 5672
# vhost: /
doctrine:
orm:
entity_managers:
default:
mappings:
SonataNotificationBundle: ~
ApplicationSonataNotificationBundle: ~

@ -0,0 +1,137 @@
#
# more information can be found here http://sonata-project.org/bundles/page
#
cmf_routing:
chain:
routers_by_id:
# enable the DynamicRouter with high priority to allow overwriting configured routes with content
#symfony_cmf_routing_extra.dynamic_router: 200
# enable the symfony default router with a lower priority
sonata.page.router: 150
router.default: 100
sonata_page:
multisite: host_with_path_by_locale # host
use_streamed_response: false # set the value to false in debug mode or if the reverse proxy does not handle streamed response
ignore_uri_patterns:
- ^/admin(.*)
- ^/api/(.*)
ignore_route_patterns:
- (.*)admin(.*) # ignore admin route, ie route containing 'admin'
- ^_(.*) # ignore symfony routes
- index
ignore_routes:
- sonata_page_cache_esi
- sonata_page_cache_ssi
- sonata_page_js_sync_cache
- sonata_page_js_async_cache
- sonata_cache_esi
- sonata_cache_ssi
- sonata_cache_js_async
- sonata_cache_js_sync
- sonata_cache_apc
cache_invalidation:
service: sonata.page.cache.invalidation.simple
recorder: sonata.page.cache.recorder
classes:
"Application\Sonata\PageBundle\Entity\Block": getId
assets:
stylesheets:
- assetic/sonata_front_css.css
javascripts:
- assetic/sonata_front_js.js
default_template: default
templates:
default:
path: 'ApplicationSonataPageBundle::default_layout.html.twig'
name: 'default'
containers:
header:
name: Header
content_top:
name: Top content
content:
name: Main content
content_bottom:
name: Bottom content
footer:
name: Footer
matrix:
layout: |
HHHHHHHH
TTTTTTTT
CCCCCCCC
BBBBBBBB
FFFFFFFF
mapping:
H: header
T: content_top
C: content
B: content_bottom
F: footer
2columns:
path: 'ApplicationSonataPageBundle::default_2columns_layout.html.twig'
name: '2 columns layout'
containers:
header:
name: Header
content_top:
name: Top content
left_col:
name: Left content
rigth_col:
name: Right content
content_bottom:
name: Bottom content
footer:
name: Footer
matrix:
layout: |
HHHHHHHH
TTTTTTTT
LLLLRRRR
BBBBBBBB
FFFFFFFF
mapping:
H: header
T: content_top
L: left_col
R: rigth_col
B: content_bottom
F: footer
page_defaults:
homepage: { decorate: false, enabled: true }
caches:
esi:
token: add an unique token here # default is a random value
version: 3 # version 3 is the default on debian wheezy ...
servers:
- %sonata_page.varnish.command% # you need to adapt this line to work with your configuration
ssi:
token: add an unique token here # default is a random value
catch_exceptions:
not_found: [404] # render 404 page with "not_found" key (name generated: _page_internal_error_{key})
fatal: [500] # so you can use the same page for different http errors or specify specific page for each error
# Enable Doctrine to map the provided entities
doctrine:
orm:
entity_managers:
default:
mappings:
ApplicationSonataPageBundle: ~
SonataPageBundle: ~

@ -0,0 +1,45 @@
#
# more information can be found here http://sonata-project.org/bundles/page
#
sonata_seo:
encoding: UTF-8
page:
default: sonata.seo.page.default
title: Sonata Project
metas:
name:
keywords: foo bar
description: The description
robots: index, follow
property:
# Facebook application settings
#'fb:app_id': XXXXXX
#'fb:admins': admin1, admin2
# Open Graph information
# see http://developers.facebook.com/docs/opengraphprotocol/#types or http://ogp.me/
'og:site_name': Sonata Project Sandbox
'og:description': A demo of the some rich bundles for your Symfony2 projects
http-equiv:
'Content-Type': text/html; charset=utf-8
#'X-Ua-Compatible': IE=EmulateIE7
head:
'xmlns': http://www.w3.org/1999/xhtml
sitemap:
services:
- sonata.product.seo_iterator
doctrine_orm:
# media
- { connection: doctrine.dbal.default_connection, route: sonata_media_view, parameters: {id: null}, query: "SELECT id, updated_at as lastmod, 'weekly' as changefreq, '0.5' as prioriy FROM media__media WHERE enabled = true" }
# blog post
- { connection: doctrine.dbal.default_connection, route: sonata_news_view, parameters: {permalink: null}, query: "SELECT CONCAT_WS('/', YEAR(created_at), MONTH(created_at), DAY(created_at), slug) as permalink , updated_at as lastmod, 'weekly' as changefreq, '0.5' as prioriy FROM news__post WHERE enabled = 1 AND (publication_date_start IS NULL OR publication_date_start <= NOW())" }
# page - works only for one site, please adapt the code if required
- { connection: doctrine.dbal.default_connection, route: page_slug, parameters: {path: null}, query: "SELECT url as path, updated_at as lastmod, 'weekly' as changefreq, '0.5' as prioriy FROM page__snapshot WHERE route_name = 'page_slug' AND enabled = 1 AND (publication_date_start IS NULL OR publication_date_start <= NOW())" }
# product categories
- { connection: doctrine.dbal.default_connection, route: sonata_catalog_category, parameters: {category_id: null, category_slug: null}, query: "SELECT id as category_id, slug as category_slug, updated_at as lastmod, 'weekly' as changefreq, '0.5' as prioriy FROM classification__category WHERE enabled = true" }
# products
- { connection: doctrine.dbal.default_connection, route: sonata_product_view, parameters: {productId: null, slug: null}, query: "SELECT id as productId, slug, updated_at as lastmod, 'weekly' as changefreq, '0.5' as prioriy FROM product__product WHERE enabled = true" }

@ -0,0 +1,21 @@
spy_timeline:
drivers:
orm:
object_manager: doctrine.orm.entity_manager
classes:
query_builder: ~ # Spy\TimelineBundle\Driver\ORM\QueryBuilder\QueryBuilder
timeline: Application\Sonata\TimelineBundle\Entity\Timeline
action: Application\Sonata\TimelineBundle\Entity\Action
component: Application\Sonata\TimelineBundle\Entity\Component
action_component: Application\Sonata\TimelineBundle\Entity\ActionComponent
filters:
data_hydrator:
priority: 20
service: spy_timeline.filter.data_hydrator
filter_unresolved: false
locators:
- spy_timeline.filter.data_hydrator.locator.doctrine_orm
sonata_timeline:
manager_type: orm

@ -0,0 +1,59 @@
# if you change the class configuration, please also alter the fos_user.yml file
doctrine:
orm:
entity_managers:
default:
mappings:
FOSUserBundle: ~
ApplicationSonataUserBundle: ~
SonataUserBundle: ~
sonata_user:
#admin:
#user:
#class: Application\Sonata\UserBundle\Admin\UserAdmin
class: # Entity Classes
user: Application\Sonata\UserBundle\Entity\User
group: Application\Sonata\UserBundle\Entity\Group
security_acl: false
table:
user_group: fos_user_user_group
impersonating:
route: page_slug
parameters: { path: / }
google_authenticator:
server: %sonata_user.google_authenticator.server%
enabled: true
manager_type: orm
profile:
dashboard:
blocks:
- { position: left, type: sonata.block.service.text, settings: { content: "<h2>Welcome!</h2> <p>This is a sample user profile dashboard, feel free to override it in the configuration! Want to make this text dynamic? For instance display the user's name? Create a dedicated block and edit the configuration!</p>"} }
- { position: left, type: sonata.order.block.recent_orders, settings: { title: Recent Orders, number: 5, mode: public }}
- { position: right, type: sonata.timeline.block.timeline, settings: { max_per_page: 15 }}
- { position: right, type: sonata.news.block.recent_posts, settings: { title: Recent Posts, number: 5, mode: public }}
- { position: right, type: sonata.news.block.recent_comments, settings: { title: Recent Comments, number: 5, mode: public }}
menu:
- { route: 'sonata_user_profile_show', label: 'sonata_profile_title', domain: 'SonataUserBundle'}
- { route: 'sonata_user_profile_edit', label: 'link_edit_profile', domain: 'SonataUserBundle'}
- { route: 'sonata_customer_addresses', label: 'link_list_addresses', domain: 'SonataCustomerBundle'}
- { route: 'sonata_order_index', label: 'order_list', domain: 'SonataOrderBundle'}
form:
type: sonata_user_profile
handler: sonata.user.profile.form.handler.default
name: sonata_user_profile_form
validation_groups:
- ProfileCustom
register:
form:
type: sonata_user_registration
handler: sonata.user.registration.form.handler.default
name: sonata_user_registration_form
validation_groups:
- ProfileCustom
Loading…
Cancel
Save