├── src ├── .gitkeep ├── Entity │ └── .gitignore ├── Controller │ └── .gitignore ├── Migrations │ └── .gitignore ├── Repository │ └── .gitignore ├── MigrationVersions │ ├── References │ │ └── .keep │ ├── content_type_group.yaml │ ├── user-policy_mysql.sql │ ├── languages.yaml │ └── maison.yaml ├── Resources │ ├── translations │ │ └── forms.en.yml │ └── schema │ │ └── demo.yaml ├── .htaccess ├── CacheKernel.php ├── Layout │ ├── LayoutRendererInterface.php │ ├── JSRenderer.php │ ├── CSSRenderer.php │ ├── AbstractRenderer.php │ └── LogoRenderer.php ├── PHPUnit │ └── BypassFinalHook.php ├── Pagerfanta │ └── MaisonTemplate.php ├── Twig │ ├── AppLayoutExtension.php │ └── SearchResultExtractorExtension.php ├── Form │ └── Type │ │ └── ContactType.php ├── DependencyInjection │ └── Compiler │ │ └── MigrationParameterPass.php ├── Event │ └── Subscriber │ │ └── BuildDemoSchemaSubscriber.php ├── Helper │ └── ContentHelper.php ├── PremiumContent │ └── HtmlRenderer.php ├── Model │ └── Contact.php ├── QueryType │ ├── ChildrenQueryType.php │ ├── MenuQueryType.php │ └── ContentSiblingQueryType.php ├── Kernel.php └── Mail │ └── Sender.php ├── tests ├── .gitignore ├── fixtures │ ├── testRenderElementsResult_1.xml │ ├── testRenderElementsResult_2.xml │ ├── testRenderElementsResult_3.xml │ ├── testRenderElementsResult_4.xml │ ├── testRenderElementsResult_5.xml │ ├── testRenderElementsResult_6.xml │ ├── testRenderElementsResult_7.xml │ └── testRenderElementsInput.xml ├── bootstrap.php ├── App │ ├── Behat │ │ └── PlatformDemoEnvironmentConstants.php │ ├── PremiumContent │ │ └── HtmlRendererTest.php │ └── Twig │ │ └── PremiumContentExtensionTest.php └── Behat │ └── DemoContext.php ├── var ├── log │ └── .gitkeep ├── encore │ └── .gitkeep └── sessions │ └── .gitkeep ├── translations ├── .gitignore └── messages.en.yml ├── public ├── assets │ ├── build │ │ └── .gitkeep │ ├── ezplatform │ │ └── build │ │ │ └── .gitkeep │ ├── images │ │ ├── map.png │ │ ├── armchair.jpg │ │ ├── living-room-1.jpg │ │ ├── living-room-2.jpg │ │ ├── logo │ │ │ ├── maison-logo.png │ │ │ └── maison-professionals.png │ │ ├── store-col-img1.png │ │ ├── store-col-img2.png │ │ ├── inspiration-banner.jpg │ │ └── maison-logo.svg │ └── icons │ │ ├── email.svg │ │ └── phone.svg └── index.php ├── config ├── graphql │ └── types │ │ └── .gitignore ├── packages │ ├── behat │ │ ├── framework.yaml │ │ ├── monolog.yaml │ │ └── ezplatform.yaml │ ├── test │ │ ├── twig.yaml │ │ ├── swiftmailer.yaml │ │ ├── webpack_encore.yaml │ │ ├── routing.yaml │ │ ├── validator.yaml │ │ ├── framework.yaml │ │ ├── web_profiler.yaml │ │ └── monolog.yaml │ ├── dev │ │ ├── routing.yaml │ │ ├── swiftmailer.yaml │ │ ├── debug.yaml │ │ ├── web_profiler.yaml │ │ ├── easy_log_handler.yaml │ │ └── monolog.yaml │ ├── prod │ │ ├── routing.yaml │ │ ├── webpack_encore.yaml │ │ ├── monolog.yaml │ │ └── doctrine.yaml │ ├── validator.yaml │ ├── routing.yaml │ ├── sensio_framework_extra.yaml │ ├── swiftmailer.yaml │ ├── twig.yaml │ ├── jms_translation.yaml │ ├── assets.yaml │ ├── translation.yaml │ ├── security_checker.yaml │ ├── field_templates.yml │ ├── doctrine_migrations.yaml │ ├── graphql.yaml │ ├── liip_imagine.yaml │ ├── ezplatform_assets.yaml │ ├── nelmio_cors.yaml │ ├── twig_extensions.yaml │ ├── oneup_flysystem.yaml │ ├── ezplatform_doctrine_schema.yaml │ ├── framework.yaml │ ├── ezplatform_solr.yaml │ ├── webpack_encore.yaml │ ├── cache.yaml │ ├── doctrine.yaml │ ├── image_variations.yml │ ├── cache_pool │ │ ├── cache.tagaware.filesystem.yaml │ │ ├── cache.memcached.yaml │ │ └── cache.redis.yaml │ ├── dfs │ │ └── dfs.yaml │ ├── ezplatform_http_cache.yaml │ ├── buzz.yaml │ ├── ezplatform_admin_ui.yaml │ └── security.yaml ├── routes.yaml ├── routes │ ├── annotations.yaml │ ├── liip_imagine.yaml │ ├── ezplatform_user.yaml │ ├── behat │ │ └── ezplatform_behat.yaml │ ├── dev │ │ ├── graphiql.yaml │ │ └── web_profiler.yaml │ ├── fos_js_routing.yaml │ ├── js_translation.yaml │ ├── ezplatform_content_forms.yaml │ ├── ezplatform_http_cache.yaml │ ├── ezplatform_query_field_type.yaml │ ├── graphql.yaml │ ├── ezplatform_rest.yaml │ ├── ezplatform.yaml │ └── ezplatform_admin_ui.yaml ├── services │ ├── content.yaml │ ├── events.yaml │ ├── helpers.yaml │ ├── mailer.yaml │ ├── pagerfanta.yaml │ ├── query_types.yaml │ ├── migration.yaml │ ├── layout.yaml │ ├── installer.yaml │ ├── twig.yaml │ └── controllers.yaml ├── services_test.yaml ├── bootstrap.php └── services.yaml ├── assets ├── scss │ ├── _fonts.scss │ ├── professionals │ │ └── professionals.scss │ ├── _ez-fields.scss │ ├── _variables.scss │ ├── maison │ │ ├── _footer.scss │ │ ├── maison.scss │ │ ├── _section.scss │ │ ├── _article.scss │ │ ├── _forms.scss │ │ ├── _banner.scss │ │ ├── _navigation.scss │ │ └── _pagination.scss │ ├── _functions.scss │ ├── _images.scss │ ├── _default.scss │ ├── demo.scss │ ├── _colors.scss │ ├── _buttons.scss │ └── _custom.scss └── js │ └── carouselMenu.js ├── doc ├── nginx │ └── ez_params.d │ │ ├── ez_rewrite_dfsimage_params │ │ ├── ez_rewrite_image_params │ │ ├── ez_server_params │ │ ├── ez_prod_rewrite_params │ │ ├── ez_fastcgi_params │ │ └── ez_rewrite_params ├── docker │ ├── Dockerfile-dbdump │ ├── entrypoint │ │ ├── mysql │ │ │ └── 0_database_character_set.sh │ │ └── varnish │ │ │ └── parameters.vcl │ ├── Dockerfile-vardir │ ├── create-dataset.yml │ ├── dfs.yml │ ├── chromium.yml │ ├── blackfire.yml │ ├── redis.yml │ ├── demo.yml │ ├── install-dependencies.yml │ ├── install-database.yml │ ├── multihost.yml │ ├── redis-session.yml │ ├── db-stack.yml │ ├── selenium.yml │ ├── solr.yml │ ├── Dockerfile-distribution │ ├── varnish.yml │ ├── Dockerfile-solr │ ├── install_script.sh │ ├── base-dev.yml │ ├── import-dataset.yml │ ├── Dockerfile-nginx │ ├── base-prod.yml │ ├── my-ez-app-stack.yml │ ├── install.yml │ └── Dockerfile-varnish ├── varnish │ └── varnish.md ├── platformsh │ └── README.md └── i18n │ ├── install_translation_package.md │ ├── translation_workflow.md │ ├── distribute_translations.md │ ├── handle_translation_in_contribution.md │ └── integrate_new_string_to_translate.md ├── bin ├── .travis │ ├── trigger_regression_build.sh │ ├── disable_xdebug.sh │ ├── run_rest_tests.sh │ ├── configure_mysql.sh │ ├── parameters.yml │ ├── router_behat.php │ ├── runcommand.sh │ ├── composer-auth.json │ ├── prepare_selenium2.sh │ ├── apache2 │ │ └── php5-fcgi │ ├── get_behat_features.sh │ ├── prepare_system.sh │ ├── configure_apache2.sh │ ├── setup_from_external_repo.sh │ ├── trusty │ │ └── update_docker.sh │ └── rsa_allure ├── platformsh_prestart_cacheclear.sh ├── .ci │ └── prepare_archive.sh └── console ├── package.json ├── templates ├── themes │ ├── standard │ │ ├── layout │ │ │ └── logo.html.twig │ │ └── pagination │ │ │ └── default.html.twig │ ├── maison │ │ ├── pagelayout.html.twig │ │ ├── full │ │ │ ├── home.html.twig │ │ │ ├── inspiration_list.html.twig │ │ │ └── inspiration.html.twig │ │ ├── parts │ │ │ └── store_work_hours.html.twig │ │ ├── card │ │ │ ├── inspiration.html.twig │ │ │ └── store.html.twig │ │ ├── pagination │ │ │ └── content_pagination.html.twig │ │ └── layout │ │ │ └── footer.html.twig │ ├── professionals │ │ ├── pagelayout.html.twig │ │ ├── full │ │ │ └── home.html.twig │ │ └── layout │ │ │ ├── footer.html.twig │ │ │ └── header.html.twig │ └── admin │ │ └── fields │ │ └── eztags_field.html.twig └── base.html.twig ├── .platform └── routes.yaml ├── ez.webpack.custom.configs.js ├── UPGRADE.md ├── COPYRIGHT ├── webpack.config.js ├── .dockerignore ├── .php_cs ├── ez.webpack.config.js ├── upgrade └── db │ ├── mysql │ └── ezplatform-2.5.latest-to-3.0.0.sql │ └── postgresql │ └── ezplatform-2.5.latest-to-3.0.0.sql ├── ez.webpack.config.manager.js ├── RUNNING_BEHAT.md └── behat.yml.dist /src/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /var/log/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/Entity/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /translations/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /var/encore/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /var/sessions/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/build/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/Controller/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/Migrations/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/Repository/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /config/graphql/types/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/MigrationVersions/References/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/ezplatform/build/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/scss/_fonts.scss: -------------------------------------------------------------------------------- 1 | $fira-sans: "Fira Sans"; 2 | -------------------------------------------------------------------------------- /src/Resources/translations/forms.en.yml: -------------------------------------------------------------------------------- 1 | 'Tags': 'Tags' 2 | -------------------------------------------------------------------------------- /assets/scss/professionals/professionals.scss: -------------------------------------------------------------------------------- 1 | @import "../demo.scss"; 2 | -------------------------------------------------------------------------------- /config/packages/behat/framework.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | test: true 3 | -------------------------------------------------------------------------------- /config/packages/test/twig.yaml: -------------------------------------------------------------------------------- 1 | twig: 2 | strict_variables: true 3 | -------------------------------------------------------------------------------- /assets/scss/_ez-fields.scss: -------------------------------------------------------------------------------- 1 | .ezcountry-field { 2 | margin-bottom: 0; 3 | } 4 | -------------------------------------------------------------------------------- /config/packages/test/swiftmailer.yaml: -------------------------------------------------------------------------------- 1 | swiftmailer: 2 | disable_delivery: true 3 | -------------------------------------------------------------------------------- /config/packages/test/webpack_encore.yaml: -------------------------------------------------------------------------------- 1 | #webpack_encore: 2 | # strict_mode: false 3 | -------------------------------------------------------------------------------- /config/packages/dev/routing.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | router: 3 | strict_requirements: true 4 | -------------------------------------------------------------------------------- /config/packages/prod/routing.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | router: 3 | strict_requirements: null 4 | -------------------------------------------------------------------------------- /config/packages/test/routing.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | router: 3 | strict_requirements: true 4 | -------------------------------------------------------------------------------- /config/packages/validator.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | validation: 3 | email_validation_mode: html5 4 | -------------------------------------------------------------------------------- /config/routes.yaml: -------------------------------------------------------------------------------- 1 | #index: 2 | # path: / 3 | # controller: App\Controller\DefaultController::index 4 | -------------------------------------------------------------------------------- /config/routes/annotations.yaml: -------------------------------------------------------------------------------- 1 | controllers: 2 | resource: ../../src/Controller/ 3 | type: annotation 4 | -------------------------------------------------------------------------------- /config/packages/routing.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | router: 3 | strict_requirements: ~ 4 | utf8: true 5 | -------------------------------------------------------------------------------- /config/packages/sensio_framework_extra.yaml: -------------------------------------------------------------------------------- 1 | sensio_framework_extra: 2 | router: 3 | annotations: false 4 | -------------------------------------------------------------------------------- /config/packages/swiftmailer.yaml: -------------------------------------------------------------------------------- 1 | swiftmailer: 2 | url: '%env(MAILER_URL)%' 3 | spool: { type: 'memory' } 4 | -------------------------------------------------------------------------------- /config/packages/test/validator.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | validation: 3 | not_compromised_password: false 4 | -------------------------------------------------------------------------------- /public/assets/images/map.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ezsystems/ezplatform-demo/HEAD/public/assets/images/map.png -------------------------------------------------------------------------------- /config/routes/liip_imagine.yaml: -------------------------------------------------------------------------------- 1 | _liip_imagine: 2 | resource: "@LiipImagineBundle/Resources/config/routing.yaml" 3 | -------------------------------------------------------------------------------- /config/routes/ezplatform_user.yaml: -------------------------------------------------------------------------------- 1 | ezplatform_user: 2 | resource: '@EzPlatformUserBundle/Resources/config/routing.yaml' 3 | -------------------------------------------------------------------------------- /public/assets/images/armchair.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ezsystems/ezplatform-demo/HEAD/public/assets/images/armchair.jpg -------------------------------------------------------------------------------- /tests/fixtures/testRenderElementsResult_1.xml: -------------------------------------------------------------------------------- 1 |
2 |

Element 1 - Paragraph 1

3 | -------------------------------------------------------------------------------- /config/routes/behat/ezplatform_behat.yaml: -------------------------------------------------------------------------------- 1 | _ezplatform_behat: 2 | resource: '@eZBehatBundle/Resources/config/routing.yaml' 3 | -------------------------------------------------------------------------------- /doc/nginx/ez_params.d/ez_rewrite_dfsimage_params: -------------------------------------------------------------------------------- 1 | rewrite "^/var/([^/]+/)?storage/images(-versioned)?/(.*)" "/index.php" break; 2 | -------------------------------------------------------------------------------- /bin/.travis/trigger_regression_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | APP_ENV=behat ./vendor/ezsystems/behatbundle/bin/.travis/trigger_ci.sh 4 | -------------------------------------------------------------------------------- /config/packages/test/framework.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | test: true 3 | session: 4 | storage_id: session.storage.mock_file 5 | -------------------------------------------------------------------------------- /config/routes/dev/graphiql.yaml: -------------------------------------------------------------------------------- 1 | overblog_graphql_graphiql: 2 | resource: "@OverblogGraphiQLBundle/Resources/config/routing.xml" 3 | -------------------------------------------------------------------------------- /config/routes/fos_js_routing.yaml: -------------------------------------------------------------------------------- 1 | fos_js_routing: 2 | resource: "@FOSJsRoutingBundle/Resources/config/routing/routing-sf4.xml" 3 | -------------------------------------------------------------------------------- /public/assets/images/living-room-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ezsystems/ezplatform-demo/HEAD/public/assets/images/living-room-1.jpg -------------------------------------------------------------------------------- /public/assets/images/living-room-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ezsystems/ezplatform-demo/HEAD/public/assets/images/living-room-2.jpg -------------------------------------------------------------------------------- /doc/nginx/ez_params.d/ez_rewrite_image_params: -------------------------------------------------------------------------------- 1 | rewrite "^/var/([^/]+/)?storage/images(-versioned)?/(.*)" "/var/$1storage/images$2/$3" break; 2 | -------------------------------------------------------------------------------- /public/assets/images/logo/maison-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ezsystems/ezplatform-demo/HEAD/public/assets/images/logo/maison-logo.png -------------------------------------------------------------------------------- /public/assets/images/store-col-img1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ezsystems/ezplatform-demo/HEAD/public/assets/images/store-col-img1.png -------------------------------------------------------------------------------- /public/assets/images/store-col-img2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ezsystems/ezplatform-demo/HEAD/public/assets/images/store-col-img2.png -------------------------------------------------------------------------------- /config/routes/js_translation.yaml: -------------------------------------------------------------------------------- 1 | bazinga_js_translation: 2 | resource: "@BazingaJsTranslationBundle/Resources/config/routing/routing.yml" 3 | -------------------------------------------------------------------------------- /public/assets/images/inspiration-banner.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ezsystems/ezplatform-demo/HEAD/public/assets/images/inspiration-banner.jpg -------------------------------------------------------------------------------- /config/routes/ezplatform_content_forms.yaml: -------------------------------------------------------------------------------- 1 | ezplatform_content_forms: 2 | resource: '@EzPlatformContentFormsBundle/Resources/config/routing.yaml' 3 | -------------------------------------------------------------------------------- /config/routes/ezplatform_http_cache.yaml: -------------------------------------------------------------------------------- 1 | ezplatform_http_cache: 2 | resource: '@EzSystemsPlatformHttpCacheBundle/Resources/config/routing.yml' 3 | -------------------------------------------------------------------------------- /doc/nginx/ez_params.d/ez_server_params: -------------------------------------------------------------------------------- 1 | 2 | disable_symlinks off; 3 | 4 | location = /favicon.ico { 5 | log_not_found off; 6 | access_log off; 7 | } 8 | -------------------------------------------------------------------------------- /public/assets/images/logo/maison-professionals.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ezsystems/ezplatform-demo/HEAD/public/assets/images/logo/maison-professionals.png -------------------------------------------------------------------------------- /tests/fixtures/testRenderElementsResult_2.xml: -------------------------------------------------------------------------------- 1 |
2 |

Element 1 - Paragraph 1

3 |

Element 2 - header 1

4 | -------------------------------------------------------------------------------- /config/packages/twig.yaml: -------------------------------------------------------------------------------- 1 | twig: 2 | default_path: '%kernel.project_dir%/templates' 3 | debug: '%kernel.debug%' 4 | strict_variables: '%kernel.debug%' 5 | -------------------------------------------------------------------------------- /config/services/content.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | _defaults: 3 | autowire: true 4 | autoconfigure: true 5 | 6 | App\PremiumContent\HtmlRenderer: ~ 7 | -------------------------------------------------------------------------------- /config/packages/test/web_profiler.yaml: -------------------------------------------------------------------------------- 1 | web_profiler: 2 | toolbar: false 3 | intercept_redirects: false 4 | 5 | framework: 6 | profiler: { collect: false } 7 | -------------------------------------------------------------------------------- /config/routes/ezplatform_query_field_type.yaml: -------------------------------------------------------------------------------- 1 | ezplatform_query_field_type: 2 | resource: '@EzSystemsEzPlatformQueryFieldTypeBundle/Resources/config/routing/rest.yaml' 3 | -------------------------------------------------------------------------------- /config/packages/jms_translation.yaml: -------------------------------------------------------------------------------- 1 | jms_translation: 2 | source_language: en 3 | locales: [en] 4 | dumper: 5 | add_references: false 6 | add_date: false 7 | -------------------------------------------------------------------------------- /src/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | Require all denied 3 | 4 | 5 | Order deny,allow 6 | Deny from all 7 | 8 | -------------------------------------------------------------------------------- /config/services_test.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | _defaults: 3 | autowire: true 4 | autoconfigure: true 5 | 6 | App\Tests\Behat\: 7 | resource: '../tests/Behat/*' 8 | -------------------------------------------------------------------------------- /doc/docker/Dockerfile-dbdump: -------------------------------------------------------------------------------- 1 | FROM busybox 2 | 3 | copy doc/docker/entrypoint/mysql/2_dump.sql /dbdump/ezp.sql 4 | 5 | VOLUME ["/dbdump"] 6 | 7 | 8 | CMD ["/bin/true"] 9 | 10 | -------------------------------------------------------------------------------- /config/packages/behat/monolog.yaml: -------------------------------------------------------------------------------- 1 | monolog: 2 | handlers: 3 | travis: 4 | type: stream 5 | path: "%kernel.logs_dir%/travis_test.log" 6 | level: error 7 | -------------------------------------------------------------------------------- /tests/fixtures/testRenderElementsResult_3.xml: -------------------------------------------------------------------------------- 1 |
2 |

Element 1 - Paragraph 1

3 |

Element 2 - header 1

4 |

Element 3 - Paragraph 2

