Skip to content
This repository has been archived by the owner on Mar 28, 2024. It is now read-only.

Commit

Permalink
#25 : Add smartcontent bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-bastien committed Feb 7, 2020
1 parent 0693f5c commit c828027
Show file tree
Hide file tree
Showing 15 changed files with 126 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
/vendor/
/public/bundles/
/public/build/
/public/upload/
yarn-error.log
/node_modules
composer.lock
Expand All @@ -42,3 +43,7 @@ yarn.lock
.phpunit.result.cache
/phpunit.xml
###< symfony/phpunit-bridge ###

###> liip/imagine-bundle ###
/public/media/cache/
###< liip/imagine-bundle ###
6 changes: 5 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,15 @@
"require": {
"php": ">=5.5.9",
"doctrine/doctrine-bundle": "^1.6",
"liip/imagine-bundle": "^2.3",
"nelmio/alice": "^3.5",
"phpmetrics/phpmetrics": "^2.5",
"sensio/framework-extra-bundle": "^5.5",
"smartbooster/authentication-bundle": "^1.0@dev",
"smartbooster/content-bundle": "^1.0@dev",
"smartbooster/etl-bundle": "^1.0@dev",
"sonata-project/admin-bundle": "^3.56",
"stof/doctrine-extensions-bundle": "^1.3",
"symfony/asset": "^4.4",
"symfony/flex": "^1.6",
"symfony/form": "^4.4",
Expand All @@ -32,7 +35,8 @@
"symfony/twig-pack": "^1.0",
"symfony/validator": "^4.4",
"theofidry/alice-data-fixtures": "^1.1",
"twig/twig": "^2.10"
"twig/twig": "^2.10",
"vich/uploader-bundle": "^1.13"
},
"require-dev": {
"doctrine/doctrine-fixtures-bundle": "^3.3",
Expand Down
4 changes: 4 additions & 0 deletions config/bundles.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,15 @@
Smart\SonataBundle\SmartSonataBundle::class => ['all' => true],
Smart\AuthenticationBundle\SmartAuthenticationBundle::class => ['all' => true],
Smart\EtlBundle\SmartEtlBundle::class => ['all' => true],
Smart\ContentBundle\SmartContentBundle::class => ['all' => true],
Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true],
Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle::class => ['all' => true],
Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle::class => ['all' => true],
Yokai\SecurityTokenBundle\YokaiSecurityTokenBundle::class => ['all' => true],
Yokai\MessengerBundle\YokaiMessengerBundle::class => ['all' => true],
Nelmio\Alice\Bridge\Symfony\NelmioAliceBundle::class => ['all' => true],
Fidry\AliceDataFixtures\Bridge\Symfony\FidryAliceDataFixturesBundle::class => ['all' => true],
Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle::class => ['all' => true],
Vich\UploaderBundle\VichUploaderBundle::class => ['all' => true],
Liip\ImagineBundle\LiipImagineBundle::class => ['all' => true],
];
4 changes: 4 additions & 0 deletions config/packages/liip_imagine.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# See dos how to configure the bundle: https://symfony.com/doc/current/bundles/LiipImagineBundle/basic-usage.html
liip_imagine:
# valid drivers options include "gd" or "gmagick" or "imagick"
driver: "gd"
2 changes: 1 addition & 1 deletion config/packages/security.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ security:
path: admin_security_logout
target: admin_security_login_form
remember_me:
secret: "%secret%"
secret: "%kernel.secret%"
lifetime: 31536000 # 365 days
path: /
domain: admin.%domain%
Expand Down
13 changes: 13 additions & 0 deletions config/packages/smart_content.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
sonata_admin:
dashboard:
groups:
content:
label: dashboard_group.label_content
icon: '<i class="fa fa-file-text"></i>'
label_catalogue: admin
items:
- smart_content.admin.post
- smart_content.admin.author
- smart_content.admin.category
- smart_content.admin.tag
- smart_content.admin.media
9 changes: 9 additions & 0 deletions config/packages/sonata_admin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ sonata_admin:
- App\Entity\User\Administrator

dashboard:
blocks:
-
position: left
type: sonata.admin.block.admin_list
-
position: right
type: smart_content.block.admin.recent_posts
groups:
users:
label: dashboard.label_users
Expand All @@ -29,3 +36,5 @@ sonata_block:
blocks:
sonata.admin.block.admin_list:
contexts: [admin]
smart_content.block.admin.recent_posts:
contexts: [admin]
7 changes: 7 additions & 0 deletions config/packages/stof_doctrine_extensions.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Read the documentation: https://symfony.com/doc/current/bundles/StofDoctrineExtensionsBundle/index.html
# See the official DoctrineExtensions documentation for more details: https://github.com/Atlantic18/DoctrineExtensions/tree/master/doc/
stof_doctrine_extensions:
default_locale: fr_FR
orm:
default:
timestampable: true
4 changes: 2 additions & 2 deletions config/packages/translation.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
framework:
default_locale: en
default_locale: fr
translator:
default_path: '%kernel.project_dir%/translations'
fallbacks:
- en
- fr
7 changes: 7 additions & 0 deletions config/packages/vich_uploader.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
vich_uploader:
db_driver: orm

