diff --git a/sonata-project/page-bundle/4.0/post-install.txt b/sonata-project/page-bundle/4.0/post-install.txt index 51058e420..eb948814c 100644 --- a/sonata-project/page-bundle/4.0/post-install.txt +++ b/sonata-project/page-bundle/4.0/post-install.txt @@ -1,12 +1,12 @@ * Your Page is almost ready: - 1. Generate a migration for Sonata Page Database php bin/console doctrine:migrations:diff + 1. Generate a migration for Sonata Page Database bin/console doctrine:migrations:diff If you use Doctrine Attribute Reference, You must change Sonata Entities generated in Entity folder. You can check more details at https://www.doctrine-project.org/projects/doctrine-orm/en/current/reference/attributes-reference.html You can also use Rector to refactor, check more details at https://getrector.org/blog/how-to-upgrade-annotations-to-attributes - 2. Apply the migration generated php bin/console doctrine:migrations:migrate --no-interaction + 2. Apply the migration generated bin/console doctrine:migrations:migrate --no-interaction 3. Create your first site: bin/console sonata:page:create-site --enabled --name=localhost --locale=- --host=localhost --relativePath=- --enabledFrom=now --enabledTo=- --default After you generate your site, You will see few commands to execute to have your Site ready. diff --git a/sonata-project/page-bundle/4.9/config/packages/sonata_page.yaml b/sonata-project/page-bundle/4.9/config/packages/sonata_page.yaml new file mode 100644 index 000000000..a8991ddc4 --- /dev/null +++ b/sonata-project/page-bundle/4.9/config/packages/sonata_page.yaml @@ -0,0 +1,76 @@ +sonata_block: + default_contexts: [sonata_page_bundle] + +sonata_admin: + assets: + extra_javascripts: + - bundles/sonatapage/app.js + extra_stylesheets: + - bundles/sonatapage/app.css + +# https://docs.sonata-project.org/projects/SonataPageBundle/en/4.x/reference/advanced_configuration/ +sonata_page: + multisite: host + use_streamed_response: false + + router_auto_register: + enabled: true + priority: 150 + ignore_route_patterns: + - ^(.*)admin(.*) # ignore admin route, ie route containing 'admin' + - ^_(.*) # ignore symfony routes + ignore_routes: + - sonata_page_cache_esi + - sonata_page_cache_ssi + - sonata_page_js_sync_cache + - sonata_page_js_async_cache + - sonata_cache_esi + - sonata_cache_ssi + - sonata_cache_js_async + - sonata_cache_js_sync + - sonata_cache_apc + ignore_uri_patterns: + - ^/admin\/ # ignore admin route, ie route containing 'admin' + + #https://docs.sonata-project.org/projects/SonataPageBundle/en/4.x/reference/page_composer/ + default_template: default + templates: + default: + path: '@SonataPage/layout.html.twig' + name: 'default' + containers: + header: + name: Header + content_top: + name: Top content + content: + name: Main content + content_bottom: + name: Bottom content + footer: + name: Footer + matrix: + layout: | + HHHHHHHH + HHHHHHHH + TTTTTTTT + TTTTTTTT + CCCCCCCC + CCCCCCCC + BBBBBBBB + BBBBBBBB + FFFFFFFF + FFFFFFFF + + mapping: + H: header + T: content_top + C: content + B: content_bottom + F: footer + + direct_publication: '%kernel.debug%' + + catch_exceptions: + not_found: [404] # render 404 page with "not_found" key (name generated: _page_internal_error_{key}) + fatal: [500] # so you can use the same page for different http errors or specify specific page for each error diff --git a/sonata-project/page-bundle/4.9/config/routes/sonata_page.yaml b/sonata-project/page-bundle/4.9/config/routes/sonata_page.yaml new file mode 100644 index 000000000..f824032f0 --- /dev/null +++ b/sonata-project/page-bundle/4.9/config/routes/sonata_page.yaml @@ -0,0 +1,3 @@ +sonata_page_exceptions: + resource: '@SonataPageBundle/Resources/config/routing/exceptions.xml' + prefix: / diff --git a/sonata-project/page-bundle/4.9/manifest.json b/sonata-project/page-bundle/4.9/manifest.json new file mode 100644 index 000000000..c961fb44c --- /dev/null +++ b/sonata-project/page-bundle/4.9/manifest.json @@ -0,0 +1,9 @@ +{ + "bundles": { + "Sonata\\PageBundle\\SonataPageBundle": ["all"] + }, + "copy-from-recipe": { + "config/": "%CONFIG_DIR%/", + "src/": "%SRC_DIR%/" + } +} diff --git a/sonata-project/page-bundle/4.9/post-install.txt b/sonata-project/page-bundle/4.9/post-install.txt new file mode 100644 index 000000000..86411f45a --- /dev/null +++ b/sonata-project/page-bundle/4.9/post-install.txt @@ -0,0 +1,7 @@ + * Your Page is almost ready: + 1. Generate a migration for Sonata Page Database php bin/console doctrine:migrations:diff + 2. Apply the migration generated php bin/console doctrine:migrations:migrate --no-interaction + 3. Create your first site: bin/console sonata:page:create-site --enabled --name=localhost --locale=- --host=localhost --relativePath=- --enabledFrom=now --enabledTo=- --default + Now you can create your first page at /admin + + * Documentation https://docs.sonata-project.org/projects/SonataPageBundle/en/4.x/ diff --git a/sonata-project/page-bundle/4.9/src/Entity/SonataPageBlock.php b/sonata-project/page-bundle/4.9/src/Entity/SonataPageBlock.php new file mode 100644 index 000000000..3b723ad9a --- /dev/null +++ b/sonata-project/page-bundle/4.9/src/Entity/SonataPageBlock.php @@ -0,0 +1,19 @@ +