5 | -------------------------------------------------------------------------------- /config/packages/prod/webpack_encore.yaml: -------------------------------------------------------------------------------- 1 | #webpack_encore: 2 | # Cache the entrypoints.json (rebuild Symfony's cache when entrypoints.json changes) 3 | # Available in version 1.2 4 | #cache: true 5 | -------------------------------------------------------------------------------- /config/services/events.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | _defaults: 3 | autowire: true 4 | autoconfigure: true 5 | public: false 6 | 7 | App\Event\: 8 | resource: '../../src/Event/*' 9 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "devDependencies": { 3 | "@babel/preset-react": "^7.0.0", 4 | "@symfony/webpack-encore": "^0.28.0", 5 | "node-sass": "^4.11.0", 6 | "sass-loader": "^7.0.1" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /config/packages/assets.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | assets: 3 | packages: 4 | ezplatform: 5 | json_manifest_path: '%kernel.project_dir%/public/assets/ezplatform/build/manifest.json' 6 | -------------------------------------------------------------------------------- /config/packages/dev/swiftmailer.yaml: -------------------------------------------------------------------------------- 1 | # See https://symfony.com/doc/current/email/dev_environment.html 2 | swiftmailer: 3 | # send all emails to a specific address 4 | #delivery_addresses: ['me@example.com'] 5 | -------------------------------------------------------------------------------- /config/packages/translation.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | default_locale: '%locale%' 3 | translator: 4 | default_path: '%kernel.project_dir%/translations' 5 | fallbacks: 6 | - '%locale%' 7 | -------------------------------------------------------------------------------- /config/routes/graphql.yaml: -------------------------------------------------------------------------------- 1 | overblog_graphql_endpoint: 2 | path: /graphql 3 | defaults: 4 | _controller: Overblog\GraphQLBundle\Controller\GraphController::endpointAction 5 | _format: "json" 6 | -------------------------------------------------------------------------------- /config/services/helpers.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | _defaults: 3 | autowire: true 4 | autoconfigure: true 5 | public: false 6 | 7 | App\Helper\: 8 | resource: '../../src/Helper/*' 9 | -------------------------------------------------------------------------------- /assets/scss/_variables.scss: -------------------------------------------------------------------------------- 1 | // DEFAULT SIZES 2 | 3 | $ltxs: 557px; 4 | $xs: 576px; 5 | 6 | $ltsm: 767px; 7 | $sm: 768px; 8 | 9 | $ltmd: 991px; 10 | $md: 992px; 11 | 12 | $ltlg: 1139px; 13 | $lg: 1140px; 14 | -------------------------------------------------------------------------------- /assets/scss/maison/_footer.scss: -------------------------------------------------------------------------------- 1 | .footer { 2 | padding: 65px 0 130px; 3 | background-color: $white-whisper; 4 | 5 | &__logo { 6 | position: relative; 7 | top: 8px; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /assets/scss/_functions.scss: -------------------------------------------------------------------------------- 1 | @mixin transform($x, $y) { 2 | -webkit-transform: translateX($x) translateY($y); 3 | -moz-transform: translateX($x) translateY($y); 4 | transform: translateX($x) translateY($y); 5 | } 6 | -------------------------------------------------------------------------------- /bin/.travis/disable_xdebug.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | if [[ "$SYMFONY_DEBUG" == "" && "$TRAVIS_PHP_VERSION" != "" && "$TRAVIS_PHP_VERSION" != "hhvm" ]]; then 4 | echo "> Disable xdebug"; 5 | phpenv config-rm xdebug.ini ; 6 | fi 7 | -------------------------------------------------------------------------------- /public/assets/icons/email.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /config/packages/security_checker.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | _defaults: 3 | autowire: true 4 | autoconfigure: true 5 | 6 | SensioLabs\Security\SecurityChecker: ~ 7 | 8 | SensioLabs\Security\Command\SecurityCheckerCommand: ~ 9 | -------------------------------------------------------------------------------- /config/packages/test/monolog.yaml: -------------------------------------------------------------------------------- 1 | monolog: 2 | handlers: 3 | main: 4 | type: stream 5 | path: "%kernel.logs_dir%/%kernel.environment%.log" 6 | level: debug 7 | channels: ["!event"] 8 | -------------------------------------------------------------------------------- /doc/docker/entrypoint/mysql/0_database_character_set.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | echo "Altering database, setting character set to utf8mb4" 3 | echo "ALTER DATABASE ${MYSQL_DATABASE} CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;" | "${mysql[@]}" 4 | -------------------------------------------------------------------------------- /bin/.travis/run_rest_tests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Install REST package to get its dev dependencies and use them to run tests 3 | 4 | cd ./vendor/ezsystems/ezplatform-rest 5 | composer install 6 | php ./vendor/bin/phpunit -c phpunit-integration-rest.xml 7 | -------------------------------------------------------------------------------- /config/packages/field_templates.yml: -------------------------------------------------------------------------------- 1 | ezpublish: 2 | system: 3 | admin_group: 4 | field_templates: 5 | - 6 | template: "@ezdesign/fields/eztags_field.html.twig" 7 | priority: 10 8 | -------------------------------------------------------------------------------- /bin/.travis/configure_mysql.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | echo "> Create database and grant premissions to user 'ezp'" 4 | mysql -uroot -e "CREATE DATABASE IF NOT EXISTS behattestdb CHARACTER SET utf8; GRANT ALL ON behattestdb.* TO ezp@localhost IDENTIFIED BY 'ezp';" 5 | -------------------------------------------------------------------------------- /bin/.travis/parameters.yml: -------------------------------------------------------------------------------- 1 | # Only settings different then parameters.yml.dist, buildParameters will inject those we don't define from there! 2 | parameters: 3 | env(DATABASE_NAME): behattestdb 4 | env(DATABASE_USER): ezp 5 | env(DATABASE_PASSWORD): ezp 6 | -------------------------------------------------------------------------------- /config/packages/dev/debug.yaml: -------------------------------------------------------------------------------- 1 | debug: 2 | # Forwards VarDumper Data clones to a centralized server allowing to inspect dumps on CLI or in your browser. 3 | # See the "server:dump" command to start a new server. 4 | dump_destination: "tcp://%env(VAR_DUMPER_SERVER)%" 5 | -------------------------------------------------------------------------------- /config/routes/dev/web_profiler.yaml: -------------------------------------------------------------------------------- 1 | web_profiler_wdt: 2 | resource: '@WebProfilerBundle/Resources/config/routing/wdt.xml' 3 | prefix: /_wdt 4 | 5 | web_profiler_profiler: 6 | resource: '@WebProfilerBundle/Resources/config/routing/profiler.xml' 7 | prefix: /_profiler 8 | -------------------------------------------------------------------------------- /config/packages/doctrine_migrations.yaml: -------------------------------------------------------------------------------- 1 | doctrine_migrations: 2 | dir_name: '%kernel.project_dir%/src/Migrations' 3 | # namespace is arbitrary but should be different from App\Migrations 4 | # as migrations classes should NOT be autoloaded 5 | namespace: DoctrineMigrations 6 | -------------------------------------------------------------------------------- /templates/themes/standard/layout/logo.html.twig: -------------------------------------------------------------------------------- 1 | {% set logo = app_render_logo(contentId) %} 2 | 3 | {% if logo|length %} 4 | maison-logo 5 | {% else %} 6 | maison-logo 7 | {% endif %} 8 | -------------------------------------------------------------------------------- /assets/scss/_images.scss: -------------------------------------------------------------------------------- 1 | .img-fluid-container { 2 | img { 3 | max-width: 100%; 4 | object-fit: cover; 5 | height: auto; 6 | } 7 | } 8 | 9 | .icon { 10 | max-width: 15px; 11 | height: auto; 12 | margin-right: 10px; 13 | object-fit: contain; 14 | } 15 | -------------------------------------------------------------------------------- /templates/themes/maison/pagelayout.html.twig: -------------------------------------------------------------------------------- 1 | {% extends '@standard/pagelayout.html.twig' %} 2 | 3 | {% block custom_stylesheets %} 4 | {{ encore_entry_link_tags('maison') }} 5 | {% endblock %} 6 | 7 | {% block custom_javascripts %} 8 | {{ encore_entry_script_tags('maison') }} 9 | {% endblock %} 10 | -------------------------------------------------------------------------------- /assets/scss/maison/maison.scss: -------------------------------------------------------------------------------- 1 | @import "../demo.scss"; 2 | @import "_article.scss"; 3 | @import "_banner.scss"; 4 | @import "_card.scss"; 5 | @import "_footer.scss"; 6 | @import "_forms.scss"; 7 | @import "_header.scss"; 8 | @import "_navigation.scss"; 9 | @import "_pagination.scss"; 10 | @import "_section.scss"; 11 | -------------------------------------------------------------------------------- /config/packages/graphql.yaml: -------------------------------------------------------------------------------- 1 | overblog_graphql: 2 | definitions: 3 | mappings: 4 | auto_discover: false 5 | types: 6 | - 7 | type: yaml 8 | dir: "%kernel.project_dir%/config/graphql/types" 9 | suffix: ~ 10 | -------------------------------------------------------------------------------- /config/packages/liip_imagine.yaml: -------------------------------------------------------------------------------- 1 | # See how to configure the bundle: https://symfony.com/doc/current/bundles/LiipImagineBundle/basic-usage.html 2 | parameters: 3 | # Valid drivers options include "gd", "gmagick" or "imagick" 4 | liip_imagine_driver: 'gd' 5 | 6 | liip_imagine: 7 | driver: "%liip_imagine_driver%" 8 | -------------------------------------------------------------------------------- /templates/themes/professionals/pagelayout.html.twig: -------------------------------------------------------------------------------- 1 | {% extends '@standard/pagelayout.html.twig' %} 2 | 3 | {% block custom_stylesheets %} 4 | {{ encore_entry_link_tags('professionals') }} 5 | {% endblock %} 6 | 7 | {% block custom_javascripts %} 8 | {{ encore_entry_script_tags('professionals') }} 9 | {% endblock %} 10 | -------------------------------------------------------------------------------- /src/CacheKernel.php: -------------------------------------------------------------------------------- 1 | 2 | {% if previous is defined and previous is not null %} 3 | Previous 4 | {% endif %} 5 | {% if next is defined and next is not null %} 6 | Next 7 | {% endif %} 8 | 9 | -------------------------------------------------------------------------------- /config/routes/ezplatform.yaml: -------------------------------------------------------------------------------- 1 | login: 2 | path: /login 3 | defaults: { _controller: ezpublish.security.controller:loginAction } 4 | 5 | login_check: 6 | path: /login_check 7 | 8 | logout: 9 | path: /logout 10 | 11 | ezplatform_kernel_internal: 12 | resource: '@EzPublishCoreBundle/Resources/config/routing/internal.yml' 13 | -------------------------------------------------------------------------------- /config/packages/ezplatform_assets.yaml: -------------------------------------------------------------------------------- 1 | webpack_encore: 2 | builds: 3 | ezplatform: "%kernel.project_dir%/public/assets/ezplatform/build" 4 | 5 | framework: 6 | assets: 7 | packages: 8 | ezplatform: 9 | json_manifest_path: '%kernel.project_dir%/public/assets/ezplatform/build/manifest.json' 10 | 11 | -------------------------------------------------------------------------------- /bin/.travis/router_behat.php: -------------------------------------------------------------------------------- 1 | 10 |

Professionals!

11 | 12 | {% endblock %} 13 | -------------------------------------------------------------------------------- /config/services/mailer.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | _defaults: 3 | autowire: true 4 | autoconfigure: true 5 | 6 | App\Mail\Sender: 7 | arguments: 8 | - '@mailer' 9 | - '@translator' 10 | - '@twig' 11 | - '%app.contact_form.sender_email%' 12 | - '%app.contact_form.recipient_email%' 13 | -------------------------------------------------------------------------------- /config/routes/ezplatform_admin_ui.yaml: -------------------------------------------------------------------------------- 1 | ezplatform_admin_ui: 2 | resource: '@EzPlatformAdminUiBundle/Resources/config/routing.yaml' 3 | defaults: 4 | siteaccess_group_whitelist: '%admin_group_name%' 5 | 6 | ezplatform_admin_ui_rest: 7 | resource: '@EzPlatformAdminUiBundle/Resources/config/routing_rest.yaml' 8 | prefix: '%ezpublish_rest.path_prefix%' 9 | -------------------------------------------------------------------------------- /templates/base.html.twig: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {% block title %}Welcome!{% endblock %} 6 | {% block stylesheets %}{% endblock %} 7 | 8 | 9 | {% block body %}{% endblock %} 10 | {% block javascripts %}{% endblock %} 11 | 12 | 13 | -------------------------------------------------------------------------------- /templates/themes/maison/full/home.html.twig: -------------------------------------------------------------------------------- 1 | {% extends "@ezdesign/pagelayout.html.twig" %} 2 | 3 | {% block page_head %} 4 | {% set title = ez_content_name(content) %} 5 | {{ parent() }} 6 | {% endblock %} 7 | 8 | {% block content %} 9 |
10 |

Maison full home template

11 |
12 | {% endblock %} 13 | -------------------------------------------------------------------------------- /bin/.travis/runcommand.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | if [ "$1" = "" ]; then 6 | echo "Argument 1 variable for command arguments is empty, please pass arguments" 7 | exit 1 8 | fi 9 | 10 | # Execute test command, need to use sh to get right exit code (docker/compose/issues/3379) 11 | CMD=\"$@\" 12 | docker-compose exec -T --user www-data app bash -c \""$CMD"\" 13 | -------------------------------------------------------------------------------- /tests/bootstrap.php: -------------------------------------------------------------------------------- 1 | bootEnv(dirname(__DIR__).'/.env'); 11 | } 12 | -------------------------------------------------------------------------------- /config/packages/nelmio_cors.yaml: -------------------------------------------------------------------------------- 1 | nelmio_cors: 2 | defaults: 3 | origin_regex: true 4 | allow_origin: ['%env(CORS_ALLOW_ORIGIN)%'] 5 | allow_methods: ['GET', 'OPTIONS', 'POST', 'PUT', 'PATCH', 'DELETE'] 6 | allow_headers: ['Content-Type', 'Authorization'] 7 | expose_headers: ['Link'] 8 | max_age: 3600 9 | paths: 10 | '^/': ~ 11 | -------------------------------------------------------------------------------- /doc/docker/entrypoint/varnish/parameters.vcl: -------------------------------------------------------------------------------- 1 | // Custom parameters.vcl for docker use 2 | 3 | backend ezplatform { 4 | .host = "web"; 5 | .port = "80"; 6 | } 7 | 8 | // ACL for invalidators IP 9 | acl invalidators { 10 | "127.0.0.1"; 11 | // ACL_INVALIDATOR 12 | } 13 | 14 | // ACL for debuggers IP 15 | acl debuggers { 16 | "127.0.0.1"; 17 | "172.16.0.0"/20; 18 | } 19 | -------------------------------------------------------------------------------- /assets/scss/_default.scss: -------------------------------------------------------------------------------- 1 | @import "assets/scss/_fonts.scss"; 2 | 3 | body { 4 | font-family: $fira-sans; 5 | $color: $grey-light; 6 | } 7 | 8 | a { 9 | color: $blue-lighter; 10 | 11 | &:hover { 12 | text-decoration: none; 13 | } 14 | } 15 | 16 | .font-weight-bold { 17 | font-weight: 600!important; 18 | } 19 | 20 | video { 21 | max-width: 100%; 22 | } 23 | -------------------------------------------------------------------------------- /config/packages/twig_extensions.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | _defaults: 3 | public: false 4 | autowire: true 5 | autoconfigure: true 6 | 7 | # Uncomment any lines below to activate that Twig extension 8 | #Twig\Extensions\ArrayExtension: ~ 9 | #Twig\Extensions\DateExtension: ~ 10 | Twig\Extensions\IntlExtension: ~ 11 | Twig\Extensions\TextExtension: ~ 12 | -------------------------------------------------------------------------------- /assets/scss/demo.scss: -------------------------------------------------------------------------------- 1 | @import 'public/bundles/ezplatformadminuiassets/vendors/bootstrap/scss/bootstrap.scss'; 2 | @import "_colors.scss"; 3 | @import "_variables.scss"; 4 | @import "_functions.scss"; 5 | @import "_buttons.scss"; 6 | @import "_custom.scss"; 7 | @import "_carousel.scss"; 8 | @import "_default.scss"; 9 | @import "_ez-fields.scss"; 10 | @import "_fonts.scss"; 11 | @import "_images.scss"; 12 | -------------------------------------------------------------------------------- /assets/scss/maison/_section.scss: -------------------------------------------------------------------------------- 1 | $section: '.section'; 2 | 3 | #{($section)} { 4 | color: $grey-light; 5 | 6 | &--raised { 7 | position: relative; 8 | z-index: 1000; 9 | padding: 49px; 10 | max-width: $lg; 11 | margin: 0 auto; 12 | margin-top: -170px; 13 | border-radius: 16px; 14 | background-color: $white; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /bin/.travis/composer-auth.json: -------------------------------------------------------------------------------- 1 | { 2 | "github-oauth": { 3 | "github.com": "PLEASE DO NOT USE THIS TOKEN IN YOUR OWN PROJECTS/FORKS", 4 | "github.com": "This token is reserved for testing with ezsystems repositories", 5 | "github.com": "NB: You create your own token without(!) any scope to use same approach", 6 | "github.com": "d0285ed5c8644f30547572ead2ed897431c1fc09" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /doc/docker/Dockerfile-vardir: -------------------------------------------------------------------------------- 1 | FROM busybox 2 | 3 | COPY ./public/var /var/www/public/var 4 | 5 | WORKDIR /var/www 6 | 7 | # Fix permissions for www-data 8 | RUN chown -R www-data:www-data public/var \ 9 | && find public/var -type d -print0 | xargs -0 chmod -R 775 \ 10 | && find public/var -type f -print0 | xargs -0 chmod -R 664 11 | 12 | VOLUME ["/var/www/public/var"] 13 | 14 | CMD ["/bin/true"] 15 | -------------------------------------------------------------------------------- /doc/docker/create-dataset.yml: -------------------------------------------------------------------------------- 1 | version: '3.3' 2 | # Config for creating dataset images. To be appended before demo.yml and to be used for generating datasets for prod 3 | 4 | services: 5 | dataset-dbdump: 6 | build: 7 | context: ../../ 8 | dockerfile: doc/docker/Dockerfile-dbdump 9 | 10 | dataset-vardir: 11 | build: 12 | context: ../../ 13 | dockerfile: doc/docker/Dockerfile-vardir 14 | -------------------------------------------------------------------------------- /config/services/pagerfanta.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | _defaults: 3 | autowire: true 4 | autoconfigure: true 5 | public: false 6 | 7 | App\Pagerfanta\MaisonTemplate: ~ 8 | 9 | Pagerfanta\View\DefaultView: 10 | public: false 11 | arguments: 12 | - '@App\Pagerfanta\MaisonTemplate' 13 | tags: 14 | - { name: 'pagerfanta.view', alias: 'maison_template' } 15 | -------------------------------------------------------------------------------- /.platform/routes.yaml: -------------------------------------------------------------------------------- 1 | "https://{default}/": 2 | type: upstream 3 | upstream: "varnish:http" 4 | cache: 5 | # As this does not support Vary, and purging, we can't use this as Sf Proxy drop in. 6 | # However it is possible to enable this for anonymous traffic when backend sends expiry headers. 7 | enabled: false 8 | 9 | "https://www.{default}/": 10 | type: redirect 11 | to: "https://{default}/" 12 | -------------------------------------------------------------------------------- /config/packages/oneup_flysystem.yaml: -------------------------------------------------------------------------------- 1 | # Read the documentation: https://github.com/1up-lab/OneupFlysystemBundle/tree/master/Resources/doc/index.md 2 | oneup_flysystem: 3 | adapters: 4 | default_adapter: 5 | local: 6 | directory: '%kernel.cache_dir%/flysystem' 7 | filesystems: 8 | default_filesystem: 9 | adapter: default_adapter 10 | alias: League\Flysystem\Filesystem 11 | -------------------------------------------------------------------------------- /ez.webpack.custom.configs.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | const customConfigs = require('./var/encore/ez.webpack.custom.config.js'); 3 | 4 | module.exports = customConfigs.reduce((configs, customConfigPath) => { 5 | let customConfig = require(customConfigPath); 6 | 7 | if (!Array.isArray(customConfig)) { 8 | customConfig = [customConfig]; 9 | } 10 | 11 | return [ ...configs, ...customConfig ]; 12 | }, []); 13 | -------------------------------------------------------------------------------- /templates/themes/professionals/layout/footer.html.twig: -------------------------------------------------------------------------------- 1 | 12 | -------------------------------------------------------------------------------- /bin/.travis/prepare_selenium2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | echo "> Prepare X and start Selenium" 4 | export DISPLAY=:99.0 5 | sh -e /etc/init.d/xvfb start 6 | wget http://selenium-release.storage.googleapis.com/2.47/selenium-server-standalone-2.47.1.jar 7 | java -jar selenium-server-standalone-2.47.1.jar -log /tmp/selenium.log & 8 | cd - 9 | 10 | # Give Selenium some time to start, otherwise tests will fail under high load on test servers 11 | sleep 8 12 | -------------------------------------------------------------------------------- /config/services/query_types.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | _defaults: 3 | autowire: true 4 | autoconfigure: true 5 | public: false 6 | 7 | App\QueryType\: 8 | resource: '../../src/QueryType/*' 9 | 10 | App\QueryType\MenuQueryType: 11 | arguments: 12 | $languages: '%languages%' 13 | 14 | App\QueryType\ChildrenQueryType: 15 | tags: 16 | - {name: ezpublish.query_type} 17 | -------------------------------------------------------------------------------- /templates/themes/admin/fields/eztags_field.html.twig: -------------------------------------------------------------------------------- 1 | {% extends "@EzPublishCore/content_fields.html.twig" %} 2 | 3 | {% block eztags_field %} 4 | {# {% for tag in field.value.tags %}#} 5 | {# #} 6 | {# {{ netgen_tags_tag_keyword(tag) }}#} 7 | {# #} 8 | {# {% if not loop.last %}, {% endif %}#} 9 | {# {% endfor %}#} 10 | {% endblock %} 11 | -------------------------------------------------------------------------------- /config/packages/ezplatform_doctrine_schema.yaml: -------------------------------------------------------------------------------- 1 | parameters: 2 | database_charset: '%env(DATABASE_CHARSET)%' 3 | # collation currently has effect on MySQL only 4 | database_collation: '%env(DATABASE_COLLATION)%' 5 | 6 | # If you are not using MySQL, you can comment-out this section 7 | ez_doctrine_schema: 8 | tables: 9 | options: 10 | charset: '%database_charset%' 11 | collate: '%database_collation%' 12 | -------------------------------------------------------------------------------- /templates/themes/maison/parts/store_work_hours.html.twig: -------------------------------------------------------------------------------- 1 | {% set workHours = ez_field_value(content, 'workinghours').rows %} 2 |

{{ 'Work Hours'|trans }}

3 | {% if workHours|length > 0 %} 4 | {% for workHour in workHours %} 5 |

{{ workHour.cells['day'] }} | {{ workHour.cells['from'] }} - {{ workHour.cells['to'] }}

6 | {% endfor %} 7 | {% else %} 8 |

-

9 | {% endif %} 10 | -------------------------------------------------------------------------------- /src/MigrationVersions/content_type_group.yaml: -------------------------------------------------------------------------------- 1 | - 2 | type: reference 3 | mode: load 4 | file: 'src/MigrationVersions/References/references.yml' 5 | overwrite: true 6 | 7 | #Professionals content type group 8 | - 9 | type: content_type_group 10 | mode: create 11 | identifier: Professionals 12 | 13 | - 14 | type: reference 15 | mode: save 16 | file: 'src/MigrationVersions/References/references.yml' 17 | overwrite: true 18 | -------------------------------------------------------------------------------- /doc/docker/dfs.yml: -------------------------------------------------------------------------------- 1 | version: '3.3' 2 | 3 | services: 4 | app: 5 | environment: 6 | - DFS_NFS_PATH=/dfsdata 7 | depends_on: 8 | - dfsperm 9 | volumes: 10 | - ../../dfsdata:/dfsdata 11 | 12 | web: 13 | environment: 14 | - BINARY_DATA_HANDLER=dfs 15 | 16 | dfsperm: 17 | image: ${PHP_IMAGE} 18 | volumes: 19 | - ../../dfsdata:/dfsdata 20 | command: /bin/bash -c "mkdir -p /dfsdata/var; chown 1000:33 /dfsdata/var" 21 | -------------------------------------------------------------------------------- /config/services/migration.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | App\Migration\FieldHandler\EzImageAsset: 3 | parent: ez_migration_bundle.complex_field 4 | arguments: 5 | - '@ez_migration_bundle.reference_resolver.customreference' 6 | tags: 7 | - { name: ez_migration_bundle.complex_field, fieldtype: ezimageasset, priority: 0 } 8 | 9 | # hack for migration bundle 10 | ezpublish.fieldType.ezpage.pageService: 11 | synthetic: true 12 | -------------------------------------------------------------------------------- /bin/.travis/apache2/php5-fcgi: -------------------------------------------------------------------------------- 1 | 2 | AddHandler php5-fcgi .php 3 | Action php5-fcgi /php5-fcgi 4 | Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi 5 | FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -host 127.0.0.1:9000 -pass-header Authorization -idle-timeout 300 6 | 7 | 8 | Order deny,allow 9 | Deny from all 10 | Allow from env=REDIRECT_STATUS 11 | 12 | 13 | -------------------------------------------------------------------------------- /UPGRADE.md: -------------------------------------------------------------------------------- 1 | # Upgrade instructions 2 | 3 | Please visit our online documentation for instructions: 4 | https://doc.ezplatform.com/en/latest/releases/updating_ez_platform/ 5 | 6 | For legacy upgrade procedures, please go to our legacy documentation: 7 | * Go to https://doc.ez.no/display/MAIN 8 | * Click on the version you have 9 | * Go to "Installation and Upgrade Guides" 10 | * Select "Upgrade" 11 | 12 | For instance for 5.2 upgrade go to: 13 | https://doc.ez.no/display/EZP52/Upgrade 14 | -------------------------------------------------------------------------------- /assets/scss/maison/_article.scss: -------------------------------------------------------------------------------- 1 | $article: '.article'; 2 | 3 | #{($article)} { 4 | margin-bottom: 80px; 5 | 6 | &--full-page { 7 | #{($article)} { 8 | &__title { 9 | font-size: 43px; 10 | color: $grey-light; 11 | } 12 | &__image { 13 | margin: 72px 0 64px; 14 | } 15 | &__desc { 16 | margin-top: 44px; 17 | } 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /config/packages/framework.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | secret: '%env(APP_SECRET)%' 3 | #default_locale: en 4 | #csrf_protection: true 5 | #http_method_override: true 6 | 7 | # Enables session support. Note that the session will ONLY be started if you read or write from it. 8 | # Remove or comment this section to explicitly disable session support. 9 | session: 10 | cookie_secure: auto 11 | cookie_samesite: lax 12 | 13 | php_errors: 14 | log: true 15 | -------------------------------------------------------------------------------- /tests/fixtures/testRenderElementsResult_4.xml: -------------------------------------------------------------------------------- 1 |
2 |

