reaccionestudio / reaccion-cms-bundle
An easy Content Management System built with Symfony
Installs: 40
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: ^7.4
- ext-ctype: *
- ext-iconv: *
- cocur/slugify: ^4.2
- defuse/php-encryption: 2.2.1
- doctrine/annotations: ^1.0
- doctrine/doctrine-bundle: ^2.7
- doctrine/doctrine-migrations-bundle: ^3.2.2
- doctrine/orm: ^2.13
- friendsofsymfony/jsrouting-bundle: ^2.2
- friendsofsymfony/user-bundle: ^3.1.0
- gumlet/php-image-resize: ^1.9
- knplabs/knp-paginator-bundle: ^5.9.0
- phpdocumentor/reflection-docblock: ^5.3
- phpstan/phpdoc-parser: ^1.13
- sensio/framework-extra-bundle: ^5.1
- swiftmailer/swiftmailer: ^6.1.3
- symfony/asset: 5.4.*
- symfony/console: 5.4.*
- symfony/expression-language: *
- symfony/flex: ^1.17|^2
- symfony/form: *
- symfony/framework-bundle: 5.4.*
- symfony/monolog-bundle: ^3.3
- symfony/options-resolver: *
- symfony/process: *
- symfony/property-access: 5.4.*
- symfony/property-info: 5.4.*
- symfony/proxy-manager-bridge: 5.4.*
- symfony/security-bundle: *
- symfony/serializer: 5.4.*
- symfony/swiftmailer-bundle: ^3.2
- symfony/translation: *
- symfony/twig-bundle: 5.4.*
- symfony/validator: *
- symfony/web-link: *
- symfony/web-server-bundle: ^4.0
- symfony/webpack-encore-bundle: ^1.16
- symfony/yaml: 5.4.*
- twig/extensions: ^1.5
Requires (Dev)
- phpunit/phpunit: ^9.5
- symfony/browser-kit: 5.4.*
- symfony/css-selector: 5.4.*
- symfony/debug-bundle: 5.4.*
- symfony/dotenv: *
- symfony/maker-bundle: ^1.0
- symfony/phpunit-bridge: ^6.1
- symfony/stopwatch: 5.4.*
- symfony/web-profiler-bundle: 5.4.*
- symfony/web-server-bundle: *
This package is auto-updated.
Last update: 2023-12-11 16:50:53 UTC
README
Currently in development. Tested on Symfony 4.1.10
Installation
(Symfony recipe coming soon)
Install the package with composer
composer require reaccionestudio/reaccion-cms-bundle
Enable the bundle in config/bundles.php file:
<?php
# config/bundles.php
return [
// ...
ReaccionEstudio\ReaccionCMSBundle\ReaccionCMSBundle::class => ['all' => true],
];
Add required parameters in the config/services.yaml file
# config/services.yaml
encryption_key: 'YOUR_ENCRIPTION_KEY'
Load the Routes of the Bundle:
# config/routes.yaml
reaccion_cms:
resource: "@ReaccionCMSBundle/Resources/config/routing/all.xml"
prefix: /
Add new twig config parameters:
# config/packages/twig.yaml
twig:
# ...
paths:
'%kernel.project_dir%/vendor/reaccionestudio/reaccion-cms-bundle/Resources/views' : ReaccionCMSBundle
form_themes:
- 'bootstrap_4_layout.html.twig'
Update config/packages/security.xml file:
security:
# https://symfony.com/doc/current/security.html#where-do-users-come-from-user-providers
encoders:
ReaccionEstudio\ReaccionCMSBundle\Entity\User: sha512
role_hierarchy:
ROLE_ADMIN: [ ROLE_USER, ROLE_EDITOR ]
ROLE_EDITOR: [ ROLE_USER ]
providers:
fos_userbundle:
id: fos_user.user_provider.username_email
firewalls:
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
main:
pattern: ^/
user_checker: security.user_checker
form_login:
provider: fos_userbundle
csrf_token_generator: security.csrf.token_manager
login_path: fos_user_security_login
check_path: fos_user_security_check
logout:
path: /logout
anonymous: true
# Easy way to control access for large sections of your site
# Note: Only the *first* access control that matches will be used
access_control:
- { path: ^/admin, roles: ROLE_ADMIN }
- { path: ^/, roles: IS_AUTHENTICATED_ANONYMOUSLY }
Create assets/js/front_app.js:
const $ = require('jquery');
// JS
require('bootstrap');
require('@root/public/bundles/reaccioncms/javascript/Main.js');
// SCSS
require('@root/public/bundles/reaccioncms/stylesheet/global.scss');
Add asset entry in the webpack.config.js file with the following options:
# webpack.config.js
var Encore = require('@symfony/webpack-encore');
const path = require('path');
const ROOT_PATH = path.resolve(__dirname, './');
const ALIASES = {
'@root' : ROOT_PATH,
'@vendor' : ROOT_PATH + '/vendor'
};
// ...
Encore
.addAliases(ALIASES)
.addEntry('front_app', './assets/js/front_app.js')
.autoProvidejQuery()
.autoProvideVariables({ Popper: ['popper.js', 'default'] })
// enables Sass/SCSS support
.enableSassLoader()
.disableSingleRuntimeChunk()
Create you package.json file in the Symfony root folder with the following content:
{
"devDependencies": {
"@symfony/webpack-encore": "^0.22.2",
"jquery": "^3.3.1",
"node-sass": "^4.10.0",
"popper.js": "^1.14.4",
"sass-loader": "^7.1.0",
"webpack-notifier": "^1.6.0",
"path": "^0.12.7"
},
"dependencies": {
"@ckeditor/ckeditor5-build-classic": "^11.2.0",
"ajv": "^6.6.1",
"bootstrap": "^4.3.1"
},
"scripts": {
"dev": "encore dev",
"watch": "encore dev --watch",
"build": "encore production --progress"
}
}
Build environment assets:
-
For development:
sh vendor/reaccionestudio/reaccion-cms-bundle/Resources/bin/build.sh dev
-
For production:
sh vendor/reaccionestudio/reaccion-cms-bundle/Resources/bin/build.sh prod
Generate your database url in the .env file
DATABASE_URL=mysql://username:password@host:port/database_name
Create database schema
php bin/console doctrine:schema:update --force
Import default data from install.sql file in your database
vendor/reaccionestudio/reaccion-cms-bundle/Resources/init_data/install.sql