#mappings:
# products:
# uri_prefix: /images/products
# upload_destination: '%kernel.project_dir%/public/images/products'
2 changes: 2 additions & 0 deletions config/routes/liip_imagine.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
_liip_imagine:
resource: "@LiipImagineBundle/Resources/config/routing.yaml"
1 change: 1 addition & 0 deletions config/routes/sonata_admin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ admin_area:
_sonata_admin:
resource: .
type: sonata_admin
host: "admin.%domain%"

_admin:
resource: admin
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ services:
- "9000:9000"
volumes:
- ./:/var/www
- ./var/logs/php/:/var/www/var/logs
- ./var/log/php/:/var/www/var/logs
nginx:
build:
context: '.docker/nginx'
Expand All @@ -23,7 +23,7 @@ services:
volumes:
- ./:/var/www
- .docker/nginx/conf.d/nginx.conf:/etc/nginx/conf.d/default.conf
- ./var/logs/nginx/:/var/log/nginx
- ./var/log/nginx/:/var/log/nginx
mysql:
image: mysql:5.7
container_name: ${APPLICATION}-docker-mysql
Expand Down
Empty file.
64 changes: 64 additions & 0 deletions symfony.lock
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"behat/transliterator": {
"version": "v1.3.0"
},
"cocur/slugify": {
"version": "v3.2"
},
Expand Down Expand Up @@ -102,9 +105,18 @@
"fzaninotto/faker": {
"version": "v1.9.1"
},
"gedmo/doctrine-extensions": {
"version": "v2.4.39"
},
"imagine/imagine": {
"version": "1.2.3"
},
"jdorn/sql-formatter": {
"version": "v1.2.17"
},
"jms/metadata": {
"version": "2.1.0"
},
"knplabs/knp-menu": {
"version": "2.6.0"
},
Expand All @@ -120,6 +132,19 @@
"laminas/laminas-zendframework-bridge": {
"version": "1.0.1"
},
"liip/imagine-bundle": {
"version": "1.8",
"recipe": {
"repo": "github.com/symfony/recipes-contrib",
"branch": "master",
"version": "1.8",
"ref": "1d42bc3f713130582e6e0c475c49bc327ab0a2a2"
},
"files": [
"config/packages/liip_imagine.yaml",
"config/routes/liip_imagine.yaml"
]
},
"monolog/monolog": {
"version": "1.25.3"
},
Expand Down Expand Up @@ -202,6 +227,9 @@
"smartbooster/authentication-bundle": {
"version": "v1.0.1"
},
"smartbooster/content-bundle": {
"version": "1.0-dev"
},
"smartbooster/etl-bundle": {
"version": "v1.0.3"
},
Expand Down Expand Up @@ -267,6 +295,18 @@
"phpcs.xml.dist"
]
},
"stof/doctrine-extensions-bundle": {
"version": "1.2",
"recipe": {
"repo": "github.com/symfony/recipes-contrib",
"branch": "master",
"version": "1.2",
"ref": "6c1ceb662f8997085f739cd089bfbef67f245983"
},
"files": [
"config/packages/stof_doctrine_extensions.yaml"
]
},
"swiftmailer/swiftmailer": {
"version": "v6.2.3"
},
Expand Down Expand Up @@ -438,12 +478,18 @@
"symfony/polyfill-iconv": {
"version": "v1.13.1"
},
"symfony/polyfill-intl-grapheme": {
"version": "v1.13.1"
},
"symfony/polyfill-intl-icu": {
"version": "v1.13.1"
},
"symfony/polyfill-intl-idn": {
"version": "v1.13.1"
},
"symfony/polyfill-intl-normalizer": {
"version": "v1.13.1"
},
"symfony/polyfill-mbstring": {
"version": "v1.13.1"
},
Expand All @@ -453,6 +499,9 @@
"symfony/polyfill-php73": {
"version": "v1.13.1"
},
"symfony/process": {
"version": "v5.0.3"
},
"symfony/profiler-pack": {
"version": "v1.0.4"
},
Expand Down Expand Up @@ -506,6 +555,9 @@
"symfony/stopwatch": {
"version": "v5.0.2"
},
"symfony/string": {
"version": "v5.0.3"
},
"symfony/swiftmailer-bundle": {
"version": "2.5",
"recipe": {
Expand Down Expand Up @@ -619,6 +671,18 @@
"twig/twig": {
"version": "v2.12.3"
},
"vich/uploader-bundle": {
"version": "1.5",
"recipe": {
"repo": "github.com/symfony/recipes-contrib",
"branch": "master",
"version": "1.5",
"ref": "c4f5755b37fb65b9c6a3cbdae91205c15a137ed4"
},
"files": [
"config/packages/vich_uploader.yaml"
]
},
"webimpress/safe-writer": {
"version": "2.0.0"
},
Expand Down

0 comments on commit c828027

Please sign in to comment.