Last active
February 15, 2018 09:29
-
-
Save covex-nn/2f5128e147e295d75098ffa44b6d8c2c to your computer and use it in GitHub Desktop.
Install SonataPageBundle with Symfony Flex
This file contains 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
{ | |
"type": "project", | |
"license": "MIT", | |
"require": { | |
"php": "^7.0.8", | |
"doctrine/doctrine-bundle": "^1.8", | |
"jms/serializer-bundle": "^2.3", | |
"sonata-project/doctrine-orm-admin-bundle": "^3.4", | |
"sonata-project/page-bundle": "3.x-dev", | |
"sonata-project/seo-bundle": "2.x-dev", | |
"symfony/console": "^3.4", | |
"symfony/flex": "^1.0", | |
"symfony/framework-bundle": "^3.4", | |
"symfony/lts": "^3", | |
"symfony/yaml": "^3.4" | |
}, | |
"require-dev": { | |
"symfony/dotenv": "^3.4" | |
}, | |
"config": { | |
"preferred-install": { | |
"*": "dist" | |
}, | |
"sort-packages": true | |
}, | |
"autoload": { | |
"psr-4": { | |
"App\\": "src/" | |
} | |
}, | |
"autoload-dev": { | |
"psr-4": { | |
"App\\Tests\\": "tests/" | |
} | |
}, | |
"scripts": { | |
"auto-scripts": { | |
"cache:clear": "symfony-cmd", | |
"assets:install --symlink --relative %PUBLIC_DIR%": "symfony-cmd" | |
}, | |
"post-install-cmd": [ | |
"@auto-scripts" | |
], | |
"post-update-cmd": [ | |
"@auto-scripts" | |
] | |
}, | |
"conflict": { | |
"symfony/symfony": "*" | |
}, | |
"extra": { | |
"symfony": { | |
"allow-contrib": true | |
} | |
} | |
} |
This file contains 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
# Read the documentation: https://symfony.com/doc/master/cmf/bundles/routing/configuration.html | |
# Install phpcr stack before using this configuration | |
cmf_routing: | |
chain: | |
routers_by_id: | |
#cmf_routing.dynamic_router: 200 | |
sonata.page.router: 150 | |
router.default: 100 |
This file contains 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
sonata_notification: | |
consumers: | |
register_default: false | |
admin: | |
enabled: false |
This file contains 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
twig: | |
form_themes: | |
- '@SonataCore/Form/datepicker.html.twig' | |
sonata_block: | |
context_manager: sonata.page.block.context_manager | |
default_contexts: [sonata_page_bundle] | |
sonata_admin: | |
assets: | |
extra_javascripts: | |
- bundles/sonatapage/sonata-page.back.min.js | |
extra_stylesheets: | |
- bundles/sonatapage/sonata-page.back.min.css | |
sonata_page: | |
slugify_service: sonata.core.slugify.cocur | |
multisite: host | |
use_streamed_response: false | |
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' | |
page_defaults: | |
homepage: # disable decoration for homepage, key - is a page route | |
decorate: false | |
default_template: default | |
templates: | |
default: | |
path: '@SonataPage/layout.html.twig' | |
name: 'default' | |
2columns: | |
path: '@SonataPage/2columns_layout.html.twig' | |
name: '2 columns layout' | |
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 | |
class: | |
block: 'App\Entity\SonataPageBlock' | |
page: 'App\Entity\SonataPagePage' | |
site: 'App\Entity\SonataPageSite' | |
snapshot: 'App\Entity\SonataPageSnapshot' |
This file contains 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
sonata_page_exceptions: | |
resource: '@SonataPageBundle/Resources/config/routing/exceptions.xml' | |
prefix: / | |
sonata_page_cache: | |
resource: '@SonataPageBundle/Resources/config/routing/cache.xml' | |
prefix: / |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<serializer> | |
<class name="App\Entity\SonataPageBlock" exclusion-policy="all" xml-root-name="_block"> | |
<property xml-attribute-map="true" name="id" type="integer" expose="true" since-version="1.0" groups="sonata_api_read,sonata_api_write,sonata_search"/> | |
</class> | |
</serializer> |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<serializer> | |
<class name="App\Entity\SonataPagePage" exclusion-policy="all" xml-root-name="_page"> | |
<property xml-attribute-map="true" name="id" type="integer" expose="true" since-version="1.0" groups="sonata_api_read,sonata_api_write,sonata_search"/> | |
</class> | |
</serializer> |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<serializer> | |
<class name="App\Entity\SonataPageSite" exclusion-policy="all" xml-root-name="_site"> | |
<property xml-attribute-map="true" name="id" type="integer" expose="true" since-version="1.0" groups="sonata_api_read,sonata_api_write,sonata_search"/> | |
</class> | |
</serializer> |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<serializer> | |
<class name="App\Entity\SonataPageSnapshot" exclusion-policy="all" xml-root-name="_snapshot"> | |
<property xml-attribute-map="true" name="id" type="integer" expose="true" since-version="1.0" groups="sonata_api_read,sonata_api_write,sonata_search"/> | |
</class> | |
</serializer> |
This file contains 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
version: '3.2' | |
services: | |
mysql: | |
networks: | |
- default | |
phpmyadmin: | |
image: phpmyadmin/phpmyadmin | |
ports: | |
- 8080:80 | |
networks: | |
- default | |
environment: | |
PMA_ARBITRARY: "1" | |
PMA_HOST: "mysql" | |
PMA_USER: "root" | |
PMA_PASSWORD: "root" | |
volumes: | |
- /sessions |
This file contains 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
version: '3.2' | |
services: | |
mysql: | |
image: mysql:5.7 | |
ports: | |
- "3306:3306" | |
expose: | |
- 3306 | |
environment: | |
MYSQL_ROOT_PASSWORD: "root" | |
MYSQL_DATABASE: "db_name" | |
MYSQL_USER: "db_user" | |
MYSQL_PASSWORD: "db_password" | |
volumes: | |
- database:/var/lib/mysql | |
volumes: | |
database: |
This file contains 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
<?php | |
namespace App\Entity; | |
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="integer") | |
* @ORM\GeneratedValue(strategy="AUTO") | |
* @var int | |
*/ | |
protected $id; | |
public function getId() | |
{ | |
return $this->id; | |
} | |
} |
This file contains 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
<?php | |
namespace App\Entity; | |
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="integer") | |
* @ORM\GeneratedValue(strategy="AUTO") | |
* @var int | |
*/ | |
protected $id; | |
public function getId() | |
{ | |
return $this->id; | |
} | |
} |
This file contains 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
<?php | |
namespace App\Entity; | |
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="integer") | |
* @ORM\GeneratedValue(strategy="AUTO") | |
* @var int | |
*/ | |
protected $id; | |
public function getId() | |
{ | |
return $this->id; | |
} | |
} |
This file contains 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
<?php | |
namespace App\Entity; | |
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="integer") | |
* @ORM\GeneratedValue(strategy="AUTO") | |
* @var int | |
*/ | |
protected $id; | |
public function getId() | |
{ | |
return $this->id; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment