-
-
Notifications
You must be signed in to change notification settings - Fork 661
Change SonataPageBundle entities #1809
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
eerison
wants to merge
1
commit into
symfony:main
Choose a base branch
from
eerison:update-sonata-page-recipes
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+173
−2
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
76 changes: 76 additions & 0 deletions
76
sonata-project/page-bundle/4.9/config/packages/sonata_page.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
3 changes: 3 additions & 0 deletions
3
sonata-project/page-bundle/4.9/config/routes/sonata_page.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
sonata_page_exceptions: | ||
resource: '@SonataPageBundle/Resources/config/routing/exceptions.xml' | ||
prefix: / |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"bundles": { | ||
"Sonata\\PageBundle\\SonataPageBundle": ["all"] | ||
}, | ||
"copy-from-recipe": { | ||
"config/": "%CONFIG_DIR%/", | ||
"src/": "%SRC_DIR%/" | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
* Your Page is almost ready: | ||
1. Generate a migration for Sonata Page Database <info>php bin/console doctrine:migrations:diff</info> | ||
2. Apply the migration generated <info>php bin/console doctrine:migrations:migrate --no-interaction</info> | ||
3. Create your first site: <info>bin/console sonata:page:create-site --enabled --name=localhost --locale=- --host=localhost --relativePath=- --enabledFrom=now --enabledTo=- --default</info> | ||
<comment>Now you can create your first page at <info>/admin</info></comment> | ||
|
||
* <fg=blue>Documentation</> <comment>https://docs.sonata-project.org/projects/SonataPageBundle/en/4.x/</comment> |
19 changes: 19 additions & 0 deletions
19
sonata-project/page-bundle/4.9/src/Entity/SonataPageBlock.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace App\Entity; | ||
|
||
use Doctrine\DBAL\Types\Types; | ||
use Doctrine\ORM\Mapping as ORM; | ||
use Sonata\PageBundle\Entity\BaseBlock; | ||
|
||
#[ORM\Entity] | ||
#[ORM\Table(name: 'page__block')] | ||
class SonataPageBlock extends BaseBlock | ||
{ | ||
#[ORM\Id] | ||
#[ORM\Column(type: Types::INTEGER)] | ||
#[ORM\GeneratedValue] | ||
protected $id; | ||
} |
19 changes: 19 additions & 0 deletions
19
sonata-project/page-bundle/4.9/src/Entity/SonataPagePage.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace App\Entity; | ||
|
||
use Doctrine\DBAL\Types\Types; | ||
use Doctrine\ORM\Mapping as ORM; | ||
use Sonata\PageBundle\Entity\BasePage; | ||
|
||
#[ORM\Entity] | ||
#[ORM\Table(name: 'page__page')] | ||
class SonataPagePage extends BasePage | ||
{ | ||
#[ORM\Id] | ||
#[ORM\Column(type: Types::INTEGER)] | ||
#[ORM\GeneratedValue] | ||
protected $id; | ||
} |
19 changes: 19 additions & 0 deletions
19
sonata-project/page-bundle/4.9/src/Entity/SonataPageSite.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace App\Entity; | ||
|
||
use Doctrine\DBAL\Types\Types; | ||
use Doctrine\ORM\Mapping as ORM; | ||
use Sonata\PageBundle\Entity\BaseSite; | ||
|
||
#[ORM\Entity] | ||
#[ORM\Table(name: 'page__site')] | ||
class SonataPageSite extends BaseSite | ||
{ | ||
#[ORM\Id] | ||
#[ORM\Column(type: Types::INTEGER)] | ||
#[ORM\GeneratedValue] | ||
protected $id; | ||
} |
19 changes: 19 additions & 0 deletions
19
sonata-project/page-bundle/4.9/src/Entity/SonataPageSnapshot.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace App\Entity; | ||
|
||
use Doctrine\DBAL\Types\Types; | ||
use Doctrine\ORM\Mapping as ORM; | ||
use Sonata\PageBundle\Entity\BaseSnapshot; | ||
|
||
#[ORM\Entity] | ||
#[ORM\Table(name: 'page__snapshot')] | ||
class SonataPageSnapshot extends BaseSnapshot | ||
{ | ||
#[ORM\Id] | ||
#[ORM\Column(type: Types::INTEGER)] | ||
#[ORM\GeneratedValue] | ||
protected $id; | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you need to remove
php
part as well as for 4.0 post-install.txt?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @diimpp , thank you to Review,
It works with both ways, but I'm removing because I want to keep like in the docs
https://github.com/sonata-project/SonataPageBundle/pull/1809/files#diff-616dbd37597845318190158bb507fa469a0edcf22ef874936b54972be8d27a0dR19
And the doc's lint doesn't allow to use php as command prefix