Element 1 - Paragraph 1

3 |

Element 2 - header 1

4 |

Element 3 - Paragraph 2

5 | 6 | 7 |
8 | 9 | 10 |
11 | 12 | 13 |
14 | -------------------------------------------------------------------------------- /src/Layout/LayoutRendererInterface.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/MigrationVersions/user-policy_mysql.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO `ezpolicy_limitation_value` (`id`, `limitation_id`, `value`) VALUES (484,253,'2106599819'); 2 | INSERT INTO `ezpolicy_limitation_value` (`id`, `limitation_id`, `value`) VALUES (485,253,'3430272718'); 3 | INSERT INTO `ezpolicy_limitation_value` (`id`, `limitation_id`, `value`) VALUES (486,253,'4178359917'); 4 | INSERT INTO `ezpolicy_limitation_value` (`id`, `limitation_id`, `value`) VALUES (487,253,'1739204639'); 5 | INSERT INTO `ezpolicy_limitation_value` (`id`, `limitation_id`, `value`) VALUES (488,253,'767438990'); 6 | -------------------------------------------------------------------------------- /doc/docker/blackfire.yml: -------------------------------------------------------------------------------- 1 | version: '3.3' 2 | # Blackfire agent config, to be appended after base-prod or base-dev config. 3 | # You'll need to export the two blackfire server variables before you can use this. 4 | 5 | services: 6 | # See: https://blackfire.io/docs/integrations/docker 7 | blackfire: 8 | image: blackfire/blackfire 9 | environment: 10 | # Reads the host BLACKFIRE_SERVER_ID and BLACKFIRE_SERVER_TOKEN environment variables. 11 | - BLACKFIRE_SERVER_ID 12 | - BLACKFIRE_SERVER_TOKEN 13 | networks: 14 | - backend 15 | -------------------------------------------------------------------------------- /doc/docker/redis.yml: -------------------------------------------------------------------------------- 1 | version: '3.3' 2 | # Redis config, to be appended after base-prod or base-dev, ..., but before selenium.yml 3 | 4 | ## WARNING: 5 | # This service is currently work in progress, is not tested by CI, and thus not guaranteed to work. 6 | # You are however more then welcome to try it out and help make it stable. 7 | 8 | services: 9 | app: 10 | depends_on: 11 | - redis 12 | environment: 13 | - CACHE_POOL=cache.redis 14 | - CACHE_DSN=redis:6379 15 | 16 | redis: 17 | image: ${REDIS_IMAGE} 18 | networks: 19 | - backend 20 | -------------------------------------------------------------------------------- /config/services/installer.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | App\Event\Subscriber\BuildDemoSchemaSubscriber: 3 | autoconfigure: true 4 | arguments: 5 | - 'src/Resources/schema/demo.yaml' 6 | 7 | App\Installer\PlatformDemoInstaller: 8 | autowire: true 9 | parent: EzSystems\PlatformInstallerBundle\Installer\CoreInstaller 10 | class: App\Installer\PlatformDemoInstaller 11 | calls: 12 | - [setEnvironment, ["%kernel.environment%"]] 13 | tags: 14 | - { name: ezplatform.installer, type: ezplatform-demo } 15 | -------------------------------------------------------------------------------- /doc/docker/demo.yml: -------------------------------------------------------------------------------- 1 | version: '3.3' 2 | # Demo config, to be appended after base-prod.yml and create-dataset.yml 3 | 4 | services: 5 | app: 6 | volumes: 7 | - vardir:/var/www/public/var 8 | depends_on: 9 | - dataset-vardir 10 | 11 | web: 12 | volumes: 13 | - vardir:/var/www/public/var:ro 14 | 15 | dataset-vardir: 16 | volumes: 17 | - vardir:/var/www/public/var:ro 18 | networks: 19 | - backend 20 | 21 | dataset-dbdump: 22 | volumes: 23 | - dbdump:/dbdump:ro 24 | networks: 25 | - backend 26 | 27 | volumes: 28 | vardir: 29 | -------------------------------------------------------------------------------- /doc/nginx/ez_params.d/ez_prod_rewrite_params: -------------------------------------------------------------------------------- 1 | 2 | # Additional Assetic rules 3 | ## Don't forget to run php bin/console assetic:dump --env=prod 4 | ## and make sure to comment these out in DEV environment. 5 | rewrite "^/css/(.*)\.css" "/css/$1.css" break; 6 | rewrite "^/js/(.*)\.js" "/js/$1.js" break; 7 | rewrite "^/font(s?)/(.*)\.ttf" "/font$1/$2.ttf" break; 8 | rewrite "^/font(s?)/(.*)\.woff" "/font$1/$2.woff" break; 9 | rewrite "^/font(s?)/(.*)\.otf" "/font$1/$2.otf" break; 10 | rewrite "^/font(s?)/(.*)\.eot" "/font$1/$2.eot" break; 11 | rewrite "^/font(s?)/(.*)\.svg" "/font$1/$2.svg" break; 12 | -------------------------------------------------------------------------------- /assets/scss/maison/_forms.scss: -------------------------------------------------------------------------------- 1 | .form { 2 | &--search { 3 | max-width: 395px; 4 | 5 | input[type="search"] { 6 | font-size: 14px; 7 | line-height: 20px; 8 | color: $grey-light; 9 | border: 1px solid #c9c9c9; 10 | height: 40px; 11 | padding-left: 27px; 12 | } 13 | .icon-search { 14 | position: absolute; 15 | right: 24px; 16 | top: 5px; 17 | z-index: 5; 18 | color: #c9c9c9; 19 | font-size: 30px; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /tests/fixtures/testRenderElementsResult_5.xml: -------------------------------------------------------------------------------- 1 |
2 |

Element 1 - Paragraph 1

3 |

Element 2 - header 1

4 |

Element 3 - Paragraph 2

5 | 6 | 7 |
8 | 9 | 10 |
11 | 12 | 13 |
14 | 15 | 16 |

Paragraph 3

17 | -------------------------------------------------------------------------------- /config/packages/dev/easy_log_handler.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | EasyCorp\EasyLog\EasyLogHandler: 3 | public: false 4 | arguments: ['%kernel.logs_dir%/%kernel.environment%.log'] 5 | 6 | #// FIXME: How to add this configuration automatically without messing up with the monolog configuration? 7 | #monolog: 8 | # handlers: 9 | # buffered: 10 | # type: buffer 11 | # handler: easylog 12 | # channels: ['!event'] 13 | # level: debug 14 | # easylog: 15 | # type: service 16 | # id: EasyCorp\EasyLog\EasyLogHandler 17 | -------------------------------------------------------------------------------- /assets/scss/maison/_banner.scss: -------------------------------------------------------------------------------- 1 | .banner { 2 | position: relative; 3 | z-index: 1; 4 | 5 | &__image { 6 | opacity: 0.3; 7 | } 8 | &--full-width { 9 | height: 306px; 10 | 11 | img { 12 | width: 100%; 13 | height:306px; 14 | object-fit: cover; 15 | } 16 | } 17 | &__title { 18 | position: absolute; 19 | top: 25%; 20 | left: 50%; 21 | @include transform(-50%, -25%); 22 | color: $grey-light; 23 | } 24 | &--map { 25 | background-color: $white-smoke; 26 | } 27 | } 28 | 29 | -------------------------------------------------------------------------------- /config/packages/behat/ezplatform.yaml: -------------------------------------------------------------------------------- 1 | # Siteaccesses are first added in ../ezplatform.yaml. 2 | # Only merge additional siteaccesses here. 3 | 4 | ezplatform: 5 | siteaccess: 6 | list: 7 | - other_site 8 | groups: 9 | site_group: 10 | - other_site 11 | default_siteaccess: site 12 | match: 13 | URIElement: 1 14 | ezdesign: 15 | phpstorm: 16 | enabled: false 17 | 18 | ez_platform_standard_design: 19 | override_kernel_templates: false 20 | 21 | parameters: 22 | ezsettings.admin_group.notifications.success.timeout: 20000 23 | -------------------------------------------------------------------------------- /config/services/twig.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | _defaults: 3 | autowire: true 4 | autoconfigure: true 5 | public: false 6 | 7 | App\Twig\ContentInfoByLocationIdExtension: ~ 8 | 9 | App\Twig\SearchResultExtractorExtension: ~ 10 | 11 | App\Twig\PremiumContentExtension: 12 | arguments: 13 | $allowedUserGroupsLocationIds: '%app.premium_content.allowed_user_groups.location_ids%' 14 | 15 | App\Twig\ContentPaginationExtension: ~ 16 | 17 | App\Twig\AppLayoutExtension: 18 | arguments: 19 | $renderers: !tagged { tag: layout.renderer, index_by: key } 20 | -------------------------------------------------------------------------------- /src/PHPUnit/BypassFinalHook.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | {{ ez_render_field(content, 'image') }} 5 |
6 |
7 |
8 |

{{ ez_render_field(content, 'name') }}

9 |
10 |
11 | {{ ez_render_field(content, 'intro') }} 12 |
13 |
14 |
15 | 16 | -------------------------------------------------------------------------------- /src/MigrationVersions/languages.yaml: -------------------------------------------------------------------------------- 1 | #- 2 | # type: reference 3 | # mode: load 4 | # file: 'src/MigrationVersions/References/references.yml' 5 | # overwrite: true 6 | 7 | # languages French 4, German 8, Norwegian 16 8 | - 9 | type: language 10 | mode: create 11 | lang: fre-FR 12 | name: French 13 | 14 | - 15 | type: language 16 | mode: create 17 | lang: ger-DE 18 | name: German 19 | 20 | - 21 | type: language 22 | mode: create 23 | lang: nor-NO 24 | name: Norwegian 25 | 26 | - 27 | type: reference 28 | mode: save 29 | file: 'src/MigrationVersions/References/references.yml' 30 | overwrite: true 31 | -------------------------------------------------------------------------------- /doc/docker/multihost.yml: -------------------------------------------------------------------------------- 1 | version: '3.3' 2 | # Multi-host setup for behat tests 3 | 4 | services: 5 | web: 6 | command: /bin/bash -c "cd /var/www && cp -a doc/nginx/ez_params.d /etc/nginx && bin/vhost.sh --host-name=site.example.com --host-alias='admin.example.com test.example.com' --template-file=doc/nginx/vhost.template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'" 7 | networks: 8 | frontend: 9 | aliases: 10 | - site.example.com 11 | - admin.example.com 12 | - test.example.com 13 | backend: 14 | aliases: 15 | - site.example.com 16 | - admin.example.com 17 | - test.example.com 18 | -------------------------------------------------------------------------------- /doc/nginx/ez_params.d/ez_fastcgi_params: -------------------------------------------------------------------------------- 1 | 2 | # Including the distribution's default fastcgi parameters 3 | include fastcgi_params; 4 | 5 | fastcgi_buffer_size 128k; 6 | fastcgi_buffers 4 256k; 7 | fastcgi_busy_buffers_size 256k; 8 | 9 | set $fc_script_name "index.php"; 10 | 11 | if ( $uri ~ "^/(.*\.php)" ) { 12 | set $fc_script_name $1; 13 | } 14 | 15 | fastcgi_split_path_info ^(.+\.php)(/.+)$; 16 | 17 | fastcgi_param PATH_INFO $fastcgi_path_info; 18 | fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; 19 | fastcgi_param SCRIPT_NAME $fc_script_name; 20 | fastcgi_param SCRIPT_FILENAME $document_root/$fc_script_name; 21 | 22 | fastcgi_index index.php; 23 | 24 | -------------------------------------------------------------------------------- /doc/docker/redis-session.yml: -------------------------------------------------------------------------------- 1 | version: '3.3' 2 | # Config for having sessions in separate redis instance, to be appended after base-prod or base-dev, ..., but before selenium.yml 3 | 4 | ## WARNING: 5 | # This service is currently work in progress, is not tested by CI, and thus not guaranteed to work. 6 | # You are however more then welcome to try it out and help make it stable. 7 | 8 | services: 9 | app: 10 | depends_on: 11 | - redis-session 12 | environment: 13 | - SESSION_HANDLER_ID=ezplatform.core.session.handler.native_redis 14 | - SESSION_SAVE_PATH=tcp://redis-session:6379?weight=1 15 | 16 | redis-session: 17 | image: ${REDIS_IMAGE} 18 | networks: 19 | - backend 20 | -------------------------------------------------------------------------------- /config/packages/ezplatform_solr.yaml: -------------------------------------------------------------------------------- 1 | # Base configuration for Solr, for more options see: https://doc.ezplatform.com/en/latest/guide/search/#solr-bundle 2 | # Can have several connections used by each eZ Repositories in ezplatform.yml 3 | parameters: 4 | # Solr root endpoint, relevant if `solr` is set as search_engine 5 | solr_dsn: '%env(SOLR_DSN)%' 6 | solr_core: '%env(SOLR_CORE)%' 7 | 8 | ez_search_engine_solr: 9 | endpoints: 10 | endpoint0: 11 | dsn: '%solr_dsn%' 12 | core: '%solr_core%' 13 | connections: 14 | default: 15 | entry_endpoints: 16 | - endpoint0 17 | mapping: 18 | default: endpoint0 19 | -------------------------------------------------------------------------------- /config/packages/webpack_encore.yaml: -------------------------------------------------------------------------------- 1 | webpack_encore: 2 | # The path where Encore is building the assets. 3 | # This should match Encore.setOutputPath() in webpack.config.js. 4 | output_path: '%kernel.project_dir%/public/assets/build' 5 | # If multiple builds are defined (as shown below), you can disable the default build: 6 | # output_path: false 7 | 8 | # if using Encore.enableIntegrityHashes() specify the crossorigin attribute value (default: false, or use 'anonymous' or 'use-credentials') 9 | # crossorigin: 'anonymous' 10 | 11 | # Cache the entrypoints.json (rebuild Symfony's cache when entrypoints.json changes) 12 | # Available in version 1.2 13 | cache: '%kernel.debug%' 14 | -------------------------------------------------------------------------------- /config/packages/dev/monolog.yaml: -------------------------------------------------------------------------------- 1 | monolog: 2 | handlers: 3 | main: 4 | type: stream 5 | path: "%kernel.logs_dir%/%kernel.environment%.log" 6 | level: debug 7 | channels: ["!event", "!doctrine"] 8 | # uncomment to get logging in your browser 9 | # you may have to allow bigger header sizes in your Web server configuration 10 | #firephp: 11 | # type: firephp 12 | # level: info 13 | #chromephp: 14 | # type: chromephp 15 | # level: info 16 | console: 17 | type: console 18 | process_psr_3_messages: false 19 | channels: ["!event", "!doctrine", "!console"] 20 | -------------------------------------------------------------------------------- /doc/docker/db-stack.yml: -------------------------------------------------------------------------------- 1 | version: '3.3' 2 | # Config for running mariadb in a docker stack 3 | 4 | services: 5 | db: 6 | image: mariadb:10.1 7 | volumes: 8 | - ../../doc/docker/entrypoint/mysql/0_database_character_set.sh:/docker-entrypoint-initdb.d/0_database_character_set.sh:ro 9 | - mysql:/var/lib/mysql 10 | environment: 11 | - MYSQL_RANDOM_ROOT_PASSWORD=1 12 | - MYSQL_USER=ezp 13 | - MYSQL_PASSWORD=SetYourOwnPassword 14 | - MYSQL_DATABASE=ezp 15 | - TERM=dumb 16 | networks: 17 | - db 18 | deploy: 19 | placement: 20 | constraints: [node.role == manager] 21 | 22 | volumes: 23 | mysql: 24 | 25 | networks: 26 | db: 27 | attachable: true 28 | -------------------------------------------------------------------------------- /doc/docker/selenium.yml: -------------------------------------------------------------------------------- 1 | version: '3.3' 2 | # Appends services to prod.yml, prod+dev, prod+redis, ..., always latest 3 | 4 | services: 5 | selenium: 6 | image: ${SELENIUM_IMAGE} 7 | ports: 8 | - "9999:9999" 9 | - "4444:4444" 10 | - "5900:5900" 11 | environment: 12 | - SCREEN_WIDTH=1920 13 | - SCREEN_HEIGHT=1080 14 | - SCREEN_DEPTH=24 15 | - VNC_NO_PASSWORD=1 16 | networks: 17 | - backend 18 | # Because of: https://github.com/elgalu/docker-selenium/issues/20 19 | shm_size: '1gb' 20 | 21 | app: 22 | depends_on: 23 | - selenium 24 | environment: 25 | - EZP_TEST_REST_HOST=$WEB_HOST 26 | - BEHAT_SELENIUM_HOST=$SELENIUM_HOST 27 | - BEHAT_WEB_HOST=$WEB_HOST 28 | -------------------------------------------------------------------------------- /config/packages/cache.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | cache: 3 | # Put the unique name of your app here: the prefix seed 4 | # is used to compute stable namespaces for cache keys. 5 | #prefix_seed: your_vendor_name/app_name 6 | 7 | # The app cache caches to the filesystem by default. 8 | # Other options include: 9 | 10 | # Redis 11 | #app: cache.adapter.redis 12 | #default_redis_provider: redis://localhost 13 | 14 | # APCu (not recommended with heavy random-write workloads as memory fragmentation can cause perf issues) 15 | #app: cache.adapter.apcu 16 | 17 | # Namespaced pools use the above "app" backend by default 18 | #pools: 19 | #my.dedicated.cache: ~ 20 | -------------------------------------------------------------------------------- /COPYRIGHT: -------------------------------------------------------------------------------- 1 | COPYRIGHT NOTICE: Copyright (C) 1999-2017 eZ Systems AS 2 | SOFTWARE LICENSE: GNU General Public License v2.0 3 | NOTICE: > 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of version 2.0 of the GNU General 6 | Public License as published by the Free Software Foundation. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of version 2.0 of the GNU General 14 | Public License along with this program; if not, write to the Free 15 | Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 16 | MA 02110-1301, USA. 17 | -------------------------------------------------------------------------------- /config/packages/prod/monolog.yaml: -------------------------------------------------------------------------------- 1 | monolog: 2 | handlers: 3 | main: 4 | type: fingers_crossed 5 | action_level: error 6 | handler: nested 7 | excluded_404s: 8 | # regex: exclude all 404 errors from the logs 9 | - ^/ 10 | nested: 11 | type: stream 12 | path: "%kernel.logs_dir%/%kernel.environment%.log" 13 | level: debug 14 | console: 15 | type: console 16 | process_psr_3_messages: false 17 | channels: ["!event", "!doctrine"] 18 | deprecation: 19 | type: stream 20 | path: "%kernel.logs_dir%/%kernel.environment%.deprecations.log" 21 | deprecation_filter: 22 | type: filter 23 | handler: deprecation 24 | max_level: info 25 | channels: ["php"] 26 | -------------------------------------------------------------------------------- /doc/docker/solr.yml: -------------------------------------------------------------------------------- 1 | version: '3.3' 2 | # Solr config, to be appended after base-prod or base-dev, ..., but before selenium.yml 3 | # 4 | # NOTE: You'll need to manually reindex the solr index when booting this as we don't have entrypoint for solr yet. 5 | # (Unless you use ezplatform:install command which indexes for you) 6 | 7 | ## WARNING! 8 | # This service is currently work in progress, is not tested by CI, and thus not guaranteed to work. 9 | # You are however more then welcome to try it out and help make it stable. 10 | 11 | services: 12 | app: 13 | depends_on: 14 | - solr 15 | environment: 16 | - SEARCH_ENGINE=solr 17 | - SOLR_DSN=http://solr:8983/solr 18 | 19 | solr: 20 | build: 21 | context: ../../ 22 | dockerfile: doc/docker/Dockerfile-solr 23 | ports: 24 | - "8983:8983" 25 | networks: 26 | - frontend 27 | - backend 28 | -------------------------------------------------------------------------------- /doc/varnish/varnish.md: -------------------------------------------------------------------------------- 1 | eZ Platform Varnish configuration 2 | ================================= 3 | 4 | Prerequisites 5 | ------------- 6 | * A working Varnish 5.1 or higher _(6.0 is a LTS, so the recommended version we test against)_. 7 | * [Varnish xkey module](https://github.com/varnish/varnish-modules/) 8 | 9 | Recommended VCL base files 10 | -------------------------- 11 | Provided VCL for eZ can be found in [vendor/ezsystems/ezplatform-http-cache/docs/varnish](https://github.com/ezsystems/ezplatform-http-cache/tree/master/docs/varnish). Specifically `/vcl/varnish5.vcl`. 12 | 13 | 14 | > **Note:** Http cache management is done with the help of [FOSHttpCacheBundle](http://foshttpcachebundle.readthedocs.org/). 15 | One may need to tweak their VCL further on according to [FOSHttpCache documentation](http://foshttpcache.readthedocs.org/en/latest/varnish-configuration.html) 16 | in order to use features supported by it. 17 | -------------------------------------------------------------------------------- /tests/fixtures/testRenderElementsResult_6.xml: -------------------------------------------------------------------------------- 1 |
2 |

Element 1 - Paragraph 1

3 |

Element 2 - header 1

4 |

Element 3 - Paragraph 2

5 | 6 | 7 |
8 | 9 | 10 |
11 | 12 | 13 |
14 | 15 | 16 |

Paragraph 3

