diff --git a/config/bundles.php b/config/bundles.php new file mode 100644 index 0000000000..f7dc5ba3e7 --- /dev/null +++ b/config/bundles.php @@ -0,0 +1,45 @@ + ['all' => true], + Doctrine\Bundle\DoctrineCacheBundle\DoctrineCacheBundle::class => ['all' => true], + Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true], + Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle::class => ['dev' => true, 'test' => true], + Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true], + Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle::class => ['all' => true], + Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true], + Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle::class => ['all' => true], + Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true], + WhiteOctober\PagerfantaBundle\WhiteOctoberPagerfantaBundle::class => ['all' => true], + Sonata\EasyExtendsBundle\SonataEasyExtendsBundle::class => ['all' => true], + Sonata\DatagridBundle\SonataDatagridBundle::class => ['all' => true], + Sonata\CoreBundle\SonataCoreBundle::class => ['all' => true], + Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true], + Sonata\BlockBundle\SonataBlockBundle::class => ['all' => true], + Knp\Bundle\MenuBundle\KnpMenuBundle::class => ['all' => true], + Sonata\AdminBundle\SonataAdminBundle::class => ['all' => true], + FOS\UserBundle\FOSUserBundle::class => ['all' => true], + Sonata\UserBundle\SonataUserBundle::class => ['all' => true], + Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true, 'test' => true], + Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true], + Symfony\Bundle\WebServerBundle\WebServerBundle::class => ['dev' => true], + Symfony\Cmf\Bundle\RoutingBundle\CmfRoutingBundle::class => ['all' => true], + Sonata\SeoBundle\SonataSeoBundle::class => ['all' => true], + Sonata\NotificationBundle\SonataNotificationBundle::class => ['all' => true], + Sonata\CacheBundle\SonataCacheBundle::class => ['all' => true], + Sonata\PageBundle\SonataPageBundle::class => ['all' => true], + Sonata\DoctrineORMAdminBundle\SonataDoctrineORMAdminBundle::class => ['all' => true], + Sonata\ClassificationBundle\SonataClassificationBundle::class => ['all' => true], + Spy\TimelineBundle\SpyTimelineBundle::class => ['all' => true], + Sonata\IntlBundle\SonataIntlBundle::class => ['all' => true], + Sonata\TimelineBundle\SonataTimelineBundle::class => ['all' => true], + Knp\Bundle\MarkdownBundle\KnpMarkdownBundle::class => ['all' => true], + Ivory\CKEditorBundle\IvoryCKEditorBundle::class => ['all' => true], + Sonata\FormatterBundle\SonataFormatterBundle::class => ['all' => true], + JMS\SerializerBundle\JMSSerializerBundle::class => ['all' => true], + Sonata\MediaBundle\SonataMediaBundle::class => ['all' => true], + FOS\JsRoutingBundle\FOSJsRoutingBundle::class => ['all' => true], + FM\ElfinderBundle\FMElfinderBundle::class => ['all' => true], + Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle::class => ['all' => true], + FOS\RestBundle\FOSRestBundle::class => ['all' => true], +]; diff --git a/config/packages/cmf_routing_bundle.yaml b/config/packages/cmf_routing_bundle.yaml new file mode 100644 index 0000000000..131825bcde --- /dev/null +++ b/config/packages/cmf_routing_bundle.yaml @@ -0,0 +1,11 @@ +# Read the documentation: https://symfony.com/doc/master/cmf/bundles/routing/configuration.html +# Install phpcr stack before using this configuration +#cmf_routing: +# chain: +# routers_by_id: +# cmf_routing.dynamic_router: 200 +# router.default: 100 +# dynamic: +# persistence: +# phpcr: +# enabled: true diff --git a/config/packages/dev/jms_serializer.yaml b/config/packages/dev/jms_serializer.yaml new file mode 100644 index 0000000000..353e460275 --- /dev/null +++ b/config/packages/dev/jms_serializer.yaml @@ -0,0 +1,7 @@ +jms_serializer: + visitors: + json: + options: + - JSON_PRETTY_PRINT + - JSON_UNESCAPED_SLASHES + - JSON_PRESERVE_ZERO_FRACTION diff --git a/config/packages/dev/monolog.yaml b/config/packages/dev/monolog.yaml new file mode 100644 index 0000000000..3662592880 --- /dev/null +++ b/config/packages/dev/monolog.yaml @@ -0,0 +1,19 @@ +monolog: + handlers: + main: + type: stream + path: "%kernel.logs_dir%/%kernel.environment%.log" + level: debug + channels: ["!event"] + # uncomment to get logging in your browser + # you may have to allow bigger header sizes in your Web server configuration + #firephp: + # type: firephp + # level: info + #chromephp: + # type: chromephp + # level: info + console: + type: console + process_psr_3_messages: false + channels: ["!event", "!doctrine", "!console"] diff --git a/config/packages/dev/routing.yaml b/config/packages/dev/routing.yaml new file mode 100644 index 0000000000..4116679a2e --- /dev/null +++ b/config/packages/dev/routing.yaml @@ -0,0 +1,3 @@ +framework: + router: + strict_requirements: true diff --git a/config/packages/dev/security_checker.yaml b/config/packages/dev/security_checker.yaml new file mode 100644 index 0000000000..544c0b33aa --- /dev/null +++ b/config/packages/dev/security_checker.yaml @@ -0,0 +1,8 @@ +services: + SensioLabs\Security\SecurityChecker: + public: false + + SensioLabs\Security\Command\SecurityCheckerCommand: + arguments: ['@SensioLabs\Security\SecurityChecker'] + tags: + - { name: console.command } diff --git a/config/packages/dev/swiftmailer.yaml b/config/packages/dev/swiftmailer.yaml new file mode 100644 index 0000000000..5c36456a82 --- /dev/null +++ b/config/packages/dev/swiftmailer.yaml @@ -0,0 +1,4 @@ +# See https://symfony.com/doc/current/email/dev_environment.html +swiftmailer: + # send all emails to a specific address + #delivery_addresses: ['me@example.com'] diff --git a/config/packages/dev/web_profiler.yaml b/config/packages/dev/web_profiler.yaml new file mode 100644 index 0000000000..e92166a7fd --- /dev/null +++ b/config/packages/dev/web_profiler.yaml @@ -0,0 +1,6 @@ +web_profiler: + toolbar: true + intercept_redirects: false + +framework: + profiler: { only_exceptions: false } diff --git a/config/packages/doctrine.yaml b/config/packages/doctrine.yaml new file mode 100644 index 0000000000..1d52976c22 --- /dev/null +++ b/config/packages/doctrine.yaml @@ -0,0 +1,51 @@ +parameters: + # Adds a fallback DATABASE_URL if the env var is not set. + # This allows you to run cache:warmup even if your + # environment variables are not available yet. + # You should not need to change this value. + env(DATABASE_URL): '' + +doctrine: + dbal: + # configure these for your database server + driver: 'pdo_mysql' + server_version: '5.7' + charset: utf8mb4 + + # With Symfony 3.3, remove the `resolve:` prefix + url: '%env(resolve:DATABASE_URL)%' + orm: + auto_generate_proxy_classes: '%kernel.debug%' + naming_strategy: doctrine.orm.naming_strategy.underscore + auto_mapping: true + mappings: + App: + is_bundle: false + type: annotation + dir: '%kernel.project_dir%/src/Entity' + prefix: 'App\Entity' + alias: App + gedmo_translatable: + type: annotation + prefix: Gedmo\Translatable\Entity + dir: "%kernel.root_dir%/../vendor/gedmo/doctrine-extensions/lib/Gedmo/Translatable/Entity" + alias: GedmoTranslatable # (optional) it will default to the name set for the mapping + is_bundle: false + gedmo_translator: + type: annotation + prefix: Gedmo\Translator\Entity + dir: "%kernel.root_dir%/../vendor/gedmo/doctrine-extensions/lib/Gedmo/Translator/Entity" + alias: GedmoTranslator # (optional) it will default to the name set for the mapping + is_bundle: false + gedmo_loggable: + type: annotation + prefix: Gedmo\Loggable\Entity + dir: "%kernel.root_dir%/../vendor/gedmo/doctrine-extensions/lib/Gedmo/Loggable/Entity" + alias: GedmoLoggable # (optional) it will default to the name set for the mappingmapping + is_bundle: false + gedmo_tree: + type: annotation + prefix: Gedmo\Tree\Entity + dir: "%kernel.root_dir%/../vendor/gedmo/doctrine-extensions/lib/Gedmo/Tree/Entity" + alias: GedmoTree # (optional) it will default to the name set for the mapping + is_bundle: false diff --git a/config/packages/doctrine_migrations.yaml b/config/packages/doctrine_migrations.yaml new file mode 100644 index 0000000000..3bf0fbcae9 --- /dev/null +++ b/config/packages/doctrine_migrations.yaml @@ -0,0 +1,5 @@ +doctrine_migrations: + dir_name: '%kernel.project_dir%/src/Migrations' + # namespace is arbitrary but should be different from App\Migrations + # as migrations classes should NOT be autoloaded + namespace: DoctrineMigrations diff --git a/config/packages/fm_elfinder.yaml b/config/packages/fm_elfinder.yaml new file mode 100644 index 0000000000..f7d5252e26 --- /dev/null +++ b/config/packages/fm_elfinder.yaml @@ -0,0 +1,31 @@ +fm_elfinder: + assets_path: /chamilo_master/public/assets + instances: + default: + locale: '%locale%' # defaults to current request locale + editor: ckeditor # other options are tinymce, tinymce4, form, custom and simple + fullscreen: true # defaults true, applies to simple and ckeditor editors + theme: smoothness # jquery theme + include_assets: true # disable if you want to handle loading of the javascript and css assets yourself + connector: + debug: false # defaults to false + roots: # at least one root must be defined +# uploads: +# show_hidden: false # defaults to false +# driver: LocalFileSystem +# path: uploads +# upload_allow: ['image/png', 'image/jpg', 'image/jpeg'] +# upload_deny: ['all'] +# upload_max_size: 2M + local: + driver: Flysystem + path: uploads + flysystem: + type: local + options: + local: + path: '%kernel.root_dir%/../public/uploads/media/' + upload_allow: ['all'] + #upload_allow: ['image/png', 'image/jpg', 'image/jpeg'] + #upload_deny: ['all'] + upload_max_size: 2M \ No newline at end of file diff --git a/config/packages/fos_rest.yaml b/config/packages/fos_rest.yaml new file mode 100644 index 0000000000..d8277cddcf --- /dev/null +++ b/config/packages/fos_rest.yaml @@ -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 \ No newline at end of file diff --git a/config/packages/fos_user.yaml b/config/packages/fos_user.yaml new file mode 100644 index 0000000000..cc97a95f33 --- /dev/null +++ b/config/packages/fos_user.yaml @@ -0,0 +1,17 @@ +fos_user: + db_driver: orm # can be orm or odm + firewall_name: secured_area + + # if you change the class configuration, please also alter the sonata_user.yml file + user_class: Chamilo\UserBundle\Entity\User + + group: + group_class: Chamilo\UserBundle\Entity\Group + group_manager: sonata.user.orm.group_manager + + service: + user_manager: sonata.user.orm.user_manager + + from_email: + address: 'test@example.com' + sender_name: 'test@example.com' \ No newline at end of file diff --git a/config/packages/framework.yaml b/config/packages/framework.yaml new file mode 100644 index 0000000000..0e32c855aa --- /dev/null +++ b/config/packages/framework.yaml @@ -0,0 +1,27 @@ +framework: + secret: '%env(APP_SECRET)%' + #default_locale: en + #csrf_protection: ~ + #http_method_override: true + + # uncomment this entire section to enable sessions + #session: + # # With this config, PHP's native session handling is used + # handler_id: ~ + + #esi: ~ + #fragments: ~ + php_errors: + log: true + + templating: + engines: ['twig', 'php'] + session: + # handler_id set to null will use default session handler from php.ini + handler_id: ~ + name: ch_sid + fragments: ~ + http_method_override: true + assets: ~ + annotations: true + translator: ~ diff --git a/config/packages/framework_extra.yaml b/config/packages/framework_extra.yaml new file mode 100644 index 0000000000..a37058c3af --- /dev/null +++ b/config/packages/framework_extra.yaml @@ -0,0 +1,2 @@ +framework: + annotations: true diff --git a/config/packages/ivory_ck_editor.yaml b/config/packages/ivory_ck_editor.yaml new file mode 100644 index 0000000000..5f5472dbb0 --- /dev/null +++ b/config/packages/ivory_ck_editor.yaml @@ -0,0 +1,9 @@ +ivory_ck_editor: + default_config: simple_toolbar + configs: + simple_toolbar: + toolbar: + - ['Bold', 'Italic', 'Strike', 'Link'] + - ['BulletedList', 'NumberedList', '-', 'Outdent', 'Indent'] + - ['Copy', 'Paste', 'PasteFromWord', '-', 'Undo', 'Redo'] + - ['Source'] diff --git a/config/packages/jms_serializer.yaml b/config/packages/jms_serializer.yaml new file mode 100644 index 0000000000..bab42dae47 --- /dev/null +++ b/config/packages/jms_serializer.yaml @@ -0,0 +1,13 @@ +jms_serializer: + visitors: + xml: + format_output: '%kernel.debug%' +# metadata: +# auto_detection: false +# directories: +# any-name: +# namespace_prefix: "My\\FooBundle" +# path: "@MyFooBundle/Resources/config/serializer" +# another-name: +# namespace_prefix: "My\\BarBundle" +# path: "@MyBarBundle/Resources/config/serializer" diff --git a/config/packages/prod/doctrine.yaml b/config/packages/prod/doctrine.yaml new file mode 100644 index 0000000000..2f16f0fdea --- /dev/null +++ b/config/packages/prod/doctrine.yaml @@ -0,0 +1,31 @@ +doctrine: + orm: + metadata_cache_driver: + type: service + id: doctrine.system_cache_provider + query_cache_driver: + type: service + id: doctrine.system_cache_provider + result_cache_driver: + type: service + id: doctrine.result_cache_provider + +services: + doctrine.result_cache_provider: + class: Symfony\Component\Cache\DoctrineProvider + public: false + arguments: + - '@doctrine.result_cache_pool' + doctrine.system_cache_provider: + class: Symfony\Component\Cache\DoctrineProvider + public: false + arguments: + - '@doctrine.system_cache_pool' + +framework: + cache: + pools: + doctrine.result_cache_pool: + adapter: cache.app + doctrine.system_cache_pool: + adapter: cache.system diff --git a/config/packages/prod/jms_serializer.yaml b/config/packages/prod/jms_serializer.yaml new file mode 100644 index 0000000000..bc97faf1f6 --- /dev/null +++ b/config/packages/prod/jms_serializer.yaml @@ -0,0 +1,6 @@ +jms_serializer: + visitors: + json: + options: + - JSON_UNESCAPED_SLASHES + - JSON_PRESERVE_ZERO_FRACTION diff --git a/config/packages/prod/monolog.yaml b/config/packages/prod/monolog.yaml new file mode 100644 index 0000000000..90e1a4c19b --- /dev/null +++ b/config/packages/prod/monolog.yaml @@ -0,0 +1,17 @@ +monolog: + handlers: + main: + type: fingers_crossed + action_level: error + handler: nested + excluded_404s: + # regex: exclude all 404 errors from the logs + - ^/ + nested: + type: stream + path: "%kernel.logs_dir%/%kernel.environment%.log" + level: debug + console: + type: console + process_psr_3_messages: false + channels: ["!event", "!doctrine"] diff --git a/config/packages/routing.yaml b/config/packages/routing.yaml new file mode 100644 index 0000000000..368bc7f491 --- /dev/null +++ b/config/packages/routing.yaml @@ -0,0 +1,3 @@ +framework: + router: + strict_requirements: ~ diff --git a/config/packages/security.yaml b/config/packages/security.yaml new file mode 100644 index 0000000000..671b84b2e7 --- /dev/null +++ b/config/packages/security.yaml @@ -0,0 +1,85 @@ +# To get started with security, check out the documentation: +# http://symfony.com/doc/current/book/security.html +security: + access_control: + - { path: ^/administrator, role: ROLE_ADMIN } + - { path: ^/efconnect, role: ROLE_USER } + - { path: ^/elfinder, role: ROLE_USER } + + encoders: + FOS\UserBundle\Model\UserInterface: + id: chamilo_user.security.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_CURRENT_COURSE_TEACHER + - SONATA + ROLE_SUPER_ADMIN: [ROLE_SONATA_ADMIN, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH] + ROLE_GLOBAL_ADMIN: [ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH] + ROLE_RRHH: [ROLE_TEACHER] + ROLE_TEACHER: [ROLE_STUDENT] + ROLE_QUESTION_MANAGER: [ROLE_STUDENT, ROLE_QUESTION_MANAGER] + ROLE_SESSION_MANAGER: [ROLE_STUDENT, ROLE_SESSION_MANAGER, ROLE_ALLOWED_TO_SWITCH] + ROLE_STUDENT: [ROLE_STUDENT] + ROLE_CURRENT_TEACHER: [] + ROLE_CURRENT_COURSE_STUDENT: [ROLE_CURRENT_COURSE_STUDENT] + ROLE_CURRENT_COURSE_TEACHER: [ROLE_CURRENT_COURSE_TEACHER, ROLE_CURRENT_COURSE_STUDENT] + + 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 + + ROLE_ANONYMOUS: [ROLE_ANONYMOUS] + + access_decision_manager: + # strategy can be: affirmative, unanimous or consensus + strategy: unanimous + + # http://symfony.com/doc/current/book/security.html#where-do-users-come-from-user-providers + providers: + fos_userbundle: + id: fos_user.user_provider.username + + firewalls: + # disables authentication for assets and the profiler, adapt it according to your needs + dev: + pattern: ^/(_(profiler|wdt)|css|images|js)/ + security: false + admin: + pattern: .* + context: user + form_login: + provider: fos_userbundle + csrf_token_generator: security.csrf.token_manager + login_path: /administration/login + use_forward: false + check_path: /administration/login_check + success_handler: chamilo_core.listener.login_success_handler + failure_path: null + remember_me: + secret: '%secret%' + lifetime: 604800 # 1 week in seconds + path: / + logout: + path: /administration/logout + target: / + anonymous: true + + oauth: + resource_owners: + facebook: "/administration/login/check-facebook" + google: "/administration/login/check-google" + github: "/administration/login/check-github" + login_path: /administration/login + check_path: /administration/login_check + failure_path: /administration/connect + use_forward: false + oauth_user_provider: + service: chamilo_user_provider diff --git a/config/packages/sonata_admin.yaml b/config/packages/sonata_admin.yaml new file mode 100644 index 0000000000..886c3beaaf --- /dev/null +++ b/config/packages/sonata_admin.yaml @@ -0,0 +1,210 @@ +sonata_notification: + class: + message: Chamilo\NotificationBundle\Entity\Message +sonata_admin: + # default value, change it to sonata.admin.security.handler.acl to use ACL + security: + handler: sonata.admin.security.handler.role + title: Chamilo #%sonata_admin.title% + title_logo: css/themes/chamilo/images/header-logo.png #%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. + layout: ChamiloAdminBundle::layout.html.twig +# layout: ApplicationSonataAdminBundle::standard_layout.html.twig + #layout: ApplicationSonataAdminBundle::demo_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 +# user_block: ChamiloCoreBundle:Admin:admin_topnav.html.twig + + extensions: +# cmf_core.admin_extension.translatable: +# implements: +# - Symfony\Cmf\Bundle\CoreBundle\Translatable\TranslatableInterface +# +# cmf_core.admin_extension.publish_workflow.publishable: +# implements: +# - Symfony\Cmf\Bundle\CoreBundle\PublishWorkflow\PublishableInterface +# cmf_core.admin_extension.publish_workflow.time_period: +# implements: +# - Symfony\Cmf\Bundle\CoreBundle\PublishWorkflow\PublishTimePeriodInterface + + dashboard: + blocks: + - { position: left, type: sonata.admin.block.admin_list } +# - { position: right, type: sonata.timeline.block.timeline, settings: { context: SONATA_ADMIN, max_per_page: 25, template: 'ChamiloTimelineBundle:Block:timeline.html.twig',}} +# - { position: right, type: sonata.admin_doctrine_orm.block.audit} + +# - { position: center, type: sonata.block.service.text, settings: { content: "
sonata_admin.yml file. The current dashboard presents the recent items from the NewsBundle and a non-statistical e-commerce information.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!
"} } +# +# menu: +# - { route: 'sonata_user_profile_show', label: 'sonata_profile_title', domain: 'SonataUserBundle'} +# - { route: 'sonata_user_profile_edit', label: 'link_edit_profile', domain: 'SonataUserBundle'} +# +# form: +# type: sonata_user_registration +# handler: sonata.user.profile.form.handler.default +# name: sonata_user_registration_form +# validation_groups: +# - Profile + +# register: +# form: +# type: chamilo_sonata_user_registration +# handler: sonata.user.registration.form.handler.default +# name: chamilo_sonata_user_registration +# validation_groups: +# - Registration +# - Default diff --git a/config/packages/spy_timeline.yaml b/config/packages/spy_timeline.yaml new file mode 100644 index 0000000000..0ca4af5c57 --- /dev/null +++ b/config/packages/spy_timeline.yaml @@ -0,0 +1,19 @@ +spy_timeline: + drivers: + orm: + object_manager: doctrine.orm.entity_manager + classes: + query_builder: ~ # Spy\TimelineBundle\Driver\ORM\QueryBuilder\QueryBuilder + timeline: Chamilo\TimelineBundle\Entity\Timeline + action: Chamilo\TimelineBundle\Entity\Action + component: Chamilo\TimelineBundle\Entity\Component + action_component: Chamilo\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 + diff --git a/config/packages/stof_doctrine_extensions.yaml b/config/packages/stof_doctrine_extensions.yaml new file mode 100644 index 0000000000..f0c8ae6e8e --- /dev/null +++ b/config/packages/stof_doctrine_extensions.yaml @@ -0,0 +1,9 @@ +stof_doctrine_extensions: + default_locale: "%locale%" + translation_fallback: true + orm: + default: + tree: true + timestampable: true + sluggable: true + sortable: true \ No newline at end of file diff --git a/config/packages/swiftmailer.yaml b/config/packages/swiftmailer.yaml new file mode 100644 index 0000000000..cae65084a2 --- /dev/null +++ b/config/packages/swiftmailer.yaml @@ -0,0 +1,3 @@ +swiftmailer: + url: '%env(MAILER_URL)%' + spool: { type: 'memory' } diff --git a/config/packages/test/framework.yaml b/config/packages/test/framework.yaml new file mode 100644 index 0000000000..8aa270e9bf --- /dev/null +++ b/config/packages/test/framework.yaml @@ -0,0 +1,5 @@ +framework: + test: ~ + # Uncomment this section if you're using sessions + #session: + # storage_id: session.storage.mock_file diff --git a/config/packages/test/monolog.yaml b/config/packages/test/monolog.yaml new file mode 100644 index 0000000000..2762653c82 --- /dev/null +++ b/config/packages/test/monolog.yaml @@ -0,0 +1,7 @@ +monolog: + handlers: + main: + type: stream + path: "%kernel.logs_dir%/%kernel.environment%.log" + level: debug + channels: ["!event"] diff --git a/config/packages/test/swiftmailer.yaml b/config/packages/test/swiftmailer.yaml new file mode 100644 index 0000000000..f43807805e --- /dev/null +++ b/config/packages/test/swiftmailer.yaml @@ -0,0 +1,2 @@ +swiftmailer: + disable_delivery: true diff --git a/config/packages/test/web_profiler.yaml b/config/packages/test/web_profiler.yaml new file mode 100644 index 0000000000..03752de213 --- /dev/null +++ b/config/packages/test/web_profiler.yaml @@ -0,0 +1,6 @@ +web_profiler: + toolbar: false + intercept_redirects: false + +framework: + profiler: { collect: false } diff --git a/config/packages/translation.yaml b/config/packages/translation.yaml new file mode 100644 index 0000000000..1edfbe2368 --- /dev/null +++ b/config/packages/translation.yaml @@ -0,0 +1,7 @@ +framework: + default_locale: '%locale%' + translator: + paths: + - '%kernel.project_dir%/translations' + fallbacks: + - '%locale%' diff --git a/config/packages/twig.yaml b/config/packages/twig.yaml new file mode 100644 index 0000000000..6e438ef068 --- /dev/null +++ b/config/packages/twig.yaml @@ -0,0 +1,28 @@ +twig: + paths: ['%kernel.project_dir%/templates'] + debug: '%kernel.debug%' + strict_variables: '%kernel.debug%' + exception_controller: 'FOS\RestBundle\Controller\ExceptionController::showAction' + globals: + show_toolbar: true + show_footer: true + software_name: Chamilo + version: 2 + session_teachers: + teachers: + news_counter: + news_list: + messages_count: + message_link: + is_profile_editable: + administrator_name: + execution_stats: + course_session_block: + show_course_shortcut: + show_course_navigation_menu: + actions: + header: + message: + show_media_element: 1 + plugin_header_main: + diff --git a/config/packages/twig_extensions.yaml b/config/packages/twig_extensions.yaml new file mode 100644 index 0000000000..417b7bc317 --- /dev/null +++ b/config/packages/twig_extensions.yaml @@ -0,0 +1,10 @@ +services: + _defaults: + public: false + autowire: true + autoconfigure: true + + #Twig\Extensions\ArrayExtension: ~ + #Twig\Extensions\DateExtension: ~ + #Twig\Extensions\IntlExtension: ~ + #Twig\Extensions\TextExtension: ~ diff --git a/config/packages/web_profiler.yaml b/config/packages/web_profiler.yaml new file mode 100644 index 0000000000..83ec54d6de --- /dev/null +++ b/config/packages/web_profiler.yaml @@ -0,0 +1,3 @@ +web_profiler: + toolbar: true + intercept_redirects: false \ No newline at end of file diff --git a/config/routes.yaml b/config/routes.yaml new file mode 100644 index 0000000000..c3283aa2e3 --- /dev/null +++ b/config/routes.yaml @@ -0,0 +1,3 @@ +#index: +# path: / +# controller: App\Controller\DefaultController::index diff --git a/config/routes/annotations.yaml b/config/routes/annotations.yaml new file mode 100644 index 0000000000..d49a502a84 --- /dev/null +++ b/config/routes/annotations.yaml @@ -0,0 +1,3 @@ +controllers: + resource: ../../src/Controller/ + type: annotation diff --git a/config/routes/dev/twig.yaml b/config/routes/dev/twig.yaml new file mode 100644 index 0000000000..f4ee83960b --- /dev/null +++ b/config/routes/dev/twig.yaml @@ -0,0 +1,3 @@ +_errors: + resource: '@TwigBundle/Resources/config/routing/errors.xml' + prefix: /_error diff --git a/config/routes/dev/web_profiler.yaml b/config/routes/dev/web_profiler.yaml new file mode 100644 index 0000000000..c82beff2f6 --- /dev/null +++ b/config/routes/dev/web_profiler.yaml @@ -0,0 +1,7 @@ +web_profiler_wdt: + resource: '@WebProfilerBundle/Resources/config/routing/wdt.xml' + prefix: /_wdt + +web_profiler_profiler: + resource: '@WebProfilerBundle/Resources/config/routing/profiler.xml' + prefix: /_profiler diff --git a/config/routes/fos_js_routing.yaml b/config/routes/fos_js_routing.yaml new file mode 100644 index 0000000000..c699b65f79 --- /dev/null +++ b/config/routes/fos_js_routing.yaml @@ -0,0 +1,2 @@ +fos_js_routing: + resource: "@FOSJsRoutingBundle/Resources/config/routing/routing.xml" diff --git a/config/services.yaml b/config/services.yaml new file mode 100644 index 0000000000..fb4bfa6977 --- /dev/null +++ b/config/services.yaml @@ -0,0 +1,40 @@ +# Put parameters here that don't need to change on each machine where the app is deployed +# https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration +parameters: + locale: 'en' + twig: + form: + resources: + - 'GeneratorBundle::fields.html.twig' + + mailer_transport: smtp + mailer_host: 127.0.0.1 + mailer_user: admin@example.com + mailer_password: null + url_append: '' + course_info_is_not_editable: false + sonata_media.cdn.host: /uploads/media + +services: + # default configuration for services in *this* file + _defaults: + autowire: true # Automatically injects dependencies in your services. + autoconfigure: true # Automatically registers your services as commands, event subscribers, etc. + public: false # Allows optimizing the container by removing unused services; this also means + # fetching services directly from the container via $container->get() won't work. + # The best practice is to be explicit about your dependencies anyway. + + # makes classes in src/ available to be used as services + # this creates a service per class whose id is the fully-qualified class name + Chamilo\: + resource: '../src/*' + exclude: '../src/{Entity,Migrations,Tests}' + + # controllers are imported separately to make sure services can be injected + # as action arguments even if you don't extend any base controller class +# App\Controller\: +# resource: '../src/Controller' +# tags: ['controller.service_arguments'] + + # add more service definitions when explicit configuration is needed + # please note that last definitions always *replace* previous ones diff --git a/config/services_test.yaml b/config/services_test.yaml new file mode 100644 index 0000000000..876c36bda1 --- /dev/null +++ b/config/services_test.yaml @@ -0,0 +1,9 @@ +services: + _defaults: + public: true + + # If you need to access services in a test, create an alias + # and then fetch that alias from the container. As a convention, + # aliases are prefixed with test. For example: + # + # test.App\Service\MyService: '@App\Service\MyService'