17 | 18 | 19 |
20 | 21 | 22 |
23 | 24 | 25 |
26 | -------------------------------------------------------------------------------- /tests/App/Behat/PlatformDemoEnvironmentConstants.php: -------------------------------------------------------------------------------- 1 | values['ROOT_CONTENT_NAME'] = 'Home'; 18 | $this->values['ARTICLE_MAIN_FIELD_NAME'] = 'Summary'; 19 | $this->values['CREATE_REGISTRATION_ROLE_POLICIES'] = 'user/login,content/read,tags/read'; 20 | $this->values['REGISTRATION_CONFIRMATION_MESSAGE'] = 'Registration completed'; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /templates/themes/maison/pagination/content_pagination.html.twig: -------------------------------------------------------------------------------- 1 |
2 |
3 | {% if previous is defined and previous is not null %} 4 | 5 | keyboard_backspace 6 | Previous Idea 7 | 8 | {% endif %} 9 | Back to Inspirations 10 | {% if next is defined and next is not null %} 11 | 12 | Next Idea 13 | keyboard_backspace 14 | 15 | {% endif %} 16 |
17 |
18 | -------------------------------------------------------------------------------- /bin/.travis/get_behat_features.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Fastest option 'list-features' gives us the list of all features from given context in random order, which are later 3 | # run in this order in few threads and dynamically distributed between these threads. That gives us different test build 4 | # times each build, often non optimal. To make this optimal we sort features by the number of scenarios in them 5 | # (ascending because Fastest reverse the queue order, and we want this queue to run descending) and run them in that order, 6 | # to minimize final time gap between the threads. 7 | PROFILE='' 8 | SUITE='' 9 | TAGS='' 10 | 11 | while getopts p:s:t: option 12 | do 13 | case "${option}" 14 | in 15 | p) PROFILE="--profile=${OPTARG}";; 16 | s) SUITE="--suite=${OPTARG}";; 17 | t) TAGS="--tags=${OPTARG}";; 18 | esac 19 | done 20 | 21 | bin/behat ${PROFILE} ${SUITE} ${TAGS} --list-scenarios | awk '{ gsub(/:[0-9]+/,"",$1); print $1 }' | uniq -c | sort | awk '{ print $2 }' 22 | -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | const Encore = require('@symfony/webpack-encore'); 2 | const path = require('path'); 3 | const getEzConfig = require('./ez.webpack.config.js'); 4 | const eZConfigManager = require('./ez.webpack.config.manager.js'); 5 | const eZConfig = getEzConfig(Encore); 6 | const customConfigs = require('./ez.webpack.custom.configs.js'); 7 | 8 | Encore.reset(); 9 | Encore.setOutputPath('public/assets/build') 10 | .setPublicPath('/assets/build') 11 | .enableSassLoader() 12 | .enableReactPreset() 13 | .enableSingleRuntimeChunk(); 14 | 15 | Encore.addEntry('maison', [ 16 | path.resolve(__dirname, './assets/scss/maison/maison.scss'), 17 | path.resolve(__dirname, './assets/js/carouselMenu.js'), 18 | ]) 19 | .addEntry('professionals', [ 20 | path.resolve(__dirname, './assets/scss/professionals/professionals.scss'), 21 | ]); 22 | 23 | const projectConfig = Encore.getWebpackConfig(); 24 | module.exports = [ eZConfig, ...customConfigs, projectConfig ]; 25 | -------------------------------------------------------------------------------- /tests/fixtures/testRenderElementsResult_7.xml: -------------------------------------------------------------------------------- 1 |
2 |

Element 1 - Paragraph 1

3 |

Element 2 - header 1

4 |

Element 3 - Paragraph 2

5 | 6 | 7 |
8 | 9 | 10 |
11 | 12 | 13 |
14 | 15 | 16 |

Paragraph 3

17 | 18 | 19 |
20 | 21 | 22 |
23 | 24 | 25 |
26 | 27 | 28 |

Paragraph 4

29 | -------------------------------------------------------------------------------- /src/Layout/JSRenderer.php: -------------------------------------------------------------------------------- 1 | %s'; 17 | 18 | /** 19 | * @inheritDoc 20 | * 21 | * @throws \eZ\Publish\API\Repository\Exceptions\NotFoundException 22 | * @throws \eZ\Publish\API\Repository\Exceptions\UnauthorizedException 23 | */ 24 | public function render(?int $contentId = null): string 25 | { 26 | $jsText = $this->contentHelper->getContentFieldValue($contentId, self::JS_FIELD_NAME); 27 | 28 | return $jsText ? sprintf(self::JS_TAG, $jsText) : ''; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/Layout/CSSRenderer.php: -------------------------------------------------------------------------------- 1 | %s'; 17 | 18 | /** 19 | * @inheritDoc 20 | * 21 | * @throws \eZ\Publish\API\Repository\Exceptions\NotFoundException 22 | * @throws \eZ\Publish\API\Repository\Exceptions\UnauthorizedException 23 | */ 24 | public function render(?int $contentId = null): string 25 | { 26 | $cssText = $this->contentHelper->getContentFieldValue($contentId, self::CSS_FIELD_NAME); 27 | 28 | return $cssText ? sprintf(self::CSS_TAG, $cssText) : ''; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /config/bootstrap.php: -------------------------------------------------------------------------------- 1 | =1.2) 9 | if (is_array($env = @include dirname(__DIR__).'/.env.local.php')) { 10 | $_SERVER += $env; 11 | $_ENV += $env; 12 | } elseif (!class_exists(Dotenv::class)) { 13 | throw new RuntimeException('Please run "composer require symfony/dotenv" to load the ".env" files configuring the application.'); 14 | } else { 15 | // load all the .env files 16 | (new Dotenv())->loadEnv(dirname(__DIR__).'/.env'); 17 | } 18 | 19 | $_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = ($_SERVER['APP_ENV'] ?? $_ENV['APP_ENV'] ?? null) ?: 'dev'; 20 | $_SERVER['APP_DEBUG'] = $_SERVER['APP_DEBUG'] ?? $_ENV['APP_DEBUG'] ?? 'prod' !== $_SERVER['APP_ENV']; 21 | $_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = (int) $_SERVER['APP_DEBUG'] || filter_var($_SERVER['APP_DEBUG'], FILTER_VALIDATE_BOOLEAN) ? '1' : '0'; 22 | -------------------------------------------------------------------------------- /doc/nginx/ez_params.d/ez_rewrite_params: -------------------------------------------------------------------------------- 1 | rewrite "^/var/([^/]+/)?storage/images(-versioned)?/(.*)" "/var/$1storage/images$2/$3" break; 2 | 3 | # Makes it possible to place your favicon at the root of your 4 | # eZ Platform instance. It will then be served directly. 5 | rewrite "^/favicon\.ico" "/favicon.ico" break; 6 | 7 | # Give direct access to robots.txt for use by crawlers (Google, 8 | # Bing, Spammers..) 9 | rewrite "^/robots\.txt" "/robots.txt" break; 10 | 11 | # Platform for Privacy Preferences Project ( P3P ) related files 12 | # for Internet Explorer 13 | # More info here : http://en.wikipedia.org/wiki/P3p 14 | rewrite "^/w3c/p3p\.xml" "/w3c/p3p.xml" break; 15 | 16 | # Following rule is needed to correctly display bundle and project assets 17 | rewrite "^/bundles/(.*)" "/bundles/$1" break; 18 | rewrite "^/assets/(.*)" "/assets/$1" break; 19 | 20 | # Prevent access to website with direct usage of index.php in URL 21 | if ($request_uri ~ "^/([^/]+/)?index\.php([/?#]|$)") { 22 | return 404; 23 | } 24 | 25 | rewrite "^(.*)$" "/index.php$1" last; 26 | 27 | -------------------------------------------------------------------------------- /bin/.travis/prepare_system.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Script to do tasks before install, can install system packages / software 4 | ## See http://about.travis-ci.org/docs/user/build-configuration/ 5 | ## 6 | ## @todo Initial setup (before_install+before_scripts) currently takes about 3 minutes, 7 | ## can be reduced if needed by using parallel download techniques as found in: 8 | ## https://github.com/facebook/hiphop-php/commit/4add8586c5d9e4eee20fe15ccd78db9e9c6b56aa 9 | ## https://github.com/facebook/hiphop-php/commit/0b2dfdf4492eb06a125b068e939d092ec0588e5c 10 | 11 | ./bin/.travis/disable_xdebug.sh 12 | 13 | # Remove php memory limit 14 | echo 'memory_limit = -1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini 15 | 16 | # Install needed packages 17 | echo "> Installing needed packages"; 18 | sudo apt-get update 19 | sudo apt-get install -q -y --force-yes apache2 libapache2-mod-fastcgi 20 | 21 | # Http Server 22 | echo "> Configure apache server" 23 | ./bin/.travis/configure_apache2.sh 24 | 25 | ./bin/.travis/configure_mysql.sh 26 | -------------------------------------------------------------------------------- /config/packages/prod/doctrine.yaml: -------------------------------------------------------------------------------- 1 | doctrine: 2 | orm: 3 | auto_generate_proxy_classes: false 4 | metadata_cache_driver: 5 | type: service 6 | id: doctrine.system_cache_provider 7 | query_cache_driver: 8 | type: service 9 | id: doctrine.system_cache_provider 10 | result_cache_driver: 11 | type: service 12 | id: doctrine.result_cache_provider 13 | 14 | services: 15 | doctrine.result_cache_provider: 16 | class: Symfony\Component\Cache\DoctrineProvider 17 | public: false 18 | arguments: 19 | - '@doctrine.result_cache_pool' 20 | doctrine.system_cache_provider: 21 | class: Symfony\Component\Cache\DoctrineProvider 22 | public: false 23 | arguments: 24 | - '@doctrine.system_cache_pool' 25 | 26 | framework: 27 | cache: 28 | pools: 29 | doctrine.result_cache_pool: 30 | adapter: cache.app 31 | doctrine.system_cache_pool: 32 | adapter: cache.system 33 | -------------------------------------------------------------------------------- /doc/docker/Dockerfile-distribution: -------------------------------------------------------------------------------- 1 | # Note : if you set the environment variable COMPOSE_PROJECT_NAME to a non-default value, you'll need to set the 2 | # DISTRIBUTION_IMAGE build arg too (for instance docker-compose build --no-cache --build-arg DISTRIBUTION_IMAGE=customprojectname_app distribution) 3 | ARG DISTRIBUTION_IMAGE=docker_app 4 | ARG PHP_IMAGE=ezsystems/php:7.3-v1 5 | FROM ${DISTRIBUTION_IMAGE} as distrofiles 6 | 7 | FROM ${PHP_IMAGE}-node as builder 8 | 9 | COPY --from=distrofiles /var/www /var/www 10 | 11 | ENV GOOGLE_TRANSLATE_API_KEY=MustBeSetInOrderToDumpAssetsOfEzPlatformAutomatedTranslationBundle 12 | 13 | RUN composer config extra.symfony-assets-install hard 14 | RUN composer run-script post-install-cmd --no-interaction 15 | 16 | RUN rm -Rf /var/www/var/cache/*/* 17 | 18 | FROM busybox 19 | 20 | COPY --from=builder /var/www /var/www 21 | 22 | WORKDIR /var/www 23 | 24 | # Fix permissions for www-data 25 | RUN chown -R www-data:www-data var \ 26 | && find var -type d -print0 | xargs -0 chmod -R 775 \ 27 | && find var -type f -print0 | xargs -0 chmod -R 664 28 | 29 | VOLUME ["/var/www"] 30 | -------------------------------------------------------------------------------- /src/Layout/AbstractRenderer.php: -------------------------------------------------------------------------------- 1 | locator = $locator; 26 | $this->contentHelper = $locator->get(ContentHelper::class); 27 | } 28 | 29 | /** 30 | * @inheritDoc 31 | */ 32 | public static function getSubscribedServices(): array 33 | { 34 | return [ 35 | ContentHelper::class 36 | ]; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /config/packages/doctrine.yaml: -------------------------------------------------------------------------------- 1 | parameters: 2 | # Adds a fallback DATABASE_URL if the env var is not set. 3 | # This allows you to run cache:warmup even if your 4 | # environment variables are not available yet. 5 | # You should not need to change this value. 6 | env(DATABASE_URL): '' 7 | env(DATABASE_DRIVER): '' 8 | database_driver: '%env(DATABASE_DRIVER)%' 9 | 10 | doctrine: 11 | dbal: 12 | # configure these for your database server 13 | driver: '%database_driver%' 14 | charset: '%database_charset%' 15 | default_table_options: 16 | charset: '%database_charset%' 17 | collate: '%database_collation%' 18 | url: '%env(resolve:DATABASE_URL)%' 19 | orm: 20 | auto_generate_proxy_classes: true 21 | naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware 22 | auto_mapping: true 23 | mappings: 24 | App: 25 | is_bundle: false 26 | type: annotation 27 | dir: '%kernel.project_dir%/src/Entity' 28 | prefix: 'App\Entity' 29 | alias: App 30 | -------------------------------------------------------------------------------- /config/packages/image_variations.yml: -------------------------------------------------------------------------------- 1 | ezpublish: 2 | system: 3 | default: 4 | image_variations: 5 | article_full_width: 6 | reference: null 7 | filters: 8 | - { name: geometry/scaledownonly, params: [970, 600] } 9 | 10 | search_result_item: 11 | reference: null 12 | filters: 13 | - {name: geometry/scaleexact, params: [125, 125]} 14 | 15 | search_result_item_large: 16 | reference: null 17 | filters: 18 | - {name: geometry/scaleexact, params: [505, 400]} 19 | 20 | product_large: 21 | reference: null 22 | filters: 23 | - {name: geometry/scalewidth, params: [665]} 24 | 25 | product_card: 26 | reference: null 27 | filters: 28 | - {name: geometry/scalewidth, params: [281]} 29 | - {name: geometry/crop, params: [281, 181, 0, 0]} 30 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | ### IDE files 2 | .idea/ 3 | 4 | ### Composer files 5 | auth.json 6 | 7 | ### GIT files 8 | .git 9 | # Skipped as it makes build very slow and since it is needed by composer when working on dev branches 10 | #vendor/*/*/.git 11 | 12 | # Cache, session files and logs (Symfony4) 13 | var/cache/* 14 | var/log/* 15 | var/sessions/* 16 | !var/cache/.gitkeep 17 | !var/log/.gitkeep 18 | !var/sessions/.gitkeep 19 | 20 | # Parameters (should be regenerated in container) 21 | app/config/parameters.yml 22 | 23 | # Managed by Composer 24 | app/bootstrap.php.cache 25 | var/bootstrap.php.cache 26 | #bin/* 27 | #!bin/console 28 | 29 | # Disabled as this is needed for dev setups unless we change dev to execute composer install automatically 30 | #vendor/ 31 | 32 | # Assets and user uploads 33 | public/bundles/ 34 | public/css/ 35 | public/js/ 36 | public/uploads/ 37 | public/fonts/ 38 | 39 | # Assets managed by Bower 40 | public/assets/vendor/ 41 | 42 | # PHPUnit 43 | app/phpunit.xml 44 | phpunit.xml 45 | 46 | # Build data 47 | build/ 48 | 49 | # Composer PHAR 50 | composer.phar 51 | 52 | # Backup entities generated with doctrine:generate:entities command 53 | */Entity/*~ 54 | 55 | -------------------------------------------------------------------------------- /config/packages/cache_pool/cache.tagaware.filesystem.yaml: -------------------------------------------------------------------------------- 1 | # Optimized File cache adapter (from: https://github.com/ezsystems/symfony-tools) 2 | # 3 | # Loaded by default, for use on single server setups. 4 | parameters: 5 | cache_namespace: ezp 6 | 7 | services: 8 | cache.tagaware.filesystem: 9 | public: true 10 | class: Symfony\Component\Cache\Adapter\FilesystemTagAwareAdapter 11 | parent: cache.adapter.filesystem 12 | tags: 13 | - name: cache.pool 14 | clearer: cache.app_clearer 15 | # Cache namespace prefix overriding the one used by Symfony by default 16 | # This makes sure cache is reliably shared across whole cluster and all Symfony env's 17 | # Can be used for blue/green deployment strategies when changes affect content cache. 18 | # For multi db setup adapt this to be unique per pool (one pool per database) 19 | # If you prefer default behaviour set this to null or comment out, and consider for instance: 20 | # https://symfony.com/doc/current/reference/configuration/framework.html#prefix-seed 21 | namespace: '%cache_namespace%' 22 | -------------------------------------------------------------------------------- /bin/.ci/prepare_archive.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Script used to prepare for eZ Platform/Enterprise archives 3 | # 4 | # Pre-requirement for LTS (EE) archives: 5 | # auth.json needs to be placed in either root directory or COMPOSER_HOME. 6 | # If auth.json is placed in COMPOSER_HOME, it needs to be for same user as the one executing script. 7 | 8 | 9 | # Install all composer deps non-interactivly, skip scripts as they will be executed install 10 | composer install --no-interaction --prefer-dist --no-dev --no-scripts --optimize-autoloader 11 | 12 | # Rename .gitignore to make it optional as it is optimized for kernel development and not project development 13 | mv .gitignore .gitignore.dist 14 | 15 | # Archive: Remove cache (wrong paths), logs (generated by composer call above) & zeta tests (too big) 16 | rm -Rf var/cache/*/* var/log/* vendor/zetacomponents/*/tests 17 | 18 | # Remove .git folder from archives 19 | rm -Rf .git/ 20 | 21 | echo << EOF 22 | Ready to archive the result 23 | 24 | Assuming current folder is build/ezplatform this can be accomplished in the following way: 25 | cd ../.. 26 | tar czf dist/ezplatform-\$version-ee-gpl-full.tar.gz --directory=build ezplatform 27 | EOF 28 | -------------------------------------------------------------------------------- /config/services/controllers.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | # default configuration for services in *this* file 3 | _defaults: 4 | # automatically injects dependencies in your services 5 | autowire: true 6 | # automatically registers your services as commands, event subscribers, etc. 7 | autoconfigure: true 8 | # this means you cannot fetch services directly from the container via $container->get() 9 | # if you need to do this, you can override this setting on individual services 10 | 11 | App\Controller\: 12 | resource: '../../src/Controller/*' 13 | tags: 14 | - controller.service_arguments 15 | 16 | App\Controller\MenuController: 17 | public: true 18 | arguments: 19 | $topMenuParentLocationId: '%app.top_menu.parent_location_id%' 20 | $topMenuContentTypeIdentifier: '%app.top_menu.included_content_type_identifier%' 21 | 22 | App\Controller\ContactFormController: 23 | public: true 24 | 25 | App\Controller\PaginationQueryController: 26 | public: true 27 | arguments: 28 | $contentViewQueryTypeMapper: '@ezpublish.query_type_content_view_mapper' 29 | -------------------------------------------------------------------------------- /config/packages/dfs/dfs.yaml: -------------------------------------------------------------------------------- 1 | # new doctrine connection for the dfs legacy_dfs_cluster metadata handler. 2 | doctrine: 3 | dbal: 4 | connections: 5 | dfs: 6 | driver: "%dfs_database_driver%" 7 | host: "%dfs_database_host%" 8 | port: "%dfs_database_port%" 9 | user: "%dfs_database_user%" 10 | password: "%dfs_database_password%" 11 | dbname: "%dfs_database_name%" 12 | charset: utf8mb4 13 | 14 | # define the flysystem handler 15 | oneup_flysystem: 16 | adapters: 17 | nfs_adapter: 18 | local: 19 | directory: "/%dfs_nfs_path%/$var_dir$/$storage_dir$" 20 | 21 | # define the ez handlers 22 | ez_io: 23 | binarydata_handlers: 24 | nfs: 25 | flysystem: 26 | adapter: nfs_adapter 27 | metadata_handlers: 28 | dfs: 29 | legacy_dfs_cluster: 30 | connection: doctrine.dbal.dfs_connection 31 | 32 | # set the application handlers 33 | ezplatform: 34 | system: 35 | default: 36 | io: 37 | metadata_handler: dfs 38 | binarydata_handler: nfs 39 | -------------------------------------------------------------------------------- /.php_cs: -------------------------------------------------------------------------------- 1 | setRules([ 5 | '@Symfony' => true, 6 | '@Symfony:risky' => true, 7 | 'concat_space' => ['spacing' => 'one'], 8 | 'array_syntax' => false, 9 | 'simplified_null_return' => false, 10 | 'phpdoc_align' => false, 11 | 'phpdoc_separation' => false, 12 | 'phpdoc_to_comment' => false, 13 | 'cast_spaces' => false, 14 | 'blank_line_after_opening_tag' => false, 15 | 'single_blank_line_before_namespace' => false, 16 | 'phpdoc_annotation_without_dot' => false, 17 | 'phpdoc_no_alias_tag' => false, 18 | 'space_after_semicolon' => false, 19 | 'yoda_style' => false, 20 | 'no_break_comment' => false, 21 | ]) 22 | ->setRiskyAllowed(true) 23 | ->setFinder( 24 | PhpCsFixer\Finder::create() 25 | ->in(__DIR__) 26 | ->exclude([ 27 | 'vendor', 28 | 'bin/.ci', 29 | 'bin/.travis', 30 | 'doc', 31 | 'app/cache', 32 | 'var/cache', 33 | 'ezpublish_legacy', 34 | ]) 35 | ->files()->name('*.php') 36 | ) 37 | ; 38 | -------------------------------------------------------------------------------- /bin/.travis/configure_apache2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # vhost & fastcgi setup 4 | ./bin/vhost.sh \ 5 | --basedir=$TRAVIS_BUILD_DIR \ 6 | --sf-env=behat \ 7 | --sf-debug=1 \ 8 | --template-file=doc/apache2/vhost.template \ 9 | | sudo tee /etc/apache2/sites-available/behat > /dev/null 10 | 11 | sudo cp bin/.travis/apache2/php5-fcgi /etc/apache2/conf.d/php5-fcgi 12 | 13 | # modules enabling 14 | sudo a2enmod rewrite actions fastcgi alias 15 | 16 | # sites disabling & enabling 17 | sudo a2dissite default 18 | sudo a2ensite behat 19 | 20 | # FPM 21 | USER=$(whoami) 22 | 23 | sudo echo " 24 | [global] 25 | 26 | [www] 27 | user = $USER 28 | group = $USER 29 | listen = 127.0.0.1:9000 30 | pm = static 31 | pm.max_children = 2 32 | 33 | php_admin_value[memory_limit] = 256M 34 | " > ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf 35 | 36 | sudo echo 'date.timezone = "Europe/Oslo"' >> ~/.phpenv/versions/$TRAVIS_PHP_VERSION/etc/conf.d/travis.ini 37 | sudo echo "cgi.fix_pathinfo = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini 38 | 39 | # restart 40 | echo "> restart FPM" 41 | sudo ~/.phpenv/versions/$(phpenv version-name)/sbin/php-fpm 42 | echo "> restart apache2" 43 | sudo service apache2 restart 44 | -------------------------------------------------------------------------------- /config/packages/ezplatform_http_cache.yaml: -------------------------------------------------------------------------------- 1 | ## FOSHttpCache Configuration 2 | fos_http_cache: 3 | cache_control: 4 | rules: 5 | # Make sure already cacheable (fresh) responses from eZ Platform which are errors/redirect gets lower ttl (then default_ttl) 6 | - 7 | match: 8 | match_response: "response.isFresh() && ( response.isServerError() || response.isClientError() || response.isRedirect() )" 9 | headers: 10 | overwrite: true 11 | cache_control: 12 | max_age: 5 13 | s_maxage: 20 14 | # Example of performance tuning, force TTL on 404 pages to avoid crawlers / ... taking to much load 15 | # Should not be set to high, as cached 404's can cause issues for future routes, url aliases, wildcards, .. 16 | - 17 | match: 18 | match_response: "!response.isFresh() && response.isNotFound()" 19 | headers: 20 | overwrite: true 21 | cache_control: 22 | public: true 23 | max_age: 0 24 | s_maxage: 20 25 | -------------------------------------------------------------------------------- /src/Pagerfanta/MaisonTemplate.php: -------------------------------------------------------------------------------- 1 | trans( 24 | /** @Desc("Next") */ 25 | 'pagination.next_message', 26 | [], 27 | 'pagination' 28 | ); 29 | 30 | $this->setOptions([ 31 | 'prev_message' => 'arrow_back_ios', 32 | 'next_message' => '' . $nextMessage . 'arrow_forward_ios', 33 | ]); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /translations/messages.en.yml: -------------------------------------------------------------------------------- 1 | 'About our store': 'About our store' 2 | 'Address': 'Address' 3 | 'All Maison Stores': 'All Maison Stores' 4 | 'Apply Now': 'Apply Now' 5 | 'Become a Maison Pro': 'Become a Maison Pro' 6 | 'Click here to view Maison licensing information': 'Click here to view Maison licensing information' 7 | 'delivery, assembling, painting, renovation, etc.': 'delivery, assembling, painting, renovation, etc.' 8 | 'Find a professional to help you with': 'Find a professional to help you with' 9 | 'Find Professionals': 'Find Professionals' 10 | 'Find a inspirations and ideas to help you with': 'Find a inspirations and ideas to help you with' 11 | 'Find Inspirations': 'Find Inspirations' 12 | 'Floors': 'Floors' 13 | 'Phone': 'Phone' 14 | 'Professionals': 'Professionals' 15 | 'Products': 'Products' 16 | 'Send an Email': 'Send an Email' 17 | 'SF': 'SF' 18 | 'Store Locators': 'Store Locators' 19 | 'Store details': 'Store details' 20 | 'Store Facts': 'Store Facts' 21 | 'Store Categories': 'Store Categories' 22 | 'Work Hours': 'Work Hours' 23 | 'Trending In Your Store': 'Trending In Your Store' 24 | 'We''re always looking for outstanding local contractors!': 'We''re always looking for outstanding local contractors!' 25 | 'Visit store page': 'Visit store page' 26 | -------------------------------------------------------------------------------- /assets/scss/_buttons.scss: -------------------------------------------------------------------------------- 1 | $btn: '.btn'; 2 | $dropdown: '.dropdown'; 3 | 4 | #{($btn)} { 5 | &--sm { 6 | font-size: 12px; 7 | line-height: 16px; 8 | padding: 6px 16px; 9 | border-radius: 4px; 10 | } 11 | &--md { 12 | 13 | } 14 | &--lg { 15 | font-size: 16px; 16 | line-height: 21px; 17 | font-weight: 700; 18 | padding: 15px 40px; 19 | border-radius: 25px; 20 | } 21 | &--white { 22 | background-color: $white; 23 | color: $grey-light; 24 | border: 1px solid #cccccc; 25 | 26 | &:hover { 27 | background-color: $white-whisper; 28 | } 29 | } 30 | &--blue { 31 | background-color: $blue-lighter; 32 | color: $white; 33 | 34 | &:hover { 35 | background-color: $blue-light; 36 | color: $white; 37 | } 38 | } 39 | } 40 | 41 | #{($dropdown)} { 42 | &.show { 43 | #{($dropdown)}-toggle { 44 | color: $blue-light; 45 | } 46 | } 47 | 48 | &-toggle { 49 | border: none; 50 | border-radius: 0; 51 | 52 | &:focus { 53 | outline: none; 54 | } 55 | &:hover { 56 | color: $blue-light; 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /ez.webpack.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | const bundles = require('./var/encore/ez.config.js'); 3 | const eZConfigManager = require('./ez.webpack.config.manager.js'); 4 | const configManagers = require('./var/encore/ez.config.manager.js'); 5 | 6 | module.exports = (Encore) => { 7 | Encore.setOutputPath('public/assets/ezplatform/build') 8 | .setPublicPath('/assets/ezplatform/build') 9 | .addExternals({ 10 | react: 'React', 11 | 'react-dom': 'ReactDOM', 12 | jquery: 'jQuery', 13 | moment: 'moment', 14 | 'popper.js': 'Popper', 15 | alloyeditor: 'AlloyEditor', 16 | 'prop-types': 'PropTypes', 17 | }) 18 | .enableSassLoader() 19 | .enableReactPreset() 20 | .enableSingleRuntimeChunk(); 21 | 22 | bundles.forEach((configPath) => { 23 | const addEntries = require(configPath); 24 | 25 | addEntries(Encore); 26 | }); 27 | 28 | const eZConfig = Encore.getWebpackConfig(); 29 | 30 | eZConfig.name = 'ezplatform'; 31 | 32 | configManagers.forEach((configManagerPath) => { 33 | const configManager = require(configManagerPath); 34 | 35 | configManager(eZConfig, eZConfigManager); 36 | }); 37 | 38 | return eZConfig; 39 | }; 40 | -------------------------------------------------------------------------------- /bin/.travis/setup_from_external_repo.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # This script is meant to be reused from other repos that needs to run behat tests. 4 | # 5 | # Example use: 6 | # 7 | # before_install: 8 | # - git fetch --unshallow && git checkout -b tmp_travis_branch 9 | # - export BRANCH_BUILD_DIR=$TRAVIS_BUILD_DIR 10 | # - export TRAVIS_BUILD_DIR="$HOME/build/ezplatform" 11 | # - cd "$HOME/build" 12 | # - git clone --depth 1 --single-branch --branch master https://github.com/ezsystems/ezplatform.git 13 | # - cd ezplatform 14 | # - ./bin/.travis/setup_from_external_repo.sh $BRANCH_BUILD_DIR "ezsystems/demobundle:dev-tmp_travis_branch" 15 | 16 | REPO_DIR=$1 17 | COMPOSER_REQUIRE=${@:2} 18 | 19 | ./bin/.travis/prepare_system.sh 20 | ./bin/.travis/prepare_selenium2.sh 21 | 22 | echo "> Modify composer.json to point to local checkout" 23 | sed -i '$d' composer.json 24 | echo ', "repositories": [{"type":"git","url":"'$REPO_DIR'"}]}' >> composer.json 25 | 26 | if [ -n "$COMPOSER_REQUIRE" ]; then 27 | echo "> Updating packages ($COMPOSER_REQUIRE)" 28 | composer require --no-update "$COMPOSER_REQUIRE" 29 | fi 30 | 31 | cat composer.json 32 | ./bin/.travis/prepare_ezpublish.sh 33 | 34 | echo "> Warm up cache, using curl to make sure everything is warmed up, incl class, http & spi cache" 35 | curl -sSLI "http://localhost" 36 | -------------------------------------------------------------------------------- /templates/themes/professionals/layout/header.html.twig: -------------------------------------------------------------------------------- 1 |
2 | 24 |
25 | -------------------------------------------------------------------------------- /upgrade/db/mysql/ezplatform-2.5.latest-to-3.0.0.sql: -------------------------------------------------------------------------------- 1 | -- Product name migration 2 | START TRANSACTION; 3 | DELETE FROM ezsite_data WHERE name IN ('ezpublish-version', 'ezplatform-release'); 4 | INSERT INTO ezsite_data (name, value) VALUES ('ezplatform-release', '3.0.0'); 5 | COMMIT; 6 | 7 | -- 8 | ALTER TABLE ezcontentclass_attribute MODIFY data_text1 VARCHAR(255); 9 | -- 10 | 11 | -- 12 | ALTER TABLE ezcontentclass_attribute ADD COLUMN is_thumbnail TINYINT(1) NOT NULL DEFAULT '0'; 13 | -- 14 | 15 | -- EZP-31471: Keywords versioning 16 | ALTER TABLE `ezkeyword_attribute_link` 17 | ADD COLUMN `version` INT(11) NOT NULL, 18 | ADD KEY `ezkeyword_attr_link_oaid_ver` (`objectattribute_id`, `version`); 19 | 20 | UPDATE `ezkeyword_attribute_link` SET `version` = ( 21 | SELECT `current_version` 22 | FROM `ezcontentobject_attribute` AS `cattr` 23 | JOIN `ezcontentobject` AS `contentobj` 24 | ON `cattr`.`contentobject_id` = `contentobj`.`id` 25 | AND `cattr`.`version` = `contentobj`.`current_version` 26 | WHERE `cattr`.`id` = `ezkeyword_attribute_link`.`objectattribute_id` 27 | ); 28 | -- 29 | 30 | -- EZP-31079: Provided default value for ezuser login pattern -- 31 | UPDATE `ezcontentclass_attribute` SET `data_text2` = '^[^@]+$' 32 | WHERE `data_type_string` = 'ezuser' 33 | AND `data_text2` IS NULL; 34 | -- 35 | -------------------------------------------------------------------------------- /doc/platformsh/README.md: -------------------------------------------------------------------------------- 1 | # Use eZ Platform on Platform.sh 2 | 3 | ## What is Platform.sh? 4 | *Platform.sh* is a continuous deployment cloud hosting solution which can replicate a live production setup in seconds and create byte-level clones of throwaway dev and staging environments, which makes human testing and validation easy. 5 | 6 | ## Install 7 | For installation instructions, see [INSTALL.md](https://github.com/ezsystems/ezplatform/blob/master/doc/platformsh/INSTALL.md). 8 | 9 | ## Platform.sh configuration files 10 | You need to tweak these files before pushing to platform.sh setup: 11 | - [.platform.app.yaml](https://docs.platform.sh/configuration/app-containers.html) controls your application, including dependencies, build and deployment. 12 | - The `.platform` directory contains Platform.sh service and route settings. 13 | - `app/config/env/platformsh.php` ensures that database, cache, and sessions provided by or configured for Platform.sh is applied in eZ Platform. You should normally not need to change this, but there may be special cases where it is required. 14 | 15 | There are inline comments in these files for choices you should consider, and as stated in [INSTALL.md](https://github.com/ezsystems/ezplatform/blob/master/doc/platformsh/INSTALL.md) 16 | FAQ there are also specific hints if you plan to use Platform.sh Enterprise Dedicated Cluster setup. 17 | -------------------------------------------------------------------------------- /bin/console: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | getParameterOption(['--env', '-e'], null, true)) { 20 | putenv('APP_ENV='.$_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = $env); 21 | } 22 | 23 | if ($input->hasParameterOption('--no-debug', true)) { 24 | putenv('APP_DEBUG='.$_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = '0'); 25 | } 26 | 27 | require dirname(__DIR__).'/config/bootstrap.php'; 28 | 29 | if ($_SERVER['APP_DEBUG']) { 30 | umask(0000); 31 | if (class_exists(Debug::class)) { 32 | Debug::enable(); 33 | } 34 | } 35 | 36 | $kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']); 37 | $application = new Application($kernel); 38 | $application->run($input); 39 | -------------------------------------------------------------------------------- /ez.webpack.config.manager.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs'); 2 | const findItems = (eZConfig, entryName) => { 3 | const items = eZConfig.entry[entryName]; 4 | 5 | if (!items) { 6 | throw new Error(`Couldn't find entry with name: "${entryName}". Please check if there is a typo in the name.`); 7 | } 8 | 9 | return items; 10 | }; 11 | const replace = ({ eZConfig, entryName, itemToReplace, newItem }) => { 12 | const items = findItems(eZConfig, entryName); 13 | const indexToReplace = items.indexOf(fs.realpathSync(itemToReplace)); 14 | 15 | if (indexToReplace < 0) { 16 | throw new Error(`Couldn't find item "${itemToReplace}" in entry "${entryName}". Please check if there is a typo in the name.`); 17 | } 18 | 19 | items[indexToReplace] = newItem; 20 | }; 21 | const remove = ({ eZConfig, entryName, itemsToRemove }) => { 22 | const items = findItems(eZConfig, entryName); 23 | const realPathItemsToRemove = itemsToRemove.map((item) => fs.realpathSync(item)); 24 | 25 | eZConfig.entry[entryName] = items.filter((item) => !realPathItemsToRemove.includes(item)); 26 | }; 27 | const add = ({ eZConfig, entryName, newItems }) => { 28 | const items = findItems(eZConfig, entryName); 29 | 30 | eZConfig.entry[entryName] = [...items, ...newItems]; 31 | }; 32 | 33 | module.exports = { 34 | replace, 35 | remove, 36 | add 37 | }; 38 | -------------------------------------------------------------------------------- /templates/themes/maison/layout/footer.html.twig: -------------------------------------------------------------------------------- 1 | 30 | -------------------------------------------------------------------------------- /upgrade/db/postgresql/ezplatform-2.5.latest-to-3.0.0.sql: -------------------------------------------------------------------------------- 1 | -- Product name migration 2 | START TRANSACTION; 3 | DELETE FROM ezsite_data WHERE name IN ('ezpublish-version', 'ezplatform-release'); 4 | INSERT INTO ezsite_data (name, value) VALUES ('ezplatform-release', '3.0.0'); 5 | COMMIT; 6 | 7 | -- 8 | ALTER TABLE ezcontentclass_attribute ALTER COLUMN data_text1 TYPE varchar(255); 9 | -- 10 | 11 | -- 12 | ALTER TABLE ezcontentclass_attribute ADD is_thumbnail boolean DEFAULT false NOT NULL; 13 | -- 14 | 15 | -- EZP-31471: Keywords versioning 16 | ALTER TABLE ezkeyword_attribute_link ADD COLUMN version INT; 17 | 18 | UPDATE ezkeyword_attribute_link SET "version" = ( 19 | SELECT current_version 20 | FROM ezcontentobject_attribute AS cattr 21 | JOIN ezcontentobject AS contentobj 22 | ON cattr.contentobject_id = contentobj.id 23 | AND cattr.version = contentobj.current_version 24 | WHERE cattr.id = ezkeyword_attribute_link.objectattribute_id 25 | ); 26 | 27 | ALTER TABLE ezkeyword_attribute_link ALTER COLUMN version SET NOT NULL; 28 | 29 | CREATE INDEX ezkeyword_attr_link_oaid_ver ON ezkeyword_attribute_link (objectattribute_id, version); 30 | -- 31 | 32 | -- EZP-31079: Provided default value for ezuser login pattern -- 33 | UPDATE "ezcontentclass_attribute" SET "data_text2" = '^[^@]+$' 34 | WHERE "data_type_string" = 'ezuser' 35 | AND "data_text2" IS NULL; 36 | -- 37 | -------------------------------------------------------------------------------- /config/packages/cache_pool/cache.memcached.yaml: -------------------------------------------------------------------------------- 1 | # Reusable service for memcache cache for use in generic.php and plaformsh.php on demand 2 | # 3 | # For further reading on setup with eZ Platform and Memcached: 4 | # https://doc.ezplatform.com/en/latest/guide/persistence_cache/#memcached 5 | parameters: 6 | cache_namespace: ezp 7 | 8 | services: 9 | cache.memcached: 10 | public: true 11 | parent: cache.adapter.memcached 12 | tags: 13 | - name: cache.pool 14 | clearer: cache.app_clearer 15 | # Example from vendor/symfony/symfony/src/Symfony/Component/Cache/Traits/MemcachedTrait.php: 16 | # memcached://user:pass@localhost?weight=33' 17 | provider: 'memcached://%cache_dsn%' 18 | # Cache namespace prefix overriding the one used by Symfony globally 19 | # This makes sure cache is reliably shared across whole cluster and all Symfony env's 20 | # Can be used for blue/green deployment strategies when changes affect content cache. 21 | # For multi db setup adapt this to be unique per pool (one pool per database) 22 | # If you prefer default behaviour set this to null or comment out, and consider for instance: 23 | # https://symfony.com/doc/current/reference/configuration/framework.html#prefix-seed 24 | namespace: '%cache_namespace%' 25 | -------------------------------------------------------------------------------- /tests/Behat/DemoContext.php: -------------------------------------------------------------------------------- 1 | kernel = $kernel; 29 | } 30 | 31 | /** 32 | * @When a demo scenario sends a request to :path 33 | */ 34 | public function aDemoScenarioSendsARequestTo(string $path): void 35 | { 36 | $this->response = $this->kernel->handle(Request::create($path, 'GET')); 37 | } 38 | 39 | /** 40 | * @Then the response should be received 41 | */ 42 | public function theResponseShouldBeReceived(): void 43 | { 44 | if ($this->response === null) { 45 | throw new \RuntimeException('No response received'); 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /assets/scss/maison/_navigation.scss: -------------------------------------------------------------------------------- 1 | .navbar { 2 | &--main-menu { 3 | .nav-item { 4 | &.active { 5 | .nav-link { 6 | color: $blue-lighter; 7 | } 8 | } 9 | &:last-child .nav-link { 10 | padding-right: 0.5em; 11 | } 12 | } 13 | .nav-link { 14 | font-size: 17px; 15 | line-height: 28px; 16 | color: $grey-dark; 17 | font-weight: 500; 18 | padding-left: 1em; 19 | padding-right: 1em; 20 | 21 | &:hover { 22 | color: $blue-lighter; 23 | } 24 | } 25 | } 26 | &--carousel-nav { 27 | max-width: 1072px; 28 | height: 224px; 29 | margin: -130px auto 80px; 30 | padding: 0 48px; 31 | position: relative; 32 | z-index: 2; 33 | background-color: $white; 34 | border-radius: 8px; 35 | } 36 | &--footer-nav { 37 | .navbar-nav { 38 | width: 100%; 39 | justify-content: space-between; 40 | } 41 | .nav-link { 42 | color: $grey-light; 43 | font-weight: 500; 44 | font-size: 16px; 45 | line-height: 23px; 46 | 47 | &:hover { 48 | color: $blue-lighter; 49 | } 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/MigrationVersions/maison.yaml: -------------------------------------------------------------------------------- 1 | # references 2 | - 3 | type: reference 4 | mode: load 5 | file: 'src/MigrationVersions/References/references.yml' 6 | overwrite: true 7 | 8 | ## Maison folder 9 | - 10 | type: content 11 | mode: create 12 | content_type: home 13 | parent_location: reference:ref_location_folder__sites 14 | priority: 0 15 | is_hidden: false 16 | sort_field: path 17 | sort_order: ASC 18 | section: reference:ref_section__standard 19 | lang: eng-GB 20 | owner: 14 21 | always_available: true 22 | attributes: 23 | name: Maison 24 | description: 25 | xml: "\n
\n" 26 | image: null 27 | logo: 28 | destinationContentId: reference:ref_content_image__media__images__logo__maison_logo 29 | alternativeText: '' 30 | css: ~ 31 | js: ~ 32 | references: 33 | - 34 | identifier: ref_location_folder__sites__maison 35 | attribute: location_id 36 | - 37 | identifier: ref_content_folder__sites__maison 38 | attribute: content_id 39 | 40 | - 41 | type: reference 42 | mode: save 43 | file: 'src/MigrationVersions/References/references.yml' 44 | overwrite: true 45 | -------------------------------------------------------------------------------- /doc/docker/varnish.yml: -------------------------------------------------------------------------------- 1 | version: '3.3' 2 | # Simple single server setup for prod 3 | 4 | ## WARNING! 5 | # This service is currently work in progress, is not tested by CI, and thus not guaranteed to work. 6 | # You are however more then welcome to try it out and help make it stable. 7 | 8 | services: 9 | app: 10 | environment: 11 | - APP_HTTP_CACHE=0 12 | - TRUSTED_PROXIES=varnish 13 | - HTTPCACHE_PURGE_SERVER=http://varnish 14 | - HTTPCACHE_PURGE_TYPE=varnish 15 | 16 | varnish: 17 | build: 18 | context: ../../ 19 | dockerfile: doc/docker/Dockerfile-varnish 20 | ports: 21 | - "8081:80" 22 | environment: 23 | - VARNISH_MALLOC_SIZE=256m 24 | depends_on: 25 | - web 26 | - app 27 | networks: 28 | - frontend 29 | - backend 30 | command: ["--acl-add", "app"] 31 | 32 | ## DEBUG?? 33 | # In need of debugging all request going to Varnish, use varnishlog, example: 34 | # docker-compose exec varnish varnishlog -c -i ReqURL,ReqMethod -I ReqHeader:xkey 35 | # Or more relevant only PURGE's with all info: 36 | # docker-compose exec varnish varnishlog -g request -q "ReqMethod eq 'PURGE'" 37 | # 38 | # But before doing that check that http and not local purge client is set: 39 | # docker-compose exec app bin/console --env=dev debug:container ezplatform.http_cache.purge_client_internal 40 | # 41 | # And if in prod make sure you have rebuilt app container on code changes ;) 42 | -------------------------------------------------------------------------------- /doc/docker/Dockerfile-solr: -------------------------------------------------------------------------------- 1 | FROM solr:6-alpine 2 | 3 | # Copy solr config from the version used by eZ Platform 4 | COPY vendor/ezsystems/ezplatform-solr-search-engine/lib/Resources/config/solr/ /opt/solr/server/tmp 5 | 6 | # Prepare config 7 | RUN mkdir -p /opt/solr/server/ez/template \ 8 | && cp -R /opt/solr/server/tmp/* /opt/solr/server/ez/template \ 9 | && cp /opt/solr/server/solr/configsets/basic_configs/conf/currency.xml /opt/solr/server/ez/template \ 10 | && cp /opt/solr/server/solr/configsets/basic_configs/conf/solrconfig.xml /opt/solr/server/ez/template \ 11 | && cp /opt/solr/server/solr/configsets/basic_configs/conf/stopwords.txt /opt/solr/server/ez/template \ 12 | && cp /opt/solr/server/solr/configsets/basic_configs/conf/synonyms.txt /opt/solr/server/ez/template \ 13 | && cp /opt/solr/server/solr/configsets/basic_configs/conf/elevate.xml /opt/solr/server/ez/template \ 14 | && cp /opt/solr/server/solr/solr.xml /opt/solr/server/ez \ 15 | && sed -i.bak '//,/<\/updateRequestProcessorChain>/d' /opt/solr/server/ez/template/solrconfig.xml \ 16 | && sed -ie 's/${solr.autoSoftCommit.maxTime:-1}/${solr.autoSoftCommit.maxTime:20}/' /opt/solr/server/ez/template/solrconfig.xml 17 | 18 | # Set our core config as home 19 | ENV SOLR_HOME /opt/solr/server/ez 20 | 21 | # Make sure core is created on startup 22 | CMD ["solr-create", "-c", "collection1", "-d", "/opt/solr/server/ez/template"] 23 | -------------------------------------------------------------------------------- /config/packages/buzz.yaml: -------------------------------------------------------------------------------- 1 | # Read more about client options at: https://github.com/kriswallsmith/Buzz/blob/master/doc/client.md 2 | services: 3 | _defaults: 4 | public: false 5 | 6 | # Tell the auto wire system to use "FileGetContents" client as default client. 7 | # Set this to any of the other clients below (e.g. Curl or MultiCurl) to use a different default client. 8 | Buzz\Client\BuzzClientInterface: '@buzz.file_get_contents_client' 9 | 10 | # Clients 11 | buzz.file_get_contents_client: 12 | class: Buzz\Client\FileGetContents 13 | arguments: 14 | - timeout: 10 15 | 16 | buzz.curl_client: 17 | class: Buzz\Client\Curl 18 | arguments: 19 | - timeout: 10 20 | 21 | buzz.multi_curl_client: 22 | class: Buzz\Client\MultiCurl 23 | arguments: 24 | - timeout: 10 25 | 26 | # Browser 27 | Buzz\Browser: 28 | arguments: ['@Buzz\Client\BuzzClientInterface'] 29 | calls: 30 | - ['addMiddleware', ['@buzz.middleware.content_length']] 31 | - ['addMiddleware', ['@buzz.middleware.logger']] 32 | 33 | # Middlewares 34 | buzz.middleware.content_length: 35 | class: Buzz\Middleware\ContentLengthMiddleware 36 | 37 | buzz.middleware.logger: 38 | class: Buzz\Middleware\LoggerMiddleware 39 | arguments: ['@?logger'] 40 | tags: 41 | - { name: monolog.logger, channel: buzz } 42 | -------------------------------------------------------------------------------- /doc/i18n/install_translation_package.md: -------------------------------------------------------------------------------- 1 | # Install new translation package 2 | 3 | ## Introduction 4 | 5 | This documentation is for eZ Platform integrators who realize projects based on eZ Platform. It will present 6 | how to install a new package of translations in your project. 7 | 8 | ## Translation packages per language 9 | 10 | To allow users to install only what they need, we have split every language into a dedicated package. 11 | 12 | All translation packages are published on [ezplatform-i18n organisation on github][ezplatform-i18n-org] 13 | 14 | **Important**: these packages are read only, they must be updated with the [eZ Platform i18n git split command][ezplatform-i18n]. 15 | 16 | ## Install a new language in your project 17 | 18 | If you want to install a new language in your project, you just have to install the corresponding package. 19 | 20 | For example, if you want to translate your application into Portuguese (pt_PT: the only package supported by our QA team ;)), 21 | you just have to run: 22 | 23 | composer require ezplatform-i18n/ezplatform-i18n-pt_pt 24 | 25 | and then clear the cache. 26 | 27 | Now you can reload your eZ Platform administration page which will be translated in Portuguese (if your browser is 28 | configured to pt_PT.) 29 | 30 | [crowdin-ezplatform]: https://crowdin.com/project/ezplatform 31 | [ezplatform-i18n-org]: https://github.com/ezplatform-i18n 32 | [ezplatform-i18n]: https://github.com/ezsystems/ezplatform-i18n 33 | -------------------------------------------------------------------------------- /doc/i18n/translation_workflow.md: -------------------------------------------------------------------------------- 1 | # Translation workflow 2 | 3 | ## Introduction 4 | 5 | eZ Platform is translated into several languages with the help of [Crowdin](http://crowdin.com). 6 | 7 | This documentation presents the overall concept from contribution to distribution for every participant. 8 | 9 | ## Handle translation in your contribution 10 | 11 | This part is for contributors to eZ Platform. It will explain how to format your contribution 12 | to fit in the translation workflow. 13 | 14 | [Handle translation in your contribution](/doc/i18n/handle_translation_in_contribution.md) 15 | 16 | ## Integrate new string to translate 17 | 18 | Then these new strings need to be added to the translation process so they can be translated. 19 | This part is for the eZ Systems team and presents the process of sending the new strings for translation. 20 | 21 | [Integrate new string to translate](/doc/i18n/integrate_new_string_to_translate.md) 22 | 23 | ## Distribute translations 24 | 25 | When translators are done, it's time to integrate their translations and distribute them. 26 | This part is for the eZ Systems team. 27 | 28 | [Distribute translations](/doc/i18n/distribute_translations.md) 29 | 30 | ## Install a translation package 31 | 32 | This documentation is for eZ Platform integrators who realize projects based on eZ Platform. It will present 33 | how to install a new package of translations in your project. 34 | 35 | [Install a translation package](/doc/i18n/install_translation_package.md) 36 | -------------------------------------------------------------------------------- /src/Twig/AppLayoutExtension.php: -------------------------------------------------------------------------------- 1 | renderers = $renderers; 27 | } 28 | 29 | /** 30 | * Returns the name of the extension. 31 | * 32 | * @return string the extension name 33 | */ 34 | public function getName(): string 35 | { 36 | return 'app.layout'; 37 | } 38 | 39 | /** 40 | * Returns a list of functions to add to the existing list. 41 | * 42 | * @return array 43 | */ 44 | public function getFunctions(): array 45 | { 46 | $functions = []; 47 | 48 | foreach ($this->renderers as $key => $renderer) { 49 | $functions[] = new TwigFunction( 50 | 'app_render_' . $key, 51 | [$renderer, self::RENDER_METHOD_NAME] 52 | ); 53 | } 54 | 55 | return $functions; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /config/packages/ezplatform_admin_ui.yaml: -------------------------------------------------------------------------------- 1 | parameters: 2 | # Admin siteaccess group name 3 | admin_group_name: admin_group 4 | 5 | ezplatform: 6 | siteaccess: 7 | list: [admin] 8 | groups: 9 | # WARNING: Do not remove or rename this group. 10 | # It's used to distinguish common siteaccesses from admin ones. 11 | # In case of multisite with multiple admin panels, remember to add any additional admin siteaccess to this group. 12 | admin_group: [admin] 13 | 14 | system: 15 | admin_group: 16 | # For admin this needs to contain all languages you want to translate content to on the given repository. 17 | languages: [eng-GB] 18 | content_tree_module: 19 | contextual_tree_root_location_ids: 20 | - 2 # Home (Content structure) 21 | - 5 # Users 22 | - 43 # Media 23 | - 48 # Setup 24 | subtree_paths: 25 | content: /1/2/ 26 | media: /1/43/ 27 | 28 | jms_translation: 29 | configs: 30 | admin: 31 | dirs: 32 | - '%kernel.project_dir%/vendor/ezsystems/ezplatform-admin-ui/src' 33 | output_dir: '%kernel.project_dir%/vendor/ezsystems/ezplatform-admin-ui/src/bundle/Resources/translations/' 34 | excluded_dirs: [Behat, Tests, node_modules] 35 | extractor: 36 | - ez_policy 37 | output_format: "xliff" 38 | -------------------------------------------------------------------------------- /src/Form/Type/ContactType.php: -------------------------------------------------------------------------------- 1 | setMethod('post') 28 | ->add('name', TextType::class) 29 | ->add('email', EmailType::class) 30 | ->add('message', TextareaType::class); 31 | } 32 | 33 | /** 34 | * @return string 35 | */ 36 | public function getName(): string 37 | { 38 | return 'app_contact'; 39 | } 40 | 41 | /** 42 | * @param \Symfony\Component\OptionsResolver\OptionsResolver $resolver 43 | */ 44 | public function configureOptions(OptionsResolver $resolver): void 45 | { 46 | $resolver->setDefaults(['data_class' => Contact::class]); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /tests/fixtures/testRenderElementsInput.xml: -------------------------------------------------------------------------------- 1 |
2 |

Element 1 - Paragraph 1

3 |

Element 2 - header 1

4 |

Element 3 - Paragraph 2

5 | 6 | 7 |
8 | 9 | 10 |
11 | 12 | 13 |
14 | 15 | 16 |

Paragraph 3

17 | 18 | 19 |
20 | 21 | 22 |
23 | 24 | 25 |
26 | 27 | 28 |

Paragraph 4

29 |

header 2

30 |

Paragraph 5

31 | 32 | 33 |
34 | 35 | 36 |
37 | 38 | 39 |
40 | 41 | 42 |

Paragraph 6

43 |

Paragraph 7

44 |

header 3

45 |

Paragraph 8

46 | 47 |
48 | -------------------------------------------------------------------------------- /bin/.travis/trusty/update_docker.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Update Docker, if needed 4 | d_full=`docker version --format '{{.Server.Version}}'` 5 | d=`echo $d_full | ( IFS="." ; read a b c && echo $a.$b)` 6 | if (( $(echo "$d < 18.06" |bc -l) )); then 7 | echo "Updating Docker from ${d} (${d_full}) to newest community edition" 8 | # Update package info and selectively update docker-engine (and keep old travis specific config file) 9 | sudo apt-get update 10 | sudo apt-get --reinstall -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install docker-ce 11 | docker -v 12 | else 13 | echo "Skip updating Docker ${d} (${d_full})" 14 | fi 15 | 16 | # If we need to pin it to a given version: 17 | # sudo apt-get --reinstall -y [...] install docker-engine=1.11.0-0~jessie 18 | # http://apt.dockerproject.org/repo/dists/debian-jessie/main/binary-amd64/Packages 19 | 20 | # Update Docker Compose, if needed 21 | dc_full=`docker-compose version --short` 22 | dc=`echo $dc_full | ( IFS="." ; read a b c && echo $a.$b)` 23 | if (( $(echo "$dc < 1.23" |bc -l) )); then 24 | DOCKER_COMPOSE_VERSION="1.23.2" 25 | echo "Updating Docker Compose from ${dc} (${dc_full}) to ${DOCKER_COMPOSE_VERSION}" 26 | sudo rm -f /usr/local/bin/docker-compose 27 | curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose 28 | chmod +x docker-compose 29 | sudo mv docker-compose /usr/local/bin 30 | else 31 | echo "Skip updating Docker Compose ${dc} (${dc_full})" 32 | fi 33 | -------------------------------------------------------------------------------- /doc/docker/install_script.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Dumping autoload using --optimize-autoloader to keep performenace on a usable level, not needed on linux host. 4 | # Second chown line: For dev and behat tests we give a bit extra rights, never do this for prod. 5 | 6 | for i in $(seq 1 3); do 7 | composer install --no-progress --no-interaction --prefer-dist --no-suggest --optimize-autoloader && s=0 && break || s=$? && sleep 1 8 | done 9 | if [ "$s" != "0" ]; then 10 | echo "ERROR : composer install failed, exit code : $s" 11 | exit $s 12 | fi 13 | mkdir -p public/var 14 | 15 | if [ "${INSTALL_DATABASE}" == "1" ]; then 16 | export DATABASE_URL=${DATABASE_PLATFORM}://${DATABASE_USER}:${DATABASE_PASSWORD}@${DATABASE_HOST}:${DATABASE_PORT}/${DATABASE_NAME} 17 | 18 | php /scripts/wait_for_db.php 19 | composer ezplatform-install 20 | if [ "$APP_CMD" != '' ]; then 21 | echo '> Executing' "$APP_CMD" 22 | php bin/console $APP_CMD 23 | fi 24 | echo 'Dumping database into doc/docker/entrypoint/mysql/2_dump.sql for use by mysql on startup.' 25 | mysqldump -u $DATABASE_USER --password=$DATABASE_PASSWORD -h $DATABASE_HOST --add-drop-table --extended-insert --protocol=tcp $DATABASE_NAME > doc/docker/entrypoint/mysql/2_dump.sql 26 | fi 27 | 28 | rm -Rf var/log/* var/cache/*/* 29 | chown -R www-data:www-data var/cache var/log public/var 30 | find var/cache var/log public/var -type d -print0 | xargs -0 chmod -R 775 31 | find var/cache var/log public/var -type f -print0 | xargs -0 chmod -R 664 32 | chown -R www-data:www-data config src 33 | -------------------------------------------------------------------------------- /src/DependencyInjection/Compiler/MigrationParameterPass.php: -------------------------------------------------------------------------------- 1 | getParameter('kernel.project_dir') . $container->getParameter('app.migration_reference_file'); 25 | // $migrationValuesMapping = $container->getParameter('app.migration.values_mapping'); 26 | // 27 | // if (!is_readable($referenceFile)) { 28 | // return; 29 | // } 30 | // 31 | // $references = Yaml::parseFile($referenceFile); 32 | // 33 | // foreach ($migrationValuesMapping as $parameterName => $migrationParameterName) { 34 | // if (!array_key_exists($migrationParameterName, $references)) { 35 | // continue; 36 | // } 37 | // 38 | // $container->setParameter($parameterName, $references[$migrationParameterName]); 39 | // } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/Twig/SearchResultExtractorExtension.php: -------------------------------------------------------------------------------- 1 | valueObject; 50 | }, $searchResult->searchHits); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/Event/Subscriber/BuildDemoSchemaSubscriber.php: -------------------------------------------------------------------------------- 1 | schemaFilePath = $schemaFilePath; 26 | } 27 | 28 | /** 29 | * Returns an array of events this subscriber wants to listen to. 30 | * 31 | * @return array 32 | */ 33 | public static function getSubscribedEvents(): array 34 | { 35 | return [ 36 | SchemaBuilderEvents::BUILD_SCHEMA => ['onBuildSchema', 180], 37 | ]; 38 | } 39 | 40 | /** 41 | * @param \EzSystems\DoctrineSchema\API\Event\SchemaBuilderEvent $event 42 | */ 43 | public function onBuildSchema(SchemaBuilderEvent $event): void 44 | { 45 | $event 46 | ->getSchemaBuilder() 47 | ->importSchemaFromFile($this->schemaFilePath); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /public/assets/images/maison-logo.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /tests/App/PremiumContent/HtmlRendererTest.php: -------------------------------------------------------------------------------- 1 | renderElements($inputDocument, $numberOfDisplayedElements); 21 | 22 | $this->assertEquals($expectedResult, $result); 23 | } 24 | 25 | public function htmlRendererDataProvider(): array 26 | { 27 | $input = $this->loadFixture('testRenderElementsInput'); 28 | 29 | return [ 30 | [$input, 1, $this->loadFixture('testRenderElementsResult_1')], 31 | [$input, 2, $this->loadFixture('testRenderElementsResult_2')], 32 | [$input, 3, $this->loadFixture('testRenderElementsResult_3')], 33 | [$input, 4, $this->loadFixture('testRenderElementsResult_4')], 34 | [$input, 5, $this->loadFixture('testRenderElementsResult_5')], 35 | [$input, 6, $this->loadFixture('testRenderElementsResult_6')], 36 | [$input, 7, $this->loadFixture('testRenderElementsResult_7')], 37 | ]; 38 | } 39 | 40 | private function loadFixture($name): string 41 | { 42 | return file_get_contents(__DIR__ . '../../../fixtures/' . $name . '.xml'); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | handle($request); 43 | $response->send(); 44 | $kernel->terminate($request, $response); 45 | -------------------------------------------------------------------------------- /templates/themes/maison/card/store.html.twig: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |

5 | {{ ez_render_field(content, 'name') }} 6 | {{ ez_render_field(content, 'country') }} 7 |

8 |
9 |
10 |
11 |
12 |

{{ 'Address'|trans }}:

13 | {{ ez_field_value(content, 'maplocation') }} 14 |
15 |
16 | {% include '@ezdesign/parts/store_work_hours.html.twig' %} 17 |
18 | {% set contactInfo = ez_field_value(content, 'contactInfo').rows|first %} 19 | {% if contactInfo is defined and contactInfo|length > 0 %} 20 |
21 |

{{ 'Phone'|trans }}:

22 |

{{ contactInfo.cells['phone'] }}

23 |
24 |
25 |

{{ 'E-mail' | trans }}:

26 |

{{ contactInfo.cells['email'] }}

27 |
28 | {% endif %} 29 |
30 |
31 | 37 |
38 |
39 | -------------------------------------------------------------------------------- /doc/i18n/distribute_translations.md: -------------------------------------------------------------------------------- 1 | # Distribute translations 2 | 3 | ## Introduction 4 | 5 | This documentation is for the eZ Systems team and presents the process of integrating new translations and distributing 6 | them as a package. 7 | 8 | ## Merge Crowdin contributions 9 | 10 | When translators contribute to translate the strings you added, [Crowdin][crowdin-ezplatform] will make a huge PR on the 11 | l10n_master branch (or l10n_xx where xx is the target branch). 12 | 13 | You can squash and merge this PR directly on GitHub with the following rules: 14 | 15 | - **Squash commits**: Crowdin does a lot of commits so this is mandatory. 16 | - **Update commit message**: Add an understandable message with the locales translated... 17 | - **DO NOT remove the branch**: Crowdin synchronization is based on it, so if you remove it you break the Crowdin workflow. 18 | 19 | Then when contributions are merged on the target branch, you just need to synchronize the translation packages. 20 | 21 | ## Translation packages per language 22 | 23 | To allow users to install only what they need, we have split every language into a dedicated package. 24 | 25 | All translation packages are published on [ezplatform-i18n organisation on github][ezplatform-i18n-org] 26 | 27 | **Important**: these packages are read only, they must be updated with the [eZ Platform i18n git split command][ezplatform-i18n]. 28 | 29 | ## Next 30 | 31 | The last step to validate that the translation has been correctly added is to [install the corresponding translation package][install-translation]. 32 | 33 | [crowdin-ezplatform]: https://crowdin.com/project/ezplatform 34 | [ezplatform-i18n-org]: https://github.com/ezplatform-i18n 35 | [ezplatform-i18n]: https://github.com/ezsystems/ezplatform-i18n 36 | [install-translation]: /doc/i18n/install_translation_package.md 37 | -------------------------------------------------------------------------------- /config/packages/cache_pool/cache.redis.yaml: -------------------------------------------------------------------------------- 1 | # Optimized Redis cache adapter (from: https://github.com/ezsystems/symfony-tools) 2 | # 3 | # On platform.sh this is setup automatically in env/plaformsh.php. 4 | # For any other kind of use it can be enabled with CACHE_POOL, detected by env/generic.php. 5 | # 6 | # For further reading on setup with eZ Platform and Redis: 7 | # https://doc.ezplatform.com/en/latest/guide/persistence_cache/#redis 8 | parameters: 9 | cache_namespace: '%env(CACHE_NAMESPACE)%' 10 | cache_dsn: '%env(CACHE_DSN)%' 11 | 12 | services: 13 | cache.redis: 14 | public: true 15 | class: Symfony\Component\Cache\Adapter\RedisTagAwareAdapter 16 | parent: cache.adapter.redis 17 | tags: 18 | - name: cache.pool 19 | clearer: cache.app_clearer 20 | # Examples from vendor/symfony/symfony/src/Symfony/Component/Cache/Traits/RedisTrait.php: 21 | # redis://localhost:6379 22 | # redis://secret@example.com:1234/13 23 | # redis://secret@/var/run/redis.sock/13?persistent_id=4&class=Redis&timeout=3&retry_interval=3 24 | # Example using Predis: redis://%cache_dsn%?class=\Predis\Client 25 | provider: 'redis://%cache_dsn%' 26 | # Cache namespace prefix overriding the one used by Symfony by default 27 | # This makes sure cache is reliably shared across whole cluster and all Symfony env's 28 | # Can be used for blue/green deployment strategies when changes affect content cache. 29 | # For multi db setup adapt this to be unique per pool (one pool per database) 30 | # If you prefer default behaviour set this to null or comment out, and consider for instance: 31 | # https://symfony.com/doc/current/reference/configuration/framework.html#prefix-seed 32 | namespace: '%cache_namespace%' 33 | -------------------------------------------------------------------------------- /doc/docker/base-dev.yml: -------------------------------------------------------------------------------- 1 | version: '3.3' 2 | # Single server setup for dev 3 | 4 | services: 5 | app: 6 | image: ${PHP_IMAGE}-node 7 | volumes: 8 | - ${COMPOSE_DIR}/../../:/var/www:cached 9 | - ${COMPOSER_HOME}:/root/.composer:cached 10 | depends_on: 11 | - db 12 | environment: 13 | - COMPOSER_MEMORY_LIMIT 14 | - EZPLATFORM_SITEACCESS 15 | - PHP_INI_ENV_memory_limit 16 | - APP_ENV=${APP_ENV-dev} 17 | - APP_DEBUG 18 | - APP_HTTP_CACHE 19 | - TRUSTED_PROXIES 20 | - DATABASE_USER 21 | - DATABASE_PASSWORD 22 | - DATABASE_NAME 23 | - DATABASE_HOST=db 24 | - RECOMMENDATIONS_CUSTOMER_ID 25 | - RECOMMENDATIONS_LICENSE_KEY 26 | - PUBLIC_SERVER_URI 27 | - HTTPCACHE_VARNISH_INVALIDATE_TOKEN 28 | - GOOGLE_TRANSLATE_API_KEY 29 | networks: 30 | - backend 31 | 32 | web: 33 | image: ${NGINX_IMAGE} 34 | volumes: 35 | - ${COMPOSE_DIR}/../../:/var/www:ro,cached 36 | depends_on: 37 | - app 38 | ports: 39 | - "8080:80" 40 | environment: 41 | - APP_ENV=${APP_ENV-dev} 42 | - MAX_BODY_SIZE=20 43 | - FASTCGI_PASS=app:9000 44 | - TIMEOUT=190 45 | command: /bin/bash -c "cd /var/www && cp -a doc/nginx/ez_params.d /etc/nginx && bin/vhost.sh --basedir=/var/www --template-file=doc/nginx/vhost.template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'" 46 | networks: 47 | - frontend 48 | - backend 49 | 50 | db: 51 | image: ${MYSQL_IMAGE} 52 | volumes: 53 | - ${COMPOSE_DIR}/entrypoint/mysql:/docker-entrypoint-initdb.d/:ro,cached 54 | environment: 55 | - MYSQL_RANDOM_ROOT_PASSWORD=1 56 | - MYSQL_USER=$DATABASE_USER 57 | - MYSQL_PASSWORD=$DATABASE_PASSWORD 58 | - MYSQL_DATABASE=$DATABASE_NAME 59 | - TERM=dumb 60 | networks: 61 | - backend 62 | 63 | networks: 64 | frontend: 65 | backend: 66 | -------------------------------------------------------------------------------- /doc/docker/import-dataset.yml: -------------------------------------------------------------------------------- 1 | version: '3.3' 2 | # Config for importing dataset images into db and nfs server 3 | # Depends on separate stack for db; db-stack.yml 4 | 5 | services: 6 | databasedump: 7 | image: swarmmanager:5000/my-ez-app/dataset-dbdump 8 | volumes: 9 | - type: volume 10 | source: dbdump 11 | target: /dbdump 12 | volume: 13 | nocopy: false 14 | 15 | import-db: 16 | # Using dev for now, because we need mysql client 17 | image: ${PHP_IMAGE_DEV} 18 | environment: 19 | - DATABASE_USER 20 | - DATABASE_PASSWORD 21 | - DATABASE_NAME 22 | - TERM=dumb 23 | networks: 24 | - stack-db_db 25 | volumes: 26 | - type: volume 27 | source: dbdump 28 | target: /dbdump 29 | volume: 30 | nocopy: true 31 | depends_on: 32 | - databasedump 33 | command: > 34 | /bin/bash -c " 35 | time mysql -u $${DATABASE_USER} -p$${DATABASE_PASSWORD} $${DATABASE_NAME} -h db< /dbdump/ezp.sql" 36 | 37 | import-vardir: 38 | image: swarmmanager:5000/my-ez-app/dataset-vardir 39 | volumes: 40 | - vardir:/nfs/vardirs 41 | environment: 42 | - DATASET_VARDIR 43 | command: > 44 | /bin/sh -c " 45 | if [ ! -e /nfs/vardirs/$${DATASET_VARDIR} ]; then 46 | echo Copying files from /var/www/public/var to /nfs/vardirs/$${DATASET_VARDIR}; 47 | mkdir /nfs/vardirs/$${DATASET_VARDIR} && \ 48 | time cp -a /var/www/public/var/ /nfs/vardirs/$${DATASET_VARDIR}; 49 | else 50 | echo Aborted, /nfs/vardirs/$${DATASET_VARDIR} already exists; 51 | exit 2; 52 | fi" 53 | 54 | networks: 55 | stack-db_db: 56 | external: true 57 | 58 | volumes: 59 | dbdump: 60 | vardir: 61 | driver: local 62 | driver_opts: 63 | type: nfs 64 | o: addr=swarmmanager,rw,vers=4.0 65 | device: ":/vardirs" 66 | -------------------------------------------------------------------------------- /doc/docker/Dockerfile-nginx: -------------------------------------------------------------------------------- 1 | ARG PHP_IMAGE=ezsystems/php:7.3-v1 2 | FROM ${PHP_IMAGE}-node as web-build 3 | 4 | ENV APP_ENV=prod 5 | 6 | # Copy in project files into work dir 7 | COPY . /var/www 8 | 9 | # Create asset directories that might not exists 10 | RUN if [ ! -d /var/www/public/bundles ]; then mkdir /var/www/public/bundles; fi 11 | RUN if [ ! -d /var/www/public/css ]; then mkdir /var/www/public/css; fi 12 | RUN if [ ! -d /var/www/public/fonts ]; then mkdir /var/www/public/fonts; fi 13 | RUN if [ ! -d /var/www/public/js ]; then mkdir /var/www/public/js; fi 14 | RUN if [ ! -d /var/www/public/assets ]; then mkdir /var/www/public/assets; fi 15 | 16 | # Generate assets using hard copy as we need to copy them over to resulting image 17 | RUN composer config extra.symfony-assets-install hard 18 | RUN composer run-script auto-scripts --no-interaction 19 | 20 | 21 | # Copy over just the files we want in second stage, so resulting stage only has assets 22 | # and vhost config in as few layers as possible 23 | FROM nginx:stable as web-multilayers 24 | 25 | COPY bin/vhost.sh /var/www/bin/vhost.sh 26 | COPY doc/nginx/vhost.template /var/www/doc/nginx/vhost.template 27 | 28 | # Auto generated assets 29 | COPY --from=web-build /var/www/public/bundles /var/www/public/bundles 30 | COPY --from=web-build /var/www/public/css /var/www/public/css 31 | COPY --from=web-build /var/www/public/fonts /var/www/public/fonts 32 | COPY --from=web-build /var/www/public/js /var/www/public/js 33 | 34 | # User provided assets 35 | COPY --from=web-build /var/www/public/assets /var/www/public/assets 36 | 37 | 38 | # In third stage build the resulting image 39 | FROM nginx:stable 40 | 41 | COPY --from=web-multilayers /var/www /var/www 42 | COPY doc/nginx/ez_params.d /etc/nginx/ez_params.d 43 | 44 | CMD /bin/bash -c "cd /var/www && bin/vhost.sh --template-file=doc/nginx/vhost.template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'" 45 | -------------------------------------------------------------------------------- /templates/themes/maison/full/inspiration_list.html.twig: -------------------------------------------------------------------------------- 1 | {% extends "@ezdesign/pagelayout.html.twig" %} 2 | 3 | {% block page_head %} 4 | {% set title = ez_content_name(content) %} 5 | {{ parent() }} 6 | {% endblock %} 7 | 8 | {% block content %} 9 |
10 | 22 |
23 | {% include '@ezdesign/menu/inspirations-menu.html.twig' %} 24 |
25 | {% if inspirations is defined and inspirations|length > 0 %} 26 | {% for inspiration in inspirations %} 27 |
28 | {{ render_esi(controller('ez_content:viewAction', { 29 | locationId: inspiration.contentInfo.mainLocationId, 30 | viewType: 'card' 31 | })) }} 32 |
33 | {% endfor %} 34 | {% if inspirations.haveToPaginate() %} 35 |
36 | {{ pagerfanta(inspirations, 'maison_template', { 37 | routeName: location, 38 | routeParams: ezplatform.requestStack.masterRequest.query.all 39 | }) }} 40 |
41 | {% endif %} 42 | {% endif %} 43 |
44 |
45 |
46 | {% endblock %} 47 | -------------------------------------------------------------------------------- /doc/docker/base-prod.yml: -------------------------------------------------------------------------------- 1 | version: '3.3' 2 | # Simple single server setup for prod 3 | 4 | services: 5 | app: 6 | build: 7 | context: ../../ 8 | dockerfile: ${APP_DOCKER_FILE} 9 | args: 10 | - PHP_IMAGE 11 | depends_on: 12 | - db 13 | environment: 14 | - COMPOSER_MEMORY_LIMIT 15 | - EZPLATFORM_SITEACCESS 16 | - PHP_INI_ENV_memory_limit 17 | - APP_ENV=${APP_ENV-prod} 18 | - APP_DEBUG 19 | - APP_HTTP_CACHE 20 | - TRUSTED_PROXIES 21 | - DATABASE_USER 22 | - DATABASE_PASSWORD 23 | - DATABASE_NAME 24 | - DATABASE_HOST=db 25 | - RECOMMENDATIONS_CUSTOMER_ID 26 | - RECOMMENDATIONS_LICENSE_KEY 27 | - PUBLIC_SERVER_URI 28 | - HTTPCACHE_VARNISH_INVALIDATE_TOKEN 29 | - GOOGLE_TRANSLATE_API_KEY 30 | networks: 31 | - backend 32 | 33 | web: 34 | build: 35 | context: ../../ 36 | dockerfile: doc/docker/Dockerfile-nginx 37 | args: 38 | - PHP_IMAGE 39 | depends_on: 40 | - app 41 | ports: 42 | - "8080:80" 43 | environment: 44 | - APP_ENV=${APP_ENV-prod} 45 | - MAX_BODY_SIZE=20 46 | - FASTCGI_PASS=app:9000 47 | - TIMEOUT=190 48 | networks: 49 | - frontend 50 | - backend 51 | 52 | db: 53 | image: ${MYSQL_IMAGE} 54 | # TODO: Get rid of by having some sort of migration command executed by app container at startup for inserting/updating data (if needed) instead of db dump, as for charset find another way of setting that. 55 | volumes: 56 | - dbdump:/docker-entrypoint-initdb.d/:ro 57 | environment: 58 | - MYSQL_RANDOM_ROOT_PASSWORD=1 59 | - MYSQL_USER=$DATABASE_USER 60 | - MYSQL_PASSWORD=$DATABASE_PASSWORD 61 | - MYSQL_DATABASE=$DATABASE_NAME 62 | - TERM=dumb 63 | networks: 64 | - backend 65 | 66 | volumes: 67 | vardir: 68 | dbdump: 69 | 70 | networks: 71 | frontend: 72 | backend: 73 | -------------------------------------------------------------------------------- /src/Layout/LogoRenderer.php: -------------------------------------------------------------------------------- 1 | contentHelper->getContentFieldValue($contentId, self::LOGO_FIELD_NAME); 30 | 31 | if (!$imageContentId) { 32 | return ''; 33 | } 34 | 35 | $repository = $this->locator->get(Repository::class); 36 | 37 | return $repository->sudo( 38 | function () use ($imageContentId) { 39 | $imageContent = $this->contentHelper->loadContent($imageContentId); 40 | 41 | /** @var \eZ\Publish\Core\FieldType\Image\Value $imageField */ 42 | $imageField = $imageContent->getFieldValue('image'); 43 | 44 | return $imageField->uri; 45 | } 46 | ); 47 | } 48 | 49 | /** 50 | * @inheritDoc 51 | */ 52 | public static function getSubscribedServices(): array 53 | { 54 | return [ 55 | Repository::class, 56 | ContentHelper::class, 57 | ]; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /config/services.yaml: -------------------------------------------------------------------------------- 1 | # This file is the entry point to configure your own services. 2 | # Files in the packages/ subdirectory configure your dependencies. 3 | 4 | # Put parameters here that don't need to change on each machine where the app is deployed 5 | # https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration 6 | 7 | imports: 8 | - { resource: services/content.yaml } 9 | - { resource: services/controllers.yaml } 10 | - { resource: services/events.yaml } 11 | - { resource: services/helpers.yaml } 12 | - { resource: services/installer.yaml } 13 | - { resource: services/layout.yaml } 14 | - { resource: services/mailer.yaml } 15 | - { resource: services/migration.yaml } 16 | - { resource: services/pagerfanta.yaml } 17 | - { resource: services/query_types.yaml } 18 | - { resource: services/twig.yaml } 19 | 20 | parameters: 21 | locale: 'en' 22 | 23 | services: 24 | # default configuration for services in *this* file 25 | _defaults: 26 | autowire: true # Automatically injects dependencies in your services. 27 | autoconfigure: true # Automatically registers your services as commands, event subscribers, etc. 28 | 29 | # makes classes in src/ available to be used as services 30 | # this creates a service per class whose id is the fully-qualified class name 31 | App\: 32 | resource: '../src/*' 33 | exclude: '../src/{DependencyInjection,Entity,Migrations,Tests,Kernel.php}' 34 | 35 | # controllers are imported separately to make sure services can be injected 36 | # as action arguments even if you don't extend any base controller class 37 | App\Controller\: 38 | resource: '../src/Controller' 39 | tags: ['controller.service_arguments'] 40 | 41 | # add more service definitions when explicit configuration is needed 42 | # please note that last definitions always *replace* previous ones 43 | -------------------------------------------------------------------------------- /bin/.travis/rsa_allure: -------------------------------------------------------------------------------- 1 | -----BEGIN OPENSSH PRIVATE KEY----- 2 | b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAABFwAAAAdzc2gtcn 3 | NhAAAAAwEAAQAAAQEA1dFVPkttApxjrwjNB5rOZTCwPNqG5bHRy127Q/jLkFF+O4u6xUbp 4 | necdGysDON0gQyGkEgdEZ533CrDz9JPBFGjcCnmovX9KybTkc512x8aBGm6u1oJO5tYWTn 5 | SGehvfVzrL/GXgwtDeB9nAr34DDs1jaWJswG1iha/eXsRurJgNljD92xmGwJ6N6vwat43E 6 | I3UV+W7GFqCZ6GxSs3CaI1ks1BMxkUZ3hisBg08j+e0xgJTMtFhF1+L5jUVXulFQyZ7I08 7 | g7bgl8gUXZEC/swtba8ZQ4L8ojK3KSYsl6fAlbhlR4mlDkanRsS1cnTeAgkTt+Coex8ESn 8 | 49QI1bBQYwAAA+C/zVmFv81ZhQAAAAdzc2gtcnNhAAABAQDV0VU+S20CnGOvCM0Hms5lML 9 | A82oblsdHLXbtD+MuQUX47i7rFRumd5x0bKwM43SBDIaQSB0RnnfcKsPP0k8EUaNwKeai9 10 | f0rJtORznXbHxoEabq7Wgk7m1hZOdIZ6G99XOsv8ZeDC0N4H2cCvfgMOzWNpYmzAbWKFr9 11 | 5exG6smA2WMP3bGYbAno3q/Bq3jcQjdRX5bsYWoJnobFKzcJojWSzUEzGRRneGKwGDTyP5 12 | 7TGAlMy0WEXX4vmNRVe6UVDJnsjTyDtuCXyBRdkQL+zC1trxlDgvyiMrcpJiyXp8CVuGVH 13 | iaUORqdGxLVydN4CCRO34Kh7HwRKfj1AjVsFBjAAAAAwEAAQAAAQEAum24+4XcWGhvahAs 14 | ZLMPvp8DKywGboPqvnzNaOim5QCJJfYhNR0tWKZIdIW+W3hCRwYv/iAj/ox29/Vt4BRsRx 15 | Vetit5ezBfzxtQDZaAGJP1wUw8WYBot1B3RpTHI/TleTMk5L8XiAWBcirknJ8sn11pjltp 16 | Iya8vn+nTc3MCeM5RByAaRtlvGOEkM2R6KI6fScGUZ8B+uXJknH3aguoys3D7DteYbbHzm 17 | cyckKhy33gkPNvxuQaqirBNCueiEfhV+YiwXRo3gI4lLMnIdOeGhA0ZabsAH6AMllxFk+j 18 | Lu3ku34hmyo17jalrrum76XnP3r2L52oLuuytDzaTd7eEQAAAIBYjZA8/1Nuy0y4M24G2z 19 | lS+oyTNhlkj1M6dGlj7wFwCa01lWhknn1hhSLmOth/zvy+S20IjoO6BCAqw759wjasj4dy 20 | gucP9XVLC1UqtwSyVsQlIMNc/gz1l8c6qMPE+Jj5isCE3d0YBqeuixFNlpf2D6zN2E6vnJ 21 | eE071x0grEmwAAAIEA+MGrVr2YaaZmWR3UIIrID1kfOvYELZZ/8skj08uFDVMvCd9Z/j6d 22 | X7Bh3nwzciy30nAyUii3+dKm4IYGwvsrM9O13VlOrHM39VQpYq3YVTUEXzWsWZkuWk8DKM 23 | iiv+s9TcQ3GQyWkFc68ldPubQlqQv03axHJD6RY0ZcQLghq0UAAACBANwLNz2Flgy7s9Mw 24 | MSGd0lpXMNyK6iCIn2/GP5cJGD1MgHtrW9neeCDMhDPkptF77HHODYPzvAfS2sH3rVDyHw 25 | lLSMpT57sbRrJzFQIj0u23ULGYEXkSlnD3oX5D7LbTooZowqo2bhmCf3JQIhqbHQrRq0bx 26 | hYnY//yDYMK8c3OHAAAAJm1hY2llanR5cmFsYUBNYWNpZWpzLU1hY0Jvb2stUHJvLmxvY2 27 | FsAQIDBA== 28 | -----END OPENSSH PRIVATE KEY----- 29 | -------------------------------------------------------------------------------- /src/Helper/ContentHelper.php: -------------------------------------------------------------------------------- 1 | locator = $locator; 24 | } 25 | 26 | /** 27 | * @throws \eZ\Publish\API\Repository\Exceptions\NotFoundException 28 | * @throws \eZ\Publish\API\Repository\Exceptions\UnauthorizedException 29 | */ 30 | public function getContentFieldValue(int $contentId, string $fieldName): string 31 | { 32 | $content = $this->loadContent($contentId); 33 | 34 | return $content->getFieldValue($fieldName)->__toString(); 35 | } 36 | 37 | /** 38 | * Returns content object based on content id. 39 | * 40 | * @return \eZ\Publish\API\Repository\Values\Content\Content 41 | * @throws \eZ\Publish\API\Repository\Exceptions\NotFoundException 42 | * @throws \eZ\Publish\API\Repository\Exceptions\UnauthorizedException 43 | */ 44 | public function loadContent(int $contentId): Content 45 | { 46 | return $this->locator->get(ContentServiceInterface::class)->loadContent($contentId); 47 | } 48 | 49 | /** 50 | * @inheritDoc 51 | */ 52 | public static function getSubscribedServices(): array 53 | { 54 | return [ 55 | ContentServiceInterface::class, 56 | ]; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/PremiumContent/HtmlRenderer.php: -------------------------------------------------------------------------------- 1 | loadHTML($document, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD); 29 | 30 | $childNodes = $doc->documentElement->childNodes; 31 | $numberOfNodesToKeep = 0; 32 | $importantNodes = 0; 33 | 34 | /** @var DOMElement $node */ 35 | foreach ($childNodes as $node) { 36 | ++$numberOfNodesToKeep; 37 | 38 | if ($node->nodeType === XML_ELEMENT_NODE) { 39 | ++$importantNodes; 40 | } 41 | 42 | if ($importantNodes >= $numberOfDisplayedElements) { 43 | break; 44 | } 45 | } 46 | 47 | while ($childNodes->length > $numberOfNodesToKeep) { 48 | $lastNode = $childNodes->item($childNodes->length - 1); 49 | $lastNode->parentNode->removeChild($lastNode); 50 | } 51 | 52 | return $this->removeXmlHeader($doc->saveXML()); 53 | } 54 | 55 | /** 56 | * @param string $html 57 | * 58 | * @return string 59 | */ 60 | private function removeXmlHeader(string $html): string 61 | { 62 | return str_replace('' . "\n", null, $html); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /doc/i18n/handle_translation_in_contribution.md: -------------------------------------------------------------------------------- 1 | # Translation: How to integrate new strings in your contributions 2 | 3 | ## Introduction 4 | 5 | This documentation is for contributors to eZ Platform. It will explain how to format your contribution 6 | to fit in the translation workflow. 7 | 8 | ## How to add new strings to be translated 9 | 10 | To ease translators' work we use JMSTranslation which allows us to add a `desc` parameter to translated strings. 11 | This `desc` should contain the default English string and will be displayed to the translator as a help message on Crowdin. 12 | 13 | For example in a twig template it will look like this: 14 | 15 | {{ 'field_definition.description'|trans|desc("Description") }} 16 | 17 | you can even use this feature with `transchoice`: 18 | 19 | {{ 'yes_no'|transchoice(field_definition.isRequired)|desc("{0} No|{1} Yes") }} 20 | 21 | ## How to extract new strings from template 22 | 23 | All translations are handled by the repository. So if you add new strings in ezplatform-kernel, you will extract them into 24 | ezplatform-kernel translation files. 25 | 26 | To help you in this task and maintain consistency, we implement a dedicated script. 27 | 28 | bin/extract-translations.sh 29 | 30 | **Important:** you'll notice that all files will be updated at least to change the date attribute. If this is the 31 | only change to a file, please don't commit it. 32 | 33 | **Note:** this script is present in all eZ Systems repositories which handle translations, so you can use the same command 34 | on platform-ui-bundle or repository-forms. 35 | 36 | ## What happens next 37 | 38 | At this point, your contributor job is done. When your PR is merged, the eZ Systems team will add your new strings in the 39 | [ezplatform-i18n][ezplatform-i18n] repository so they can be translated. 40 | 41 | [crowdin-ezplatform]: https://crowdin.com/project/ezplatform 42 | [ezplatform-i18n-org]: https://github.com/ezplatform-i18n 43 | [ezplatform-i18n]: https://github.com/ezsystems/ezplatform-i18n 44 | -------------------------------------------------------------------------------- /src/Model/Contact.php: -------------------------------------------------------------------------------- 1 | name = $name; 45 | } 46 | 47 | /** 48 | * @return string|null 49 | */ 50 | public function getName(): ?string 51 | { 52 | return $this->name; 53 | } 54 | 55 | /** 56 | * @param string $email 57 | */ 58 | public function setEmail(string $email): void 59 | { 60 | $this->email = $email; 61 | } 62 | 63 | /** 64 | * @return string|null 65 | */ 66 | public function getEmail(): ?string 67 | { 68 | return $this->email; 69 | } 70 | 71 | /** 72 | * @return string|null 73 | */ 74 | public function getMessage(): ?string 75 | { 76 | return $this->message; 77 | } 78 | 79 | /** 80 | * @param string $message 81 | */ 82 | public function setMessage(string $message): void 83 | { 84 | $this->message = $message; 85 | } 86 | 87 | /** 88 | * @return string 89 | */ 90 | public function getFrom(): string 91 | { 92 | return sprintf('%s <%s>', $this->getName(), $this->getEmail()); 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /doc/docker/my-ez-app-stack.yml: -------------------------------------------------------------------------------- 1 | version: '3.3' 2 | # Config for running eZ Platform using docker stack 3 | # Depends on separate stack for db; db-stack.yml 4 | 5 | services: 6 | web: 7 | image: swarmmanager:5000/my-ez-app/web 8 | ports: 9 | - "8081:80" 10 | environment: 11 | - APP_ENV 12 | - MAX_BODY_SIZE=20 13 | - FASTCGI_PASS=app:9000 14 | - TIMEOUT=190 15 | volumes: 16 | - vardir:/var/www/public/var 17 | networks: 18 | - my-ez-app 19 | deploy: 20 | replicas: 2 21 | 22 | app: 23 | image: swarmmanager:5000/my-ez-app/app 24 | environment: 25 | - APP_ENV=prod 26 | - APP_DEBUG 27 | - APP_HTTP_CACHE 28 | - DATABASE_USER=ezp 29 | - DATABASE_PASSWORD=SetYourOwnPassword 30 | - DATABASE_NAME=ezp 31 | - DATABASE_HOST=db 32 | - CUSTOM_CACHE_POOL=singleredis 33 | - CACHE_HOST=redis 34 | - APP_HTTP_CACHE=0 35 | - TRUSTED_PROXIES=varnish 36 | - HTTPCACHE_PURGE_SERVER=http://varnish 37 | - HTTPCACHE_PURGE_TYPE=http 38 | - PHP_INI_ENV_session.save_handler=redis 39 | - PHP_INI_ENV_session.save_path="tcp://redis:6379?weight=1" 40 | - RECOMMENDATIONS_CUSTOMER_ID 41 | - RECOMMENDATIONS_LICENSE_KEY 42 | - PUBLIC_SERVER_URI 43 | volumes: 44 | - vardir:/var/www/public/var 45 | networks: 46 | - stack-db_db 47 | - my-ez-app 48 | deploy: 49 | replicas: 5 50 | 51 | redis: 52 | image: healthcheck/redis 53 | networks: 54 | - my-ez-app 55 | 56 | varnish: 57 | image: swarmmanager:5000/my-ez-app/varnish 58 | ports: 59 | - "8080:80" 60 | depends_on: 61 | - web 62 | networks: 63 | - my-ez-app 64 | volumes: 65 | - /var/www/vidarl-ezplatform-ee-demo/vscripts:/vscripts 66 | command: --acl-all-networks 67 | 68 | networks: 69 | stack-db_db: 70 | external: true 71 | my-ez-app: 72 | 73 | volumes: 74 | vardir: 75 | driver: local 76 | driver_opts: 77 | type: nfs 78 | o: addr=swarmmanager,rw,vers=4.0 79 | device: ":/vardirs/my-ez-app/var" 80 | -------------------------------------------------------------------------------- /src/QueryType/ChildrenQueryType.php: -------------------------------------------------------------------------------- 1 | languages = $languages; 27 | } 28 | 29 | /** 30 | * @param string[] $parameters 31 | * 32 | * @return \eZ\Publish\API\Repository\Values\Content\LocationQuery 33 | */ 34 | public function getQuery(array $parameters = []): LocationQuery 35 | { 36 | $criteria = new Query\Criterion\LogicalAnd([ 37 | new Query\Criterion\Visibility(Query\Criterion\Visibility::VISIBLE), 38 | new Query\Criterion\ParentLocationId($parameters['parent_location_id']), 39 | new Query\Criterion\ContentTypeIdentifier($parameters['included_content_type_identifier']), 40 | new Query\Criterion\LanguageCode($this->languages), 41 | ]); 42 | 43 | $options = [ 44 | 'filter' => $criteria, 45 | 'sortClauses' => [ 46 | new SortClause\Location\Priority(LocationQuery::SORT_ASC), 47 | ], 48 | ]; 49 | 50 | return new LocationQuery($options); 51 | } 52 | 53 | /** 54 | * @return string 55 | */ 56 | public static function getName(): string 57 | { 58 | return 'App:Menu'; 59 | } 60 | 61 | /** 62 | * Returns array of required parameters 63 | * 64 | * @return array 65 | */ 66 | public function getSupportedParameters(): array 67 | { 68 | return [ 69 | 'parent_location_id', 70 | 'included_content_type_identifier', 71 | ]; 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /doc/docker/install.yml: -------------------------------------------------------------------------------- 1 | version: '3.3' 2 | # compose file for installing composer packages, perform install and dump database 3 | 4 | services: 5 | install_db: 6 | image: ${MYSQL_IMAGE} 7 | volumes: 8 | - ${COMPOSE_DIR}/entrypoint/mysql:/docker-entrypoint-initdb.d/:ro,cached 9 | environment: 10 | - MYSQL_RANDOM_ROOT_PASSWORD=1 11 | - MYSQL_USER=$DATABASE_USER 12 | - MYSQL_PASSWORD=$DATABASE_PASSWORD 13 | - MYSQL_DATABASE=$DATABASE_NAME 14 | 15 | install_app: 16 | image: ${PHP_IMAGE_DEV} 17 | volumes: 18 | - ${COMPOSE_DIR}/../..:/var/www:cached 19 | - ${COMPOSER_HOME}:/root/.composer:cached 20 | depends_on: 21 | - install_db 22 | environment: 23 | - COMPOSER_MEMORY_LIMIT 24 | - SYMFONY_ENV=${SYMFONY_ENV-prod} 25 | - SYMFONY_DEBUG 26 | - SYMFONY_CMD 27 | - DATABASE_USER 28 | - DATABASE_PASSWORD 29 | - DATABASE_NAME 30 | - DATABASE_HOST=install_db 31 | - GOOGLE_TRANSLATE_API_KEY 32 | # Dumping autoload using --optimize-autoloader to keep performenace on a usable level, not needed on linux host. 33 | # Second chown line: For dev and behat tests we give a bit extra rights, never do this for prod. 34 | command: > 35 | /bin/sh -c " 36 | for i in $$(seq 1 3); do composer install --no-progress --no-interaction --prefer-dist --no-suggest --optimize-autoloader && s=0 && break || s=$$? && sleep 1; done; (exit $$s); 37 | mkdir -p web/var; 38 | php /scripts/wait_for_db.php; 39 | composer ezplatform-install; 40 | if [ \"$SYMFONY_CMD\" != '' ]; then echo '> Executing' \"$SYMFONY_CMD\"; php bin/console $SYMFONY_CMD; fi; 41 | rm -Rf var/logs/* var/cache/*/*; 42 | chown -R www-data:www-data var/cache var/logs web/var; 43 | find var/cache var/logs web/var -type d -print0 | xargs -0 chmod -R 775; 44 | find var/cache var/logs web/var -type f -print0 | xargs -0 chmod -R 664; 45 | chown -R www-data:www-data app/config src; 46 | echo 'Dumping database into doc/docker/entrypoint/mysql/2_dump.sql for use by mysql on startup.'; 47 | mysqldump -u $$DATABASE_USER --password=$$DATABASE_PASSWORD -h $$DATABASE_HOST --add-drop-table --extended-insert --protocol=tcp $$DATABASE_NAME > doc/docker/entrypoint/mysql/2_dump.sql" 48 | -------------------------------------------------------------------------------- /assets/scss/_custom.scss: -------------------------------------------------------------------------------- 1 | $col: '.col'; 2 | 3 | .box-shadow { 4 | box-shadow: 0 5px 30px 0 rgba(0,0,0,0.15); 5 | } 6 | 7 | .heading { 8 | &-xs { 9 | font-size: 16px; 10 | line-height: 26px; 11 | font-weight: 500; 12 | } 13 | &-sm { 14 | font-size: 21px; 15 | line-height: 31px; 16 | font-weight: 500; 17 | } 18 | &-md { 19 | font-size: 27px; 20 | line-height: 32px; 21 | font-weight: 500; 22 | } 23 | &-lg { 24 | font-size: 43px; 25 | line-height: 54px; 26 | font-weight: 500; 27 | } 28 | } 29 | 30 | .text-inline { 31 | & > * { 32 | display: inline-block; 33 | } 34 | } 35 | 36 | #{($col)} { 37 | &--img { 38 | img { 39 | border-radius: 8px; 40 | max-width: 100%; 41 | height: auto; 42 | } 43 | } 44 | } 45 | 46 | .transform-center { 47 | position: absolute; 48 | left: 50%; 49 | top: 50%; 50 | @include transform(-50%, -50%); 51 | } 52 | 53 | // Additional margin and padding classes 54 | @for $i from 6 through 10 { 55 | $calc: ($spacer * ($i * 0.5) + 1); 56 | 57 | .mt-#{$i} { 58 | margin-top: $calc; 59 | } 60 | .my-#{$i} { 61 | margin-top: $calc; 62 | margin-bottom: $calc; 63 | } 64 | } 65 | 66 | // Additional border-radius (rounded) classes 67 | $multiplier: .25; 68 | 69 | @for $i from 1 through 5 { 70 | @if $i > 1 { 71 | $multiplier: $multiplier + $multiplier; 72 | } 73 | 74 | @if $multiplier > 1 { 75 | $multiplier: ($multiplier + ($multiplier * 0.5)) * 0.5; 76 | } 77 | 78 | $calc: ($spacer * $multiplier); 79 | 80 | .rounded-#{$i} { 81 | border-radius: $calc; 82 | -webkit-border-radius: $calc; 83 | } 84 | .rounded-left-#{$i} { 85 | border-top-left-radius: $calc; 86 | border-bottom-left-radius: $calc; 87 | -webkit-border-top-left-radius: $calc; 88 | -webkit-border-bottom-left-radius: $calc; 89 | } 90 | .rounded-right-#{$i} { 91 | border-top-right-radius: $calc; 92 | border-bottom-right-radius: $calc; 93 | -webkit-border-top-right-radius: $calc; 94 | -webkit-border-bottom-right-radius: $calc; 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /templates/themes/maison/full/inspiration.html.twig: -------------------------------------------------------------------------------- 1 | {% extends "@ezdesign/pagelayout.html.twig" %} 2 | 3 | {% block page_head %} 4 | {% set title = ez_content_name(content) ~ " - " ~ content.contentInfo.publishedDate|localizeddate('short', 'short', app.request.locale) %} 5 | {{ parent() }} 6 | {% endblock %} 7 | 8 | {% block content %} 9 |
10 | 22 |
23 | {% include '@ezdesign/menu/inspirations-menu.html.twig' %} 24 |
25 |
26 |
27 |

28 | {{ ez_render_field(content, 'name') }} 29 |

30 |
31 | {{ ez_render_field(content, 'image') }} 32 |
33 |
34 | {{ ez_render_field(content, 'intro') }} 35 |
36 |
37 | {{ ez_render_field(content, 'description') }} 38 |
39 |
40 |
41 |
42 |
43 |
44 | 45 |
46 |
47 |
48 | {{ content_pagination( 49 | '@ezdesign/pagination/content_pagination.html.twig', 50 | content, 51 | location.parentLocationId 52 | ) }} 53 |
54 | {% endblock %} 55 | -------------------------------------------------------------------------------- /src/QueryType/ContentSiblingQueryType.php: -------------------------------------------------------------------------------- 1 | limit = $parameters['limit'] ?? 1; 23 | $query->filter = new Query\Criterion\LogicalAnd( 24 | $this->prepareCriteria($parameters) 25 | ); 26 | $query->sortClauses = [new Query\SortClause\DatePublished( 27 | $parameters['sortDirection'] ?? Query::SORT_DESC 28 | )]; 29 | 30 | return $query; 31 | } 32 | 33 | public function getSupportedParameters(): array 34 | { 35 | return [ 36 | 'parentLocationId', 37 | 'modificationDate', 38 | 'sortDirection', 39 | 'limit', 40 | 'operator' 41 | ]; 42 | } 43 | 44 | public static function getName(): string 45 | { 46 | return 'App:ContentSibling'; 47 | } 48 | 49 | /** 50 | * @return \eZ\Publish\API\Repository\Values\Content\Query\Criterion[] 51 | */ 52 | private function prepareCriteria(array $parameters = []): array 53 | { 54 | $criteria = [new Query\Criterion\Visibility(Query\Criterion\Visibility::VISIBLE)]; 55 | 56 | if (!empty($parameters['parentLocationId'])) { 57 | $criteria[] = new Query\Criterion\ParentLocationId((int) $parameters['parentLocationId']); 58 | } 59 | 60 | if (!empty($parameters['operator']) && !empty($parameters['modificationDate'])) { 61 | $criteria[] = 62 | new Query\Criterion\DateMetadata( 63 | Query\Criterion\DateMetadata::MODIFIED, 64 | $parameters['operator'], 65 | $parameters['modificationDate']); 66 | } 67 | 68 | return $criteria; 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /doc/docker/Dockerfile-varnish: -------------------------------------------------------------------------------- 1 | FROM debian:stretch-slim 2 | 3 | ENV VARNISH_MALLOC_SIZE="256M" \ 4 | DEBIAN_FRONTEND=noninteractive 5 | 6 | ARG PACKAGECLOUD_URL=https://packagecloud.io/install/repositories/varnishcache/varnish60/script.deb.sh 7 | ARG VARNISH_MODULES_VERSION=0.15.0 8 | 9 | # Use official packages from Varnish and build with varnish-modules mainly for xkey 10 | # see: https://github.com/varnish/varnish-modules/tree/master/docs 11 | RUN set -xe \ 12 | && buildDeps=" \ 13 | make \ 14 | automake \ 15 | autotools-dev \ 16 | libedit-dev \ 17 | libjemalloc-dev \ 18 | libncurses-dev \ 19 | libpcre3-dev \ 20 | libtool \ 21 | pkg-config \ 22 | python-docutils \ 23 | python-sphinx \ 24 | varnish-dev \ 25 | " \ 26 | # Update apt and get dependencies 27 | && apt-get update -q -y \ 28 | && apt-get install -q -y --no-install-recommends ca-certificates curl bc net-tools \ 29 | \ 30 | # Get official Varnish package 31 | && curl -s ${PACKAGECLOUD_URL} | bash \ 32 | && apt-get install -q -y --allow-unauthenticated --no-install-recommends varnish $buildDeps \ 33 | \ 34 | # Install varnish modules 35 | && curl -A "Docker" -o /tmp/varnish-modules.tar.gz -D - -L -s https://download.varnish-software.com/varnish-modules/varnish-modules-${VARNISH_MODULES_VERSION}.tar.gz \ 36 | && tar zxpf /tmp/varnish-modules.tar.gz -C /tmp/ \ 37 | && cd /tmp/varnish-modules-${VARNISH_MODULES_VERSION} \ 38 | && ./configure \ 39 | && make \ 40 | # && make check \ 41 | && make install \ 42 | && rm -f /tmp/varnish-modules.tar.gz && rm -Rf /tmp/varnish-modules \ 43 | \ 44 | # Cleanup apt cache and remove build packages 45 | && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $buildDeps \ 46 | && rm -rf /var/lib/apt/lists/* 47 | 48 | COPY vendor/ezsystems/ezplatform-http-cache/docs/varnish/vcl/varnish5.vcl /etc/varnish/default.vcl 49 | COPY doc/docker/entrypoint/varnish/parameters.vcl /etc/varnish/parameters.vcl 50 | COPY doc/docker/entrypoint/varnish/entrypoint.sh /entrypoint.sh 51 | 52 | EXPOSE 80 6082 53 | 54 | ENTRYPOINT ["/entrypoint.sh"] 55 | -------------------------------------------------------------------------------- /assets/scss/maison/_pagination.scss: -------------------------------------------------------------------------------- 1 | $pagination: '.pagination'; 2 | $content-pagination: '.content-pagination'; 3 | 4 | #{($pagination)} { 5 | justify-content: center; 6 | 7 | .page-item { 8 | .page-link { 9 | color: $grey-light; 10 | padding: 10px 15px; 11 | border-left: none; 12 | border-right: none; 13 | border-top-color: $grey-lighter; 14 | border-bottom-color: $grey-lighter; 15 | display: flex; 16 | align-items: center; 17 | justify-content: center; 18 | 19 | &:hover { 20 | background-color: $grey-lighter; 21 | color: $white; 22 | } 23 | } 24 | &.prev { 25 | border-radius: 4px 0 0 4px; 26 | 27 | .page-link { 28 | padding: 8px; 29 | } 30 | } 31 | &.next { 32 | border-radius: 0 4px 4px 0; 33 | 34 | .page-link { 35 | padding: 8px 15px; 36 | } 37 | #{($pagination)}-nav-message { 38 | margin-right: 10px; 39 | } 40 | } 41 | &.prev, &.next { 42 | .page-link { 43 | background-color: $blue-lighter; 44 | border: 1px solid $blue-lighter; 45 | color: $white; 46 | } 47 | } 48 | &.active { 49 | .page-link { 50 | background-color: $grey-lighter; 51 | border: 1px solid $grey-lighter; 52 | color: $white; 53 | } 54 | } 55 | } 56 | } 57 | 58 | #{($content-pagination)} { 59 | &__container { 60 | padding: 14px 0; 61 | display: flex; 62 | flex-direction: row; 63 | justify-content: space-between; 64 | } 65 | &__link { 66 | color: $white; 67 | font-size: 21px; 68 | line-height: 26px; 69 | display: flex; 70 | align-items: center; 71 | justify-content: center; 72 | 73 | &:hover { 74 | color: #e3e3e3; 75 | text-decoration: none; 76 | } 77 | #{($content-pagination)}__icon { 78 | font-size: 50px; 79 | 80 | &--next { 81 | transform: rotate(180deg); 82 | } 83 | } 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /src/Kernel.php: -------------------------------------------------------------------------------- 1 | getProjectDir().'/config/bundles.php'; 22 | foreach ($contents as $class => $envs) { 23 | if ($envs[$this->environment] ?? $envs['all'] ?? false) { 24 | yield new $class(); 25 | } 26 | } 27 | } 28 | 29 | protected function build(ContainerBuilder $container): void 30 | { 31 | parent::build($container); 32 | 33 | $container->addCompilerPass(new MigrationParameterPass()); 34 | } 35 | 36 | protected function configureContainer(ContainerBuilder $container, LoaderInterface $loader): void 37 | { 38 | $container->addResource(new FileResource($this->getProjectDir().'/config/bundles.php')); 39 | $container->setParameter('container.dumper.inline_class_loader', true); 40 | $confDir = $this->getProjectDir().'/config'; 41 | 42 | $loader->load($confDir.'/{packages}/*'.self::CONFIG_EXTS, 'glob'); 43 | $loader->load($confDir.'/{packages}/overrides/**/*'.self::CONFIG_EXTS, 'glob'); 44 | $loader->load($confDir.'/{packages}/'.$this->environment.'/**/*'.self::CONFIG_EXTS, 'glob'); 45 | $loader->load($confDir.'/{services}'.self::CONFIG_EXTS, 'glob'); 46 | $loader->load($confDir.'/{services}_'.$this->environment.self::CONFIG_EXTS, 'glob'); 47 | } 48 | 49 | protected function configureRoutes(RouteCollectionBuilder $routes): void 50 | { 51 | $confDir = $this->getProjectDir().'/config'; 52 | 53 | $routes->import($confDir.'/{routes}/'.$this->environment.'/**/*'.self::CONFIG_EXTS, '/', 'glob'); 54 | $routes->import($confDir.'/{routes}/*'.self::CONFIG_EXTS, '/', 'glob'); 55 | $routes->import($confDir.'/{routes}'.self::CONFIG_EXTS, '/', 'glob'); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /tests/App/Twig/PremiumContentExtensionTest.php: -------------------------------------------------------------------------------- 1 | createMock(UserGroupHelper::class); 15 | 16 | $userGroupsLocationIds = [24]; 17 | 18 | $userGroups->expects($this->once()) 19 | ->method('isCurrentUserInOneOfTheGroups') 20 | ->with($userGroupsLocationIds) 21 | ->will($this->returnValue(true)); 22 | 23 | $subject = new PremiumContentExtension( 24 | $this->createMock(HtmlRenderer::class), 25 | $userGroups, 26 | $userGroupsLocationIds 27 | ); 28 | 29 | $result = $subject->hasAccessToPremiumContent(); 30 | 31 | $this->assertEquals(true, $result); 32 | } 33 | 34 | public function testHasAccessToPremiumContentWithWrongIds() 35 | { 36 | $userGroups = $this->createMock(UserGroupHelper::class); 37 | 38 | $userGroupsLocationIds = [36]; 39 | 40 | $userGroups->expects($this->once()) 41 | ->method('isCurrentUserInOneOfTheGroups') 42 | ->with($userGroupsLocationIds) 43 | ->will($this->returnValue(false)); 44 | 45 | $subject = new PremiumContentExtension( 46 | $this->createMock(HtmlRenderer::class), 47 | $userGroups, 48 | $userGroupsLocationIds 49 | ); 50 | 51 | $result = $subject->hasAccessToPremiumContent(); 52 | 53 | $this->assertEquals(false, $result); 54 | } 55 | 56 | public function testPreviewPremiumContent() 57 | { 58 | $htmlRenderer = $this->createMock(HtmlRenderer::class); 59 | 60 | $htmlDocument = 'rendered text'; 61 | 62 | $htmlRenderer->expects($this->once()) 63 | ->method('renderElements') 64 | ->with($htmlDocument, 5) 65 | ->will($this->returnValue($htmlDocument)); 66 | 67 | $subject = new PremiumContentExtension( 68 | $htmlRenderer, 69 | $this->createMock(UserGroupHelper::class), 70 | [] 71 | ); 72 | 73 | $result = $subject->previewPremiumContent($htmlDocument, 5); 74 | 75 | $this->assertEquals($htmlDocument, $result); 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /config/packages/security.yaml: -------------------------------------------------------------------------------- 1 | #security: 2 | # # https://symfony.com/doc/current/security.html#where-do-users-come-from-user-providers 3 | # providers: 4 | # in_memory: { memory: ~ } 5 | # firewalls: 6 | # dev: 7 | # pattern: ^/(_(profiler|wdt)|css|images|js)/ 8 | # security: false 9 | # main: 10 | # anonymous: true 11 | # 12 | # # activate different ways to authenticate 13 | # 14 | # # http_basic: true 15 | # # https://symfony.com/doc/current/security.html#a-configuring-how-your-users-will-authenticate 16 | # 17 | # # form_login: true 18 | # # https://symfony.com/doc/current/security/form_login_setup.html 19 | # 20 | # # Easy way to control access for large sections of your site 21 | # # Note: Only the *first* access control that matches will be used 22 | # access_control: 23 | # # - { path: ^/admin, roles: ROLE_ADMIN } 24 | # # - { path: ^/profile, roles: ROLE_USER } 25 | # 26 | 27 | # To get started with security, check out the documentation: 28 | # https://symfony.com/doc/current/security.html 29 | security: 30 | # https://symfony.com/doc/current/security.html#b-configuring-how-users-are-loaded 31 | providers: 32 | ezplatform: 33 | id: ezpublish.security.user_provider 34 | #! in_memory: 35 | #! memory: ~ 36 | 37 | firewalls: 38 | # disables authentication for assets and the profiler, adapt it according to your needs 39 | dev: 40 | pattern: ^/(_(profiler|wdt)|css|images|js)/ 41 | security: false 42 | 43 | ezpublish_forgot_password: 44 | pattern: /user/(forgot-password|reset-password) 45 | security: false 46 | 47 | ezpublish_front: 48 | pattern: ^/ 49 | user_checker: eZ\Publish\Core\MVC\Symfony\Security\UserChecker 50 | anonymous: ~ 51 | ezpublish_rest_session: ~ 52 | form_login: 53 | require_previous_session: false 54 | csrf_token_generator: security.csrf.token_manager 55 | logout: ~ 56 | 57 | main: 58 | anonymous: ~ 59 | # activate different ways to authenticate 60 | 61 | # https://symfony.com/doc/current/security.html#a-configuring-how-your-users-will-authenticate 62 | #http_basic: ~ 63 | 64 | # https://symfony.com/doc/current/security/form_login_setup.html 65 | #form_login: ~ 66 | -------------------------------------------------------------------------------- /src/Mail/Sender.php: -------------------------------------------------------------------------------- 1 | mailer = $mailer; 49 | $this->translator = $translator; 50 | $this->twig = $twig; 51 | $this->senderEmail = $senderEmail; 52 | $this->recipientEmail = $recipientEmail; 53 | } 54 | 55 | /** 56 | * @param \App\Model\Contact $contact 57 | * 58 | * @throws \Twig\Error\Error 59 | * @throws \Twig\Error\LoaderError 60 | * @throws \Twig\Error\RuntimeError 61 | * @throws \Twig\Error\SyntaxError 62 | */ 63 | public function send(Contact $contact): void 64 | { 65 | $title = $this->translator->trans('You have a new message from %from%', ['%from%' => $contact->getFrom()]); 66 | $message = new Swift_Message($title, $contact->getMessage()); 67 | $message 68 | ->setFrom($this->senderEmail) 69 | ->setTo($this->recipientEmail) 70 | ->setReplyTo($this->recipientEmail) 71 | ->setBody( 72 | $this->twig->render('/themes/tastefulplanet/mail/contact.html.twig', [ 73 | 'contact' => $contact 74 | ]) 75 | ); 76 | 77 | $this->mailer->send($message); 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /behat.yml.dist: -------------------------------------------------------------------------------- 1 | default: 2 | calls: 3 | error_reporting: -1 # Report all PHP errors 4 | formatters: 5 | pretty: true 6 | allure: 7 | output_path: '%paths.base%/build/allure' 8 | extensions: 9 | Behat\MinkExtension: 10 | base_url: 'http://localhost' 11 | goutte: ~ 12 | javascript_session: selenium 13 | sessions: 14 | selenium: 15 | selenium2: 16 | browser: chrome 17 | wd_host: 'http://localhost:4444/wd/hub' 18 | capabilities: 19 | extra_capabilities: 20 | chromeOptions: 21 | args: 22 | - "--window-size=1440,1080" 23 | - "--no-sandbox" 24 | # problem with different iframe host - https://bugs.chromium.org/p/chromedriver/issues/detail?id=2758 25 | - "--disable-features=site-per-process" 26 | chrome: 27 | chrome: 28 | api_url: "http://localhost:9222" 29 | 30 | DMore\ChromeExtension\Behat\ServiceContainer\ChromeExtension: ~ 31 | 32 | FriendsOfBehat\SymfonyExtension\ServiceContainer\SymfonyExtension: 33 | kernel: 34 | path: src/Kernel.php 35 | class: App\Kernel 36 | environment: behat 37 | debug: true 38 | 39 | EzSystems\BehatBundle\BehatExtension: ~ 40 | 41 | Liuggio\Fastest\Behat\ListFeaturesExtension\Extension: ~ 42 | 43 | Bex\Behat\ScreenshotExtension: 44 | active_image_drivers: cloudinary 45 | image_drivers: 46 | cloudinary: 47 | screenshot_directory: /tmp/behat-screenshot/ 48 | cloud_name: ezplatformtravis 49 | preset: ezplatform 50 | mode: normal 51 | limit: 10 52 | 53 | Allure\Behat\AllureFormatterExtension: ~ 54 | 55 | suites: ~ 56 | 57 | imports: 58 | - vendor/ezsystems/ezplatform-kernel/eZ/Bundle/EzPublishCoreBundle/behat_suites.yml 59 | - vendor/ezsystems/ezplatform-content-forms/behat_suites.yml 60 | - vendor/ezsystems/ezplatform-admin-ui/behat_suites.yml 61 | - vendor/ezsystems/behatbundle/behat_suites.yml 62 | - vendor/ezsystems/ezplatform-http-cache/behat_suites.yml 63 | --------------------------------------------------------------------------------