# DATABASE_URL="mysql://db_user:db_password@127.0.0.1:3306/db_name?serverVersion=5.7" | # DATABASE_URL="mysql://db_user:db_password@127.0.0.1:3306/db_name?serverVersion=5.7" | ||||
DATABASE_URL="postgresql://db_user:db_password@127.0.0.1:5432/db_name?serverVersion=13&charset=utf8" | DATABASE_URL="postgresql://db_user:db_password@127.0.0.1:5432/db_name?serverVersion=13&charset=utf8" | ||||
###< doctrine/doctrine-bundle ### | ###< doctrine/doctrine-bundle ### | ||||
###> mailjet/mailjet-bundle ### | |||||
MAILJET_APIKEY_PUBLIC=your-api_key | |||||
MAILJET_APIKEY_PRIVATE=@@your-secret_key | |||||
###< mailjet/mailjet-bundle ### |
*/ | */ | ||||
// any CSS you import will output into a single css file (app.css in this case) | // any CSS you import will output into a single css file (app.css in this case) | ||||
import './styles/app.css'; | |||||
// start the Stimulus application | |||||
import './bootstrap'; | |||||
import './common.scss'; | |||||
import './common.js'; |
import { startStimulusApp } from '@symfony/stimulus-bridge'; | |||||
// Registers Stimulus controllers from controllers.json and in the controllers/ directory | |||||
export const app = startStimulusApp(require.context( | |||||
'@symfony/stimulus-bridge/lazy-controller-loader!./controllers', | |||||
true, | |||||
/\.(j|t)sx?$/ | |||||
)); | |||||
// register any custom, 3rd party controllers here | |||||
// app.register('some_controller_name', SomeImportedController); |
import { Controller } from 'stimulus'; | |||||
/* | |||||
* This is an example Stimulus controller! | |||||
* | |||||
* Any element with a data-controller="hello" attribute will cause | |||||
* this controller to be executed. The name "hello" comes from the filename: | |||||
* hello_controller.js -> "hello" | |||||
* | |||||
* Delete this file or adapt it for your use! | |||||
*/ | |||||
export default class extends Controller { | |||||
connect() { | |||||
this.element.textContent = 'Hello Stimulus! Edit me in assets/controllers/hello_controller.js'; | |||||
} | |||||
} |
/* | |||||
* Welcome to your app's main JavaScript file! | |||||
* | |||||
* We recommend including the built version of this JavaScript file | |||||
* (and its CSS file) in your base layout (base.html.twig). | |||||
*/ | |||||
// any CSS you import will output into a single css file (app.css in this case) | |||||
import './app.scss'; | |||||
import './app.js'; |
import 'bootstrap'; | |||||
import "../js/script"; |
@import "./node_modules/bootstrap/scss/bootstrap"; | |||||
@import "../scss/vars"; | |||||
@import "../scss/mixin_responsive"; | |||||
@import "../scss/base"; | |||||
@import "../scss/home"; | |||||
@import "../scss/page"; | |||||
@import "../scss/header"; | |||||
@import "../scss/footer"; | |||||
@import "../scss/cookies"; |
$(document).ready(function () { | |||||
}); |
html { | |||||
font-size: 62.5%; | |||||
@include large-only { | |||||
font-size: 60%; | |||||
} | |||||
@include desktop-only { | |||||
font-size: 55%; | |||||
} | |||||
@include tablet-only { | |||||
font-size: 50%; | |||||
} | |||||
@include mobile-only { | |||||
font-size: 45%; | |||||
} | |||||
} | |||||
img { | |||||
max-width: 100%; | |||||
max-height: 100%; | |||||
} | |||||
h1, h2, h3, h4, h5, h6 { | |||||
} | |||||
li, p, a, select, option { | |||||
} | |||||
p { | |||||
font-size: 2.0rem; | |||||
} | |||||
.bold { | |||||
font-weight: bold; | |||||
} | |||||
a:hover { | |||||
text-decoration: none; | |||||
} | |||||
input:focus, | |||||
select:focus, | |||||
textarea:focus, | |||||
button:focus { | |||||
outline: none; | |||||
} | |||||
.hidden { | |||||
display: none; | |||||
} | |||||
.success-post { | |||||
color: $green; | |||||
border: 2px solid $green; | |||||
text-align: center; | |||||
padding: 15px; | |||||
margin-top: 50px; | |||||
margin-bottom: 50px; | |||||
} |
/* Cookies */ | |||||
$color-primary-cookies: $orange; | |||||
$font-family-cookies-title: 'FranklinGothic'; | |||||
$font-family-cookies-text: 'dinbold'; | |||||
.ch-cookie-consent { | |||||
position: fixed; | |||||
width: 500px; | |||||
bottom: 20px !important; | |||||
left: 20px !important; | |||||
z-index: 100; | |||||
padding: 30px; | |||||
background-color: white; | |||||
border: solid 1px #e0e0e0; | |||||
&.ch-cookie-consent--bottom { | |||||
//display: none; | |||||
} | |||||
.ch-cookie-consent__title { | |||||
font-family: $font-family-cookies-title; | |||||
color: $color-primary-cookies; | |||||
font-size: 25px; | |||||
font-weight: normal; | |||||
margin-bottom: 7px; | |||||
} | |||||
.ch-cookie-consent__intro { | |||||
margin-bottom: 5px; | |||||
line-height: 20px; | |||||
font-size: 20px; | |||||
} | |||||
.ch-cookie-consent__read-more { | |||||
color: $color-primary-cookies; | |||||
display: none; | |||||
} | |||||
form.ch-cookie-consent__form { | |||||
margin-top: 20px; | |||||
.ch-cookie-consent__category-group { | |||||
.ch-cookie-consent__category { | |||||
display: -ms-flexbox; | |||||
display: flex; | |||||
padding-top: 7px; | |||||
padding-bottom: 7px; | |||||
border: 0px none; | |||||
.ch-cookie-consent__category-toggle { | |||||
input { | |||||
display: none; | |||||
} | |||||
label { | |||||
cursor: pointer; | |||||
text-align: center; | |||||
padding: 3px 10px 3px 10px; | |||||
text-transform: uppercase; | |||||
border: solid 1px $color-primary-cookies; | |||||
color: $color-primary-cookies; | |||||
font-size: 13px; | |||||
font-family: $font-family-cookies-text; | |||||
} | |||||
input:checked + label, | |||||
label:hover { | |||||
background: none; | |||||
background-color: $color-primary-cookies; | |||||
color: white; | |||||
} | |||||
} | |||||
.ch-cookie-consent__category-information { | |||||
position: relative; | |||||
top: -2px; | |||||
margin-left: 20px; | |||||
.ch-cookie-consent__category-title { | |||||
color: $color-primary-cookies; | |||||
font-family: $font-family-cookies-text; | |||||
margin-bottom: 5px; | |||||
} | |||||
.ch-cookie-consent__category-description { | |||||
color: gray; | |||||
margin-top: 0px; | |||||
font-weight: normal; | |||||
font-family: $font-family-cookies-text; | |||||
font-size: 15px; | |||||
} | |||||
} | |||||
} | |||||
} | |||||
.ch-cookie-consent__btn-group { | |||||
margin-top: 15px; | |||||
text-align: left; | |||||
button { | |||||
display: block; | |||||
margin: 0px; | |||||
padding: 10px 0px 10px 0px; | |||||
cursor: pointer; | |||||
background: none; | |||||
background-color: $color-primary-cookies; | |||||
color: white; | |||||
text-transform: uppercase; | |||||
font-family: $font-family-cookies-title; | |||||
font-weight: normal; | |||||
font-size: 15px; | |||||
border: solid 1px #e0e0e0; | |||||
width: 100%; | |||||
&:hover { | |||||
background-color: white; | |||||
color: $color-primary-cookies !important; | |||||
} | |||||
} | |||||
} | |||||
} | |||||
} |
//576px | |||||
@mixin mobile-only { | |||||
@media screen and (max-width: $sm) { | |||||
@content; | |||||
} | |||||
} | |||||
//768px | |||||
@mixin tablet-only { | |||||
@media screen and (max-width: $md) { | |||||
@content; | |||||
} | |||||
} | |||||
//992px | |||||
@mixin desktop-only { | |||||
@media screen and (max-width: $lg) { | |||||
@content; | |||||
} | |||||
} | |||||
//1200px | |||||
@mixin large-only { | |||||
@media screen and (max-width: $xl) { | |||||
@content; | |||||
} | |||||
} |
$dir-fonts: '/public/assets/fonts/'; | |||||
$dir-img: '/public/assets/img/'; | |||||
$sm: 576px; | |||||
$md: 768px; | |||||
$lg: 992px; | |||||
$xl: 1200px; | |||||
$orange: #dc5b2f; | |||||
$green: #568b6f; | |||||
//Bootstrap | |||||
$grid-columns: 12; | |||||
$grid-gutter-width: 30px; | |||||
$grid-breakpoints: ( | |||||
// Extra small screen / phone | |||||
xs: 0, | |||||
// Small screen / phone | |||||
sm: $sm, | |||||
// Medium screen / tablet | |||||
md: $md, | |||||
// Large screen / desktop | |||||
lg: $lg, | |||||
// Extra large screen / wide desktop | |||||
xl: $xl | |||||
); |
body { | |||||
background-color: lightgray; | |||||
} |
{ | { | ||||
"type": "project", | |||||
"license": "proprietary", | |||||
"minimum-stability": "dev", | |||||
"prefer-stable": true, | |||||
"require": { | |||||
"php": ">=7.2.5", | |||||
"ext-ctype": "*", | |||||
"ext-iconv": "*", | |||||
"artgris/filemanager-bundle": "^2.2", | |||||
"composer/package-versions-deprecated": "1.11.99.2", | |||||
"doctrine/annotations": "^1.0", | |||||
"doctrine/doctrine-bundle": "^2.3", | |||||
"doctrine/doctrine-migrations-bundle": "^3.1", | |||||
"doctrine/orm": "^2.8", | |||||
"easycorp/easyadmin-bundle": "^3.3", | |||||
"friendsofsymfony/ckeditor-bundle": "^2.3", | |||||
"liip/imagine-bundle": "^2.6", | |||||
"phpdocumentor/reflection-docblock": "^5.2", | |||||
"sensio/framework-extra-bundle": "^5.1", | |||||
"stof/doctrine-extensions-bundle": "^1.6", | |||||
"symfony/asset": "5.2.*", | |||||
"symfony/console": "5.2.*", | |||||
"symfony/dotenv": "5.2.*", | |||||
"symfony/expression-language": "5.2.*", | |||||
"symfony/flex": "^1.3.1", | |||||
"symfony/form": "5.2.*", | |||||
"symfony/framework-bundle": "5.2.*", | |||||
"symfony/http-client": "5.2.*", | |||||
"symfony/intl": "5.2.*", | |||||
"symfony/mailer": "5.2.*", | |||||
"symfony/mime": "5.2.*", | |||||
"symfony/monolog-bundle": "^3.1", | |||||
"symfony/notifier": "5.2.*", | |||||
"symfony/process": "5.2.*", | |||||
"symfony/property-access": "5.2.*", | |||||
"symfony/property-info": "5.2.*", | |||||
"symfony/proxy-manager-bridge": "5.2.*", | |||||
"symfony/security-bundle": "5.2.*", | |||||
"symfony/serializer": "5.2.*", | |||||
"symfony/string": "5.2.*", | |||||
"symfony/translation": "5.2.*", | |||||
"symfony/twig-bundle": "^5.2", | |||||
"symfony/validator": "5.2.*", | |||||
"symfony/web-link": "5.2.*", | |||||
"symfony/webpack-encore-bundle": "^1.11", | |||||
"symfony/yaml": "5.2.*", | |||||
"twig/extra-bundle": "^2.12|^3.0", | |||||
"twig/twig": "^2.12|^3.0" | |||||
"type": "project", | |||||
"license": "proprietary", | |||||
"minimum-stability": "dev", | |||||
"prefer-stable": true, | |||||
"require": { | |||||
"php": ">=7.4", | |||||
"ext-ctype": "*", | |||||
"ext-iconv": "*", | |||||
"artgris/filemanager-bundle": "^2.2", | |||||
"composer/package-versions-deprecated": "1.11.99.2", | |||||
"connectholland/cookie-consent-bundle": "^0.9.10", | |||||
"doctrine/annotations": "^1.0", | |||||
"doctrine/doctrine-bundle": "^2.3", | |||||
"doctrine/doctrine-migrations-bundle": "^3.1", | |||||
"doctrine/orm": "^2.8", | |||||
"dompdf/dompdf": "^1.0", | |||||
"easycorp/easyadmin-bundle": "^3.3", | |||||
"friendsofsymfony/ckeditor-bundle": "^2.3", | |||||
"knplabs/knp-paginator-bundle": "^5.6", | |||||
"liip/imagine-bundle": "^2.6", | |||||
"phpdocumentor/reflection-docblock": "^5.2", | |||||
"sensio/framework-extra-bundle": "^5.1", | |||||
"stof/doctrine-extensions-bundle": "^1.6", | |||||
"symfony/asset": "5.3.*", | |||||
"symfony/console": "5.3.*", | |||||
"symfony/dotenv": "5.3.*", | |||||
"symfony/expression-language": "5.3.*", | |||||
"symfony/flex": "^1.3.1", | |||||
"symfony/form": "5.3.*", | |||||
"symfony/framework-bundle": "5.3.*", | |||||
"symfony/http-client": "5.3.*", | |||||
"symfony/intl": "5.3.*", | |||||
"symfony/mailer": "5.3.*", | |||||
"symfony/mime": "5.3.*", | |||||
"symfony/monolog-bundle": "^3.1", | |||||
"symfony/notifier": "5.3.*", | |||||
"symfony/process": "5.3.*", | |||||
"symfony/property-access": "5.3.*", | |||||
"symfony/property-info": "5.3.*", | |||||
"symfony/proxy-manager-bridge": "5.3.*", | |||||
"symfony/security-bundle": "5.3.*", | |||||
"symfony/serializer": "5.3.*", | |||||
"symfony/string": "5.3.*", | |||||
"symfony/translation": "5.3.*", | |||||
"symfony/twig-bundle": "^5.3", | |||||
"symfony/validator": "5.3.*", | |||||
"symfony/web-link": "5.3.*", | |||||
"symfony/webpack-encore-bundle": "^1.11", | |||||
"symfony/yaml": "5.3.*", | |||||
"twig/extra-bundle": "^2.12|^3.0", | |||||
"twig/twig": "^2.12|^3.0", | |||||
"mailjet/mailjet-bundle": "^2.0", | |||||
"mailjet/mailjet-swiftmailer": "1.0.6" | |||||
}, | |||||
"require-dev": { | |||||
"symfony/browser-kit": "^5.2", | |||||
"symfony/css-selector": "^5.2", | |||||
"symfony/debug-bundle": "^5.2", | |||||
"symfony/maker-bundle": "^1.0", | |||||
"symfony/phpunit-bridge": "^5.2", | |||||
"symfony/stopwatch": "^5.2", | |||||
"symfony/var-dumper": "^5.2", | |||||
"symfony/web-profiler-bundle": "^5.2" | |||||
}, | |||||
"config": { | |||||
"optimize-autoloader": true, | |||||
"preferred-install": { | |||||
"*": "dist" | |||||
}, | }, | ||||
"require-dev": { | |||||
"symfony/browser-kit": "^5.2", | |||||
"symfony/css-selector": "^5.2", | |||||
"symfony/debug-bundle": "^5.2", | |||||
"symfony/maker-bundle": "^1.0", | |||||
"symfony/phpunit-bridge": "^5.2", | |||||
"symfony/stopwatch": "^5.2", | |||||
"symfony/var-dumper": "^5.2", | |||||
"symfony/web-profiler-bundle": "^5.2" | |||||
}, | |||||
"config": { | |||||
"optimize-autoloader": true, | |||||
"preferred-install": { | |||||
"*": "dist" | |||||
}, | |||||
"sort-packages": true | |||||
}, | |||||
"autoload": { | |||||
"psr-4": { | |||||
"App\\": "src/", | |||||
"Lc\\": "Lc/" | |||||
} | |||||
}, | |||||
"autoload-dev": { | |||||
"psr-4": { | |||||
"App\\Tests\\": "tests/" | |||||
} | |||||
}, | |||||
"replace": { | |||||
"symfony/polyfill-ctype": "*", | |||||
"symfony/polyfill-iconv": "*", | |||||
"symfony/polyfill-php72": "*" | |||||
}, | |||||
"scripts": { | |||||
"auto-scripts": { | |||||
"cache:clear": "symfony-cmd", | |||||
"assets:install %PUBLIC_DIR%": "symfony-cmd" | |||||
}, | |||||
"post-install-cmd": [ | |||||
"@auto-scripts" | |||||
], | |||||
"post-update-cmd": [ | |||||
"@auto-scripts" | |||||
] | |||||
}, | |||||
"conflict": { | |||||
"symfony/symfony": "*" | |||||
"sort-packages": true | |||||
}, | |||||
"autoload": { | |||||
"psr-4": { | |||||
"App\\": "src/", | |||||
"Lc\\": "Lc/" | |||||
} | |||||
}, | |||||
"autoload-dev": { | |||||
"psr-4": { | |||||
"App\\Tests\\": "tests/" | |||||
} | |||||
}, | |||||
"replace": { | |||||
"symfony/polyfill-ctype": "*", | |||||
"symfony/polyfill-iconv": "*", | |||||
"symfony/polyfill-php72": "*" | |||||
}, | |||||
"scripts": { | |||||
"auto-scripts": { | |||||
"cache:clear": "symfony-cmd", | |||||
"assets:install %PUBLIC_DIR%": "symfony-cmd" | |||||
}, | }, | ||||
"extra": { | |||||
"symfony": { | |||||
"allow-contrib": false, | |||||
"require": "5.2.*" | |||||
} | |||||
"post-install-cmd": [ | |||||
"@auto-scripts" | |||||
], | |||||
"post-update-cmd": [ | |||||
"@auto-scripts" | |||||
] | |||||
}, | |||||
"conflict": { | |||||
"symfony/symfony": "*" | |||||
}, | |||||
"extra": { | |||||
"symfony": { | |||||
"allow-contrib": false, | |||||
"require": "5.3.*" | |||||
} | } | ||||
} | |||||
} | } |
EasyCorp\Bundle\EasyAdminBundle\EasyAdminBundle::class => ['all' => true], | EasyCorp\Bundle\EasyAdminBundle\EasyAdminBundle::class => ['all' => true], | ||||
Lc\SovBundle\LcSovBundle::class => ['all' => true], | Lc\SovBundle\LcSovBundle::class => ['all' => true], | ||||
Symfony\WebpackEncoreBundle\WebpackEncoreBundle::class => ['all' => true], | Symfony\WebpackEncoreBundle\WebpackEncoreBundle::class => ['all' => true], | ||||
ConnectHolland\CookieConsentBundle\CHCookieConsentBundle::class => ['all' => true], | |||||
Knp\Bundle\PaginatorBundle\KnpPaginatorBundle::class => ['all' => true], | |||||
Mailjet\MailjetBundle\MailjetBundle::class => ['all' => true], | |||||
]; | ]; |
ch_cookie_consent: | |||||
theme: 'light' # light, dark | |||||
categories: # Below are the default supported categories | |||||
- 'piwik' | |||||
use_logger: true # Logs user actions to database | |||||
position: 'bottom' # top, bottom | |||||
simplified: false # When set to true the user can only deny or accept all cookies at once |
mailjet: | |||||
api_key: "%env(MAILJET_APIKEY_PUBLIC)%" | |||||
secret_key: "%env(MAILJET_APIKEY_PRIVATE)%" | |||||
security: | security: | ||||
enable_authenticator_manager: true | |||||
encoders: | encoders: | ||||
App\Entity\User\User: | App\Entity\User\User: | ||||
algorithm: auto | algorithm: auto | ||||
pattern: ^/(_(profiler|wdt)|css|images|js)/ | pattern: ^/(_(profiler|wdt)|css|images|js)/ | ||||
security: false | security: false | ||||
main: | |||||
pattern: ^/ | |||||
anonymous: true | |||||
admin: | |||||
pattern: ^/(admin|login|logout) | |||||
lazy: true | lazy: true | ||||
form_login: | |||||
login_path: sov_login | |||||
check_path: sov_login | |||||
http_basic: ~ | |||||
entry_point: form_login | |||||
provider: app_user_provider | provider: app_user_provider | ||||
guard: | |||||
authenticators: | |||||
- Lc\SovBundle\Authenticator\LoginFormAuthenticator | |||||
custom_authenticator: Lc\SovBundle\Authenticator\LoginFormAuthenticator | |||||
logout: | logout: | ||||
path: sov_logout | path: sov_logout | ||||
# where to redirect after logout | |||||
# target: app_any_route | |||||
# activate different ways to authenticate | |||||
# https://symfony.com/doc/current/security.html#firewalls-authentication | |||||
# https://symfony.com/doc/current/security/impersonating_user.html | |||||
# switch_user: true | |||||
target: sov_login | |||||
# Easy way to control access for large sections of your site | # Easy way to control access for large sections of your site | ||||
# Note: Only the *first* access control that matches will be used | # Note: Only the *first* access control that matches will be used |
ch_cookie_consent: | |||||
resource: "@CHCookieConsentBundle/Resources/config/routing.yaml" |
app.locales: ["fr"] | app.locales: ["fr"] | ||||
app.default_locale: "fr" | app.default_locale: "fr" | ||||
app.path_uploads: '/uploads' | app.path_uploads: '/uploads' | ||||
app.admin.logo: 'laclic.png' | |||||
app.reminder.route_render_modal: 'sov_admin_reminder_render_modal' | |||||
app.assets_directory: '%kernel.project_dir%/public/assets/' | |||||
services: | services: | ||||
# default configuration for services in *this* file | # default configuration for services in *this* file | ||||
resource: '../src/Controller/' | resource: '../src/Controller/' | ||||
tags: ['controller.service_arguments'] | tags: ['controller.service_arguments'] | ||||
Mailjet\MailjetSwiftMailer\SwiftMailer\MailjetTransport: '@swiftmailer.mailer.transport.mailjet' | |||||
app.form.extension.type.cookie_consent: | |||||
class: App\Form\CookieConsentTypeExtension | |||||
tags: | |||||
- { name: form.type_extension, extended_type: ConnectHolland\CookieConsentBundle\Form\CookieConsentType } | |||||
arguments: | |||||
- '@ConnectHolland\CookieConsentBundle\Cookie\CookieChecker' | |||||
- '%ch_cookie_consent.categories%' | |||||
- '%ch_cookie_consent.simplified%' |
<?php | |||||
declare(strict_types=1); | |||||
namespace DoctrineMigrations; | |||||
use Doctrine\DBAL\Schema\Schema; | |||||
use Doctrine\Migrations\AbstractMigration; | |||||
/** | |||||
* Auto-generated Migration: Please modify to your needs! | |||||
*/ | |||||
final class Version20210524094036 extends AbstractMigration | |||||
{ | |||||
public function getDescription(): string | |||||
{ | |||||
return ''; | |||||
} | |||||
public function up(Schema $schema): void | |||||
{ | |||||
// this up() migration is auto-generated, please modify it to your needs | |||||
$this->addSql('CREATE TABLE file (id INT AUTO_INCREMENT NOT NULL, created_by_id INT NOT NULL, updated_by_id INT NOT NULL, path VARCHAR(255) DEFAULT NULL, legend VARCHAR(255) DEFAULT NULL, dev_alias VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, locales_enabled LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:array)\', position DOUBLE PRECISION NOT NULL, INDEX IDX_8C9F3610B03A8386 (created_by_id), INDEX IDX_8C9F3610896DBBDE (updated_by_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); | |||||
$this->addSql('CREATE TABLE page (id INT AUTO_INCREMENT NOT NULL, image_id INT DEFAULT NULL, created_by_id INT NOT NULL, updated_by_id INT NOT NULL, title VARCHAR(255) NOT NULL, description LONGTEXT DEFAULT NULL, meta_title VARCHAR(255) DEFAULT NULL, meta_description LONGTEXT DEFAULT NULL, old_urls LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:array)\', slug VARCHAR(255) NOT NULL, position DOUBLE PRECISION NOT NULL, status DOUBLE PRECISION NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, dev_alias VARCHAR(255) DEFAULT NULL, INDEX IDX_140AB6203DA5256D (image_id), INDEX IDX_140AB620B03A8386 (created_by_id), INDEX IDX_140AB620896DBBDE (updated_by_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); | |||||
$this->addSql('CREATE TABLE page_file (page_id INT NOT NULL, file_id INT NOT NULL, INDEX IDX_B5B2ACAC4663E4 (page_id), INDEX IDX_B5B2ACA93CB796C (file_id), PRIMARY KEY(page_id, file_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); | |||||
$this->addSql('CREATE TABLE user (id INT AUTO_INCREMENT NOT NULL, email VARCHAR(180) NOT NULL, roles LONGTEXT NOT NULL COMMENT \'(DC2Type:json)\', password VARCHAR(255) NOT NULL, lastname VARCHAR(255) DEFAULT NULL, firstname VARCHAR(255) DEFAULT NULL, is_verified TINYINT(1) NOT NULL, UNIQUE INDEX UNIQ_8D93D649E7927C74 (email), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); | |||||
$this->addSql('ALTER TABLE file ADD CONSTRAINT FK_8C9F3610B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)'); | |||||
$this->addSql('ALTER TABLE file ADD CONSTRAINT FK_8C9F3610896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)'); | |||||
$this->addSql('ALTER TABLE page ADD CONSTRAINT FK_140AB6203DA5256D FOREIGN KEY (image_id) REFERENCES file (id)'); | |||||
$this->addSql('ALTER TABLE page ADD CONSTRAINT FK_140AB620B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)'); | |||||
$this->addSql('ALTER TABLE page ADD CONSTRAINT FK_140AB620896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)'); | |||||
$this->addSql('ALTER TABLE page_file ADD CONSTRAINT FK_B5B2ACAC4663E4 FOREIGN KEY (page_id) REFERENCES page (id) ON DELETE CASCADE'); | |||||
$this->addSql('ALTER TABLE page_file ADD CONSTRAINT FK_B5B2ACA93CB796C FOREIGN KEY (file_id) REFERENCES file (id) ON DELETE CASCADE'); | |||||
} | |||||
public function down(Schema $schema): void | |||||
{ | |||||
// this down() migration is auto-generated, please modify it to your needs | |||||
$this->addSql('ALTER TABLE page DROP FOREIGN KEY FK_140AB6203DA5256D'); | |||||
$this->addSql('ALTER TABLE page_file DROP FOREIGN KEY FK_B5B2ACA93CB796C'); | |||||
$this->addSql('ALTER TABLE page_file DROP FOREIGN KEY FK_B5B2ACAC4663E4'); | |||||
$this->addSql('ALTER TABLE file DROP FOREIGN KEY FK_8C9F3610B03A8386'); | |||||
$this->addSql('ALTER TABLE file DROP FOREIGN KEY FK_8C9F3610896DBBDE'); | |||||
$this->addSql('ALTER TABLE page DROP FOREIGN KEY FK_140AB620B03A8386'); | |||||
$this->addSql('ALTER TABLE page DROP FOREIGN KEY FK_140AB620896DBBDE'); | |||||
$this->addSql('DROP TABLE file'); | |||||
$this->addSql('DROP TABLE page'); | |||||
$this->addSql('DROP TABLE page_file'); | |||||
$this->addSql('DROP TABLE user'); | |||||
} | |||||
} |
<?php | |||||
declare(strict_types=1); | |||||
namespace DoctrineMigrations; | |||||
use Doctrine\DBAL\Schema\Schema; | |||||
use Doctrine\Migrations\AbstractMigration; | |||||
/** | |||||
* Auto-generated Migration: Please modify to your needs! | |||||
*/ | |||||
final class Version20210524124412 extends AbstractMigration | |||||
{ | |||||
public function getDescription(): string | |||||
{ | |||||
return ''; | |||||
} | |||||
public function up(Schema $schema): void | |||||
{ | |||||
// this up() migration is auto-generated, please modify it to your needs | |||||
$this->addSql('ALTER TABLE page ADD file_id INT DEFAULT NULL'); | |||||
$this->addSql('ALTER TABLE page ADD CONSTRAINT FK_140AB62093CB796C FOREIGN KEY (file_id) REFERENCES file (id)'); | |||||
$this->addSql('CREATE INDEX IDX_140AB62093CB796C ON page (file_id)'); | |||||
} | |||||
public function down(Schema $schema): void | |||||
{ | |||||
// this down() migration is auto-generated, please modify it to your needs | |||||
$this->addSql('ALTER TABLE page DROP FOREIGN KEY FK_140AB62093CB796C'); | |||||
$this->addSql('DROP INDEX IDX_140AB62093CB796C ON page'); | |||||
$this->addSql('ALTER TABLE page DROP file_id'); | |||||
} | |||||
} |
<server name="SHELL_VERBOSITY" value="-1" /> | <server name="SHELL_VERBOSITY" value="-1" /> | ||||
<server name="SYMFONY_PHPUNIT_REMOVE" value="" /> | <server name="SYMFONY_PHPUNIT_REMOVE" value="" /> | ||||
<server name="SYMFONY_PHPUNIT_VERSION" value="8.5" /> | <server name="SYMFONY_PHPUNIT_VERSION" value="8.5" /> | ||||
<!-- ###+ mailjet/mailjet-bundle ### --> | |||||
<env name="MAILJET_APIKEY_PUBLIC" value="your-api_key"/> | |||||
<env name="MAILJET_APIKEY_PRIVATE" value="@@your-secret_key"/> | |||||
<!-- ###- mailjet/mailjet-bundle ### --> | |||||
</php> | </php> | ||||
<testsuites> | <testsuites> |
namespace App\Controller\Admin; | namespace App\Controller\Admin; | ||||
use App\Entity\Common\TaxRate; | |||||
use App\Entity\Site\Page; | use App\Entity\Site\Page; | ||||
use App\Entity\User\GroupUser; | |||||
use App\Entity\User\User; | use App\Entity\User\User; | ||||
use EasyCorp\Bundle\EasyAdminBundle\Config\Assets; | |||||
use EasyCorp\Bundle\EasyAdminBundle\Config\Crud; | |||||
use EasyCorp\Bundle\EasyAdminBundle\Config\MenuItem; | use EasyCorp\Bundle\EasyAdminBundle\Config\MenuItem; | ||||
use Lc\SovBundle\Controller\Admin\DashboardController as SovDashboardController; | |||||
use Lc\SovBundle\Controller\Dashboard\DashboardAdminController as SovDashboardController; | |||||
class DashboardController extends SovDashboardController | class DashboardController extends SovDashboardController | ||||
{ | { | ||||
public function configureMenuItems(): iterable | public function configureMenuItems(): iterable | ||||
{ | { | ||||
yield MenuItem::linkToDashboard('dashboard', 'circle'); | |||||
yield MenuItem::linkToCrud('page', 'copy', Page::class); | |||||
yield MenuItem::subMenu('user', 'user')->setSubItems( | |||||
[ | |||||
MenuItem::linkToCrud('user_index', '', User::class), | |||||
] | |||||
); | |||||
yield MenuItem::subMenu('account', 'user')->setSubItems( | |||||
[ | |||||
MenuItem::linkToRoute('account_profile', '', 'sov_admin_account_profile'), | |||||
MenuItem::linkToRoute('account_password', '', 'sov_admin_account_password'), | |||||
] | |||||
); | |||||
$menuItems = [ | |||||
MenuItem::linkToDashboard('dashboard', 'far fa-circle'), | |||||
MenuItem::linkToCrud('page', 'far fa-copy', Page::class), | |||||
MenuItem::subMenu('account', 'fas fa-user') | |||||
->setSubItems( | |||||
[ | |||||
MenuItem::linkToRoute('account_profile', 'fas fa-user-cog', 'sov_admin_account_profile'), | |||||
MenuItem::linkToRoute('account_password', 'fas fa-key', 'sov_admin_account_password'), | |||||
] | |||||
), | |||||
MenuItem::linkToCrud('user', 'fas fa-users', User::class), | |||||
]; | |||||
return $menuItems; | |||||
} | } | ||||
} | } |
use EasyCorp\Bundle\EasyAdminBundle\Field\FormField; | use EasyCorp\Bundle\EasyAdminBundle\Field\FormField; | ||||
use EasyCorp\Bundle\EasyAdminBundle\Field\NumberField; | use EasyCorp\Bundle\EasyAdminBundle\Field\NumberField; | ||||
use EasyCorp\Bundle\EasyAdminBundle\Field\TextField; | use EasyCorp\Bundle\EasyAdminBundle\Field\TextField; | ||||
use Lc\SovBundle\Controller\Admin\AbstractCrudController; | |||||
use Lc\SovBundle\Field\BooleanField; | |||||
use Lc\SovBundle\Controller\AbstractAdminController as AbstractCrudController; | |||||
use Lc\SovBundle\Field\CKEditorField; | use Lc\SovBundle\Field\CKEditorField; | ||||
use Lc\SovBundle\Field\FileManagerField; | use Lc\SovBundle\Field\FileManagerField; | ||||
use Lc\SovBundle\Field\GalleryManagerField; | use Lc\SovBundle\Field\GalleryManagerField; | ||||
use Lc\SovBundle\Field\ImageManagerField; | |||||
use Lc\SovBundle\Field\StatusField; | use Lc\SovBundle\Field\StatusField; | ||||
use Symfony\Component\Translation\TranslatableMessage; | |||||
use Lc\SovBundle\Repository\RepositoryQueryInterface; | |||||
class PageCrudController extends AbstractCrudController | class PageCrudController extends AbstractCrudController | ||||
{ | { | ||||
return Page::class; | return Page::class; | ||||
} | } | ||||
public function getRepositoryQuery(): RepositoryQueryInterface | |||||
{ | |||||
return $this->getPageContainer()->getRepositoryQuery(); | |||||
} | |||||
public function configureFields(string $pageName): iterable | public function configureFields(string $pageName): iterable | ||||
{ | { | ||||
$panel = parent::configureFields($pageName); | $panel = parent::configureFields($pageName); | ||||
return array_merge( | return array_merge( | ||||
[ | |||||
FormField::addPanel('general'), | |||||
TextField::new('title'), | |||||
NumberField::new('position')->hideOnForm(), | |||||
CKEditorField::new('description'), | |||||
FileManagerField::new('file'), | |||||
StatusField::new('status'), | |||||
FormField::addPanel('gallery'), | |||||
GalleryManagerField::new('gallery') | |||||
], | |||||
$panel | |||||
[ | |||||
FormField::addPanel('general'), | |||||
TextField::new('title'), | |||||
NumberField::new('position')->hideOnForm(), | |||||
CKEditorField::new('description'), | |||||
FileManagerField::new('file'), | |||||
StatusField::new('status'), | |||||
FormField::addPanel('gallery'), | |||||
GalleryManagerField::new('gallery') | |||||
], | |||||
$panel | |||||
); | ); | ||||
} | } | ||||
namespace App\Controller\Admin; | namespace App\Controller\Admin; | ||||
use App\Entity\User\User; | use App\Entity\User\User; | ||||
use Lc\SovBundle\Controller\Admin\UserCrudController as AbstractUserCrudController; | |||||
use Lc\SovBundle\Controller\User\UserAdminController as AbstractUserCrudController; | |||||
use Lc\SovBundle\Repository\RepositoryQueryInterface; | |||||
class UserCrudController extends AbstractUserCrudController | class UserCrudController extends AbstractUserCrudController | ||||
{ | { | ||||
public static function getEntityFqcn(): string | |||||
{ | |||||
return User::class; | |||||
} | |||||
public static function getEntityFqcn(): string | |||||
{ | |||||
return User::class; | |||||
} | |||||
public function getRepositoryQuery(): RepositoryQueryInterface | |||||
{ | |||||
return $this->getUserContainer()->getRepositoryQuery(); | |||||
} | |||||
} | } |
<?php | |||||
namespace App\Controller; | |||||
use App\Entity\Site\Page; | |||||
use Lc\SovBundle\Doctrine\EntityManager; | |||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; | |||||
use Symfony\Component\HttpFoundation\Response; | |||||
class DefaultController extends AbstractController | |||||
{ | |||||
protected $em; | |||||
protected $mailer; | |||||
public function __construct(EntityManager $em) | |||||
{ | |||||
$this->em = $em; | |||||
} | |||||
public function index(): Response | |||||
{ | |||||
$pageRepository = $this->em->getRepository(Page::class); | |||||
$pages = $pageRepository->findAll(); | |||||
return $this->render('index.html.twig', [ | |||||
'pages' => $pages | |||||
]); | |||||
} | |||||
} |
<?php | |||||
namespace App\Controller\Frontend; | |||||
use Doctrine\ORM\EntityManagerInterface; | |||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; | |||||
use Symfony\Component\HttpFoundation\Response; | |||||
class HomeController extends AbstractController | |||||
{ | |||||
protected EntityManagerInterface $em; | |||||
public function __construct( | |||||
EntityManagerInterface $em | |||||
) { | |||||
$this->em = $em; | |||||
} | |||||
public function index(): Response | |||||
{ | |||||
return $this->render('frontend/site/home.html.twig'); | |||||
} | |||||
} |
*/ | */ | ||||
class File extends FileModel implements FileInterface | class File extends FileModel implements FileInterface | ||||
{ | { | ||||
/** | |||||
* @ORM\Id | |||||
* @ORM\GeneratedValue | |||||
* @ORM\Column(type="integer") | |||||
*/ | |||||
private $id; | |||||
/** | |||||
* @ORM\Id | |||||
* @ORM\GeneratedValue | |||||
* @ORM\Column(type="integer") | |||||
*/ | |||||
private $id; | |||||
public function getId(): ?int | |||||
{ | |||||
return $this->id; | |||||
} | |||||
public function getId(): ?int | |||||
{ | |||||
return $this->id; | |||||
} | |||||
public function __toString() | |||||
{ | |||||
return ''.$this->getLegend() ; | |||||
} | |||||
public function __toString() | |||||
{ | |||||
return '' . $this->getLegend(); | |||||
} | |||||
} | } |
<?php | |||||
namespace App\Entity\Reminder; | |||||
use Doctrine\ORM\Mapping as ORM; | |||||
use Lc\SovBundle\Model\Reminder\ReminderModel; | |||||
/** | |||||
* @ORM\Entity(repositoryClass=ReminderRepository::class) | |||||
*/ | |||||
class Reminder extends ReminderModel | |||||
{ | |||||
/** | |||||
* @ORM\Id | |||||
* @ORM\GeneratedValue | |||||
* @ORM\Column(type="integer") | |||||
*/ | |||||
private $id; | |||||
public function getId(): ?int | |||||
{ | |||||
return $this->id; | |||||
} | |||||
} |
<?php | |||||
namespace App\Entity\Setting; | |||||
use Lc\SovBundle\Repository\Setting\SiteSettingRepository; | |||||
use Doctrine\ORM\Mapping as ORM; | |||||
use Lc\SovBundle\Model\Setting\SiteSettingModel; | |||||
/** | |||||
* @ORM\Entity(repositoryClass=SiteSettingRepository::class) | |||||
*/ | |||||
class SiteSetting extends SiteSettingModel | |||||
{ | |||||
/** | |||||
* @ORM\Id | |||||
* @ORM\GeneratedValue | |||||
* @ORM\Column(type="integer") | |||||
*/ | |||||
private $id; | |||||
public function getId(): ?int | |||||
{ | |||||
return $this->id; | |||||
} | |||||
} |
use Doctrine\Common\Collections\Collection; | use Doctrine\Common\Collections\Collection; | ||||
use Doctrine\ORM\Mapping as ORM; | use Doctrine\ORM\Mapping as ORM; | ||||
use Lc\SovBundle\Doctrine\Pattern\AbstractFullEntity; | use Lc\SovBundle\Doctrine\Pattern\AbstractFullEntity; | ||||
use App\Entity\File\File ; | |||||
use App\Repository\PageRepository; | |||||
use App\Entity\File\File; | |||||
use Lc\SovBundle\Repository\Site\PageRepository; | |||||
/** | /** | ||||
* @ORM\Entity(repositoryClass=PageRepository::class) | * @ORM\Entity(repositoryClass=PageRepository::class) | ||||
*/ | */ | ||||
class Page extends AbstractFullEntity | class Page extends AbstractFullEntity | ||||
{ | { | ||||
/** | |||||
* @ORM\Id | |||||
* @ORM\GeneratedValue | |||||
* @ORM\Column(type="integer") | |||||
*/ | |||||
private $id; | |||||
/** | |||||
* @ORM\ManyToOne(targetEntity=File::class, cascade={"persist", "remove"}) | |||||
*/ | |||||
private $image; | |||||
/** | |||||
* @ORM\ManyToMany(targetEntity=File::class, cascade={"persist", "remove"}, orphanRemoval=true) | |||||
* @ORM\OrderBy({"position" = "ASC"}) | |||||
*/ | |||||
private $gallery; | |||||
/** | |||||
* @ORM\ManyToOne(targetEntity=File::class, cascade={"persist"}) | |||||
*/ | |||||
private $file; | |||||
public function __construct() | |||||
{ | |||||
$this->gallery = new ArrayCollection(); | |||||
/** | |||||
* @ORM\Id | |||||
* @ORM\GeneratedValue | |||||
* @ORM\Column(type="integer") | |||||
*/ | |||||
private $id; | |||||
/** | |||||
* @ORM\ManyToOne(targetEntity=File::class, cascade={"persist", "remove"}) | |||||
*/ | |||||
private $image; | |||||
/** | |||||
* @ORM\ManyToMany(targetEntity=File::class, cascade={"persist", "remove"}, orphanRemoval=true) | |||||
* @ORM\OrderBy({"position" = "ASC"}) | |||||
*/ | |||||
private $gallery; | |||||
/** | |||||
* @ORM\ManyToOne(targetEntity=File::class, cascade={"persist"}) | |||||
*/ | |||||
private $file; | |||||
public function __construct() | |||||
{ | |||||
$this->gallery = new ArrayCollection(); | |||||
} | |||||
public function __toString() | |||||
{ | |||||
return $this->title; | |||||
} | |||||
public function getId(): ?int | |||||
{ | |||||
return $this->id; | |||||
} | |||||
public function getImage(): ?File | |||||
{ | |||||
return $this->image; | |||||
} | |||||
public function setImage(?File $image): self | |||||
{ | |||||
$this->image = $image; | |||||
return $this; | |||||
} | |||||
/** | |||||
* @return Collection|File[] | |||||
*/ | |||||
public function getGallery(): Collection | |||||
{ | |||||
return $this->gallery; | |||||
} | |||||
public function addGallery(File $gallery): self | |||||
{ | |||||
if (!$this->gallery->contains($gallery)) { | |||||
$this->gallery[] = $gallery; | |||||
} | } | ||||
public function __toString() | |||||
{ | |||||
return $this->getTitle() ; | |||||
} | |||||
public function getId(): ?int | |||||
{ | |||||
return $this->id; | |||||
} | |||||
public function getImage(): ?File | |||||
{ | |||||
return $this->image; | |||||
} | |||||
public function setImage(?File $image): self | |||||
{ | |||||
$this->image = $image; | |||||
return $this; | |||||
} | |||||
return $this; | |||||
} | |||||
/** | |||||
* @return Collection|File[] | |||||
*/ | |||||
public function getGallery(): Collection | |||||
{ | |||||
return $this->gallery; | |||||
} | |||||
public function addGallery(File $gallery): self | |||||
{ | |||||
if (!$this->gallery->contains($gallery)) { | |||||
$this->gallery[] = $gallery; | |||||
} | |||||
return $this; | |||||
} | |||||
public function removeGallery(File $gallery): self | |||||
{ | |||||
$this->gallery->removeElement($gallery); | |||||
public function removeGallery(File $gallery): self | |||||
{ | |||||
$this->gallery->removeElement($gallery); | |||||
return $this; | |||||
} | |||||
return $this; | |||||
} | |||||
public function getFile(): ?File | |||||
{ | |||||
return $this->file; | |||||
} | |||||
public function getFile(): ?File | |||||
{ | |||||
return $this->file; | |||||
} | |||||
public function setFile(?File $file): self | |||||
{ | |||||
$this->file = $file; | |||||
public function setFile(?File $file): self | |||||
{ | |||||
$this->file = $file; | |||||
return $this; | |||||
} | |||||
return $this; | |||||
} | |||||
} | } |
<?php | |||||
namespace App\Entity\Site; | |||||
use Lc\SovBundle\Repository\Site\SiteRepository; | |||||
use Doctrine\ORM\Mapping as ORM; | |||||
use Lc\SovBundle\Model\Site\SiteModel; | |||||
/** | |||||
* @ORM\Entity(repositoryClass=SiteRepository::class) | |||||
*/ | |||||
class Site extends SiteModel | |||||
{ | |||||
/** | |||||
* @ORM\Id | |||||
* @ORM\GeneratedValue | |||||
* @ORM\Column(type="integer") | |||||
*/ | |||||
private $id; | |||||
public function getId(): ?int | |||||
{ | |||||
return $this->id; | |||||
} | |||||
} |
<?php | |||||
namespace App\Entity\Ticket; | |||||
use Doctrine\ORM\Mapping as ORM; | |||||
use Lc\SovBundle\Model\Ticket\TicketModel; | |||||
/** | |||||
* @ORM\Entity(repositoryClass=TicketRepository::class) | |||||
*/ | |||||
class Ticket extends TicketModel | |||||
{ | |||||
/** | |||||
* @ORM\Id | |||||
* @ORM\GeneratedValue | |||||
* @ORM\Column(type="integer") | |||||
*/ | |||||
private $id; | |||||
public function getId(): ?int | |||||
{ | |||||
return $this->id; | |||||
} | |||||
} |
<?php | |||||
namespace App\Entity\Ticket; | |||||
use Doctrine\ORM\Mapping as ORM; | |||||
use Lc\SovBundle\Model\Ticket\TicketMessageModel; | |||||
/** | |||||
* @ORM\Entity(repositoryClass=TicketMessageRepository::class) | |||||
*/ | |||||
class TicketMessage extends TicketMessageModel | |||||
{ | |||||
/** | |||||
* @ORM\Id | |||||
* @ORM\GeneratedValue | |||||
* @ORM\Column(type="integer") | |||||
*/ | |||||
private $id; | |||||
public function getId(): ?int | |||||
{ | |||||
return $this->id; | |||||
} | |||||
} |
<?php | |||||
namespace App\Entity\User; | |||||
use Doctrine\ORM\Mapping as ORM; | |||||
use Lc\SovBundle\Model\User\GroupUserModel; | |||||
/** | |||||
* @ORM\Entity(repositoryClass=GroupUserRepository::class) | |||||
*/ | |||||
class GroupUser extends GroupUserModel | |||||
{ | |||||
/** | |||||
* @ORM\Id | |||||
* @ORM\GeneratedValue | |||||
* @ORM\Column(type="integer") | |||||
*/ | |||||
private $id; | |||||
public function getId(): ?int | |||||
{ | |||||
return $this->id; | |||||
} | |||||
} |
namespace App\Entity\User; | namespace App\Entity\User; | ||||
use Doctrine\ORM\Mapping as ORM; | use Doctrine\ORM\Mapping as ORM; | ||||
use Lc\SovBundle\Model\User\User as SovUserModel; | |||||
use Lc\SovBundle\Model\User\UserModel as SovUserModel; | |||||
use Lc\SovBundle\Model\User\UserInterface; | use Lc\SovBundle\Model\User\UserInterface; | ||||
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; | use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; | ||||
*/ | */ | ||||
class User extends SovUserModel implements UserInterface | class User extends SovUserModel implements UserInterface | ||||
{ | { | ||||
/** | |||||
* @ORM\Id | |||||
* @ORM\GeneratedValue | |||||
* @ORM\Column(type="integer") | |||||
*/ | |||||
private $id; | |||||
/** | |||||
* @ORM\Id | |||||
* @ORM\GeneratedValue | |||||
* @ORM\Column(type="integer") | |||||
*/ | |||||
private $id; | |||||
public function getId(): ?int | |||||
{ | |||||
return $this->id; | |||||
} | |||||
public function __toString() | |||||
{ | |||||
return $this->firstname . " " . $this->lastname; | |||||
} | |||||
public function getId(): ?int | |||||
{ | |||||
return $this->id; | |||||
} | |||||
} | } |
<?php | |||||
namespace App\Repository; | |||||
use App\Entity\Site\Page; | |||||
use Lc\SovBundle\Repository\AbstractRepository; | |||||
/** | |||||
* @method Page|null find($id, $lockMode = null, $lockVersion = null) | |||||
* @method Page|null findOneBy(array $criteria, array $orderBy = null) | |||||
* @method Page[] findAll() | |||||
* @method Page[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) | |||||
*/ | |||||
class PageRepository extends AbstractRepository | |||||
{ | |||||
public function getInterfaceClass() | |||||
{ | |||||
return Page::class; | |||||
} | |||||
} |
"composer/package-versions-deprecated": { | "composer/package-versions-deprecated": { | ||||
"version": "1.11.99.2" | "version": "1.11.99.2" | ||||
}, | }, | ||||
"connectholland/cookie-consent-bundle": { | |||||
"version": "0.4", | |||||
"recipe": { | |||||
"repo": "github.com/symfony/recipes-contrib", | |||||
"branch": "master", | |||||
"version": "0.4", | |||||
"ref": "9725d24dc996a1041f25b9e29fc1567a861f98e4" | |||||
}, | |||||
"files": [ | |||||
"config/packages/ch_cookie_consent.yaml", | |||||
"config/routes/ch_cookie_consent.yaml" | |||||
] | |||||
}, | |||||
"doctrine/annotations": { | "doctrine/annotations": { | ||||
"version": "1.0", | "version": "1.0", | ||||
"recipe": { | "recipe": { | ||||
"doctrine/sql-formatter": { | "doctrine/sql-formatter": { | ||||
"version": "1.1.1" | "version": "1.1.1" | ||||
}, | }, | ||||
"dompdf/dompdf": { | |||||
"version": "v1.1.0" | |||||
}, | |||||
"easycorp/easyadmin-bundle": { | "easycorp/easyadmin-bundle": { | ||||
"version": "3.0", | "version": "3.0", | ||||
"recipe": { | "recipe": { | ||||
"gedmo/doctrine-extensions": { | "gedmo/doctrine-extensions": { | ||||
"version": "v3.0.5" | "version": "v3.0.5" | ||||
}, | }, | ||||
"guzzlehttp/guzzle": { | |||||
"version": "7.4.0" | |||||
}, | |||||
"guzzlehttp/promises": { | |||||
"version": "1.5.1" | |||||
}, | |||||
"guzzlehttp/psr7": { | |||||
"version": "2.1.0" | |||||
}, | |||||
"hamcrest/hamcrest-php": { | |||||
"version": "v2.0.1" | |||||
}, | |||||
"imagine/imagine": { | "imagine/imagine": { | ||||
"version": "1.2.4" | "version": "1.2.4" | ||||
}, | }, | ||||
"knplabs/knp-components": { | |||||
"version": "v3.3.0" | |||||
}, | |||||
"knplabs/knp-paginator-bundle": { | |||||
"version": "v5.7.0" | |||||
}, | |||||
"laminas/laminas-code": { | "laminas/laminas-code": { | ||||
"version": "4.3.0" | "version": "4.3.0" | ||||
}, | }, | ||||
"ref": "5a5bdc2d0e2533ed6935d5ae562f2b318a8fc1ee" | "ref": "5a5bdc2d0e2533ed6935d5ae562f2b318a8fc1ee" | ||||
} | } | ||||
}, | }, | ||||
"mailjet/mailjet-apiv3-php": { | |||||
"version": "v1.5.5" | |||||
}, | |||||
"mailjet/mailjet-bundle": { | |||||
"version": "2.0", | |||||
"recipe": { | |||||
"repo": "github.com/symfony/recipes-contrib", | |||||
"branch": "master", | |||||
"version": "1.0", | |||||
"ref": "48a7f92015372654b5056855da5e94d54bd8d948" | |||||
}, | |||||
"files": [ | |||||
"config/packages/mailjet.yaml" | |||||
] | |||||
}, | |||||
"mailjet/mailjet-swiftmailer": { | |||||
"version": "1.0.6" | |||||
}, | |||||
"mockery/mockery": { | |||||
"version": "1.4.4" | |||||
}, | |||||
"monolog/monolog": { | "monolog/monolog": { | ||||
"version": "2.2.0" | "version": "2.2.0" | ||||
}, | }, | ||||
"oomphinc/composer-installers-extender": { | "oomphinc/composer-installers-extender": { | ||||
"version": "2.0.0" | "version": "2.0.0" | ||||
}, | }, | ||||
"phenx/php-font-lib": { | |||||
"version": "0.5.2" | |||||
}, | |||||
"phenx/php-svg-lib": { | |||||
"version": "0.3.4" | |||||
}, | |||||
"phpdocumentor/reflection-common": { | "phpdocumentor/reflection-common": { | ||||
"version": "2.2.0" | "version": "2.2.0" | ||||
}, | }, | ||||
"psr/event-dispatcher": { | "psr/event-dispatcher": { | ||||
"version": "1.0.0" | "version": "1.0.0" | ||||
}, | }, | ||||
"psr/http-client": { | |||||
"version": "1.0.1" | |||||
}, | |||||
"psr/http-factory": { | |||||
"version": "1.0.1" | |||||
}, | |||||
"psr/http-message": { | |||||
"version": "1.0.1" | |||||
}, | |||||
"psr/link": { | "psr/link": { | ||||
"version": "1.0.0" | "version": "1.0.0" | ||||
}, | }, | ||||
"psr/log": { | "psr/log": { | ||||
"version": "1.1.4" | "version": "1.1.4" | ||||
}, | }, | ||||
"ralouphie/getallheaders": { | |||||
"version": "3.0.3" | |||||
}, | |||||
"sabberworm/php-css-parser": { | |||||
"version": "8.3.1" | |||||
}, | |||||
"sensio/framework-extra-bundle": { | "sensio/framework-extra-bundle": { | ||||
"version": "5.2", | "version": "5.2", | ||||
"recipe": { | "recipe": { | ||||
"config/packages/stof_doctrine_extensions.yaml" | "config/packages/stof_doctrine_extensions.yaml" | ||||
] | ] | ||||
}, | }, | ||||
"swiftmailer/swiftmailer": { | |||||
"version": "v5.4.12" | |||||
}, | |||||
"symfony/asset": { | "symfony/asset": { | ||||
"version": "v5.2.7" | "version": "v5.2.7" | ||||
}, | }, | ||||
"symfony/orm-pack": { | "symfony/orm-pack": { | ||||
"version": "v2.1.0" | "version": "v2.1.0" | ||||
}, | }, | ||||
"symfony/password-hasher": { | |||||
"version": "v5.3.8" | |||||
}, | |||||
"symfony/phpunit-bridge": { | "symfony/phpunit-bridge": { | ||||
"version": "5.1", | "version": "5.1", | ||||
"recipe": { | "recipe": { | ||||
"symfony/polyfill-php80": { | "symfony/polyfill-php80": { | ||||
"version": "v1.22.1" | "version": "v1.22.1" | ||||
}, | }, | ||||
"symfony/polyfill-php81": { | |||||
"version": "v1.23.0" | |||||
}, | |||||
"symfony/polyfill-uuid": { | "symfony/polyfill-uuid": { | ||||
"version": "v1.22.1" | "version": "v1.22.1" | ||||
}, | }, | ||||
"symfony/string": { | "symfony/string": { | ||||
"version": "v5.2.8" | "version": "v5.2.8" | ||||
}, | }, | ||||
"symfony/templating": { | |||||
"version": "v5.3.7" | |||||
}, | |||||
"symfony/test-pack": { | "symfony/test-pack": { | ||||
"version": "v1.0.7" | "version": "v1.0.7" | ||||
}, | }, |
<!DOCTYPE html> | |||||
<html> | |||||
<head> | |||||
<meta charset="UTF-8"> | |||||
<title>{% block title %}Welcome !{% endblock %}</title> | |||||
{# Run `composer require symfony/webpack-encore-bundle` | |||||
and uncomment the following Encore helpers to start using Symfony UX #} | |||||
{% block stylesheets %} | |||||
{# {{ encore_entry_link_tags('app') }} #} | |||||
{% endblock %} | |||||
</head> | |||||
<body> | |||||
{% block body %}{% endblock %} | |||||
{% block javascripts %} | |||||
{# {{ encore_entry_script_tags('app') }} #} | |||||
{% endblock %} | |||||
</body> | |||||
</html> |
<!DOCTYPE html> | |||||
<html> | |||||
<head> | |||||
<meta charset="UTF-8"> | |||||
<meta name="viewport" content="width=device-width, initial-scale=1"> | |||||
<title>{% block title %}Pietro{% endblock %}</title> | |||||
{% block meta %}{% endblock %} | |||||
<link rel="icon" type="image/png" href="{{ asset('assets/img/favicon.png') }}"/> | |||||
{{ encore_entry_link_tags('app-frontend') }} | |||||
{% block stylesheets %}{% endblock %} | |||||
</head> | |||||
{% set current_path = app.request.get('_route') %} | |||||
<body id="{{ current_path }}"> | |||||
{% for message in app.flashes('success') %} | |||||
<div class="alert alert-success"> | |||||
{{ message }} | |||||
</div> | |||||
{% endfor %} | |||||
{% block header %} | |||||
{% include 'frontend/layout/header.html.twig' %} | |||||
{% endblock %} | |||||
<div id="content"> | |||||
{% block body %}{% endblock %} | |||||
</div> | |||||
{% block footer %} | |||||
{% include 'frontend/layout/footer.html.twig' %} | |||||
{% endblock %} | |||||
{{ encore_entry_script_tags('app-frontend') }} | |||||
{% block javascripts %}{% endblock %} | |||||
{% if chcookieconsent_isCookieConsentSavedByUser() == false %} | |||||
{{ render_esi(path('ch_cookie_consent.show')) }} | |||||
{% endif %} | |||||
{% if chcookieconsent_isCategoryAllowedByUser('piwik') == true %} | |||||
<!-- Matomo --> | |||||
<script> | |||||
var _paq = window._paq = window._paq || []; | |||||
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */ | |||||
_paq.push(['trackPageView']); | |||||
_paq.push(['enableLinkTracking']); | |||||
(function () { | |||||
var u = "//statistiques.laclic.fr/"; | |||||
_paq.push(['setTrackerUrl', u + 'matomo.php']); | |||||
_paq.push(['setSiteId', '5']); | |||||
var d = document, g = d.createElement('script'), s = d.getElementsByTagName('script')[0]; | |||||
g.async = true; | |||||
g.src = u + 'matomo.js'; | |||||
s.parentNode.insertBefore(g, s); | |||||
})(); | |||||
</script> | |||||
<!-- End Matomo Code --> | |||||
{% endif %} | |||||
</body> | |||||
</html> |
<footer> | |||||
<div class="bar-footer"> | |||||
© 2021 par Pietro | Création <a href="https://www.laclic.fr/" title="La Clic !" target="_blank">LA CLIC !</a> | |||||
</div> | |||||
</footer> |
<header> | |||||
</header> |
{% macro email_contact(text, subject) %} | |||||
{# rot13 : https://rot13.com/ #} | |||||
<script> | |||||
{% if text is empty %} | |||||
var text = "ntve@ynpbbcrengvirqrfpvgblraf.se"; | |||||
{% else %} | |||||
var text = "{{ text|rot13 }}"; | |||||
{% endif %} | |||||
var subject = ""; | |||||
{% if subject is not empty %} | |||||
var subject = "?fhowrpg={{ subject|rot13 }}"; | |||||
{% endif %} | |||||
document.write(("<n uers=\"znvygb:ntve@ynpbbcrengvirqrfpvgblraf.se" + subject + "\" ery=\"absbyybj\">" + text + "</n>").replace(/[a-zA-Z]/g, function (c) { | |||||
return String.fromCharCode((c <= "Z" ? 90 : 122) >= (c = c.charCodeAt(0) + 13) ? c : c - 26); | |||||
})); | |||||
</script> | |||||
{% endmacro %} |
{% extends 'frontend/layout/base.html.twig' %} | |||||
{% block title %}Pietro Home{% endblock %} | |||||
{% block meta %} | |||||
<meta name="title" content=""/> | |||||
<meta name="description" content=""/> | |||||
{% endblock %} | |||||
{% block body %} | |||||
<h1>Hello Pietro</h1> | |||||
{% endblock %} |
{% extends 'base.html.twig' %} | |||||
{% block body %} | |||||
<h1>SovSkeleton</h1> | |||||
<ul> | |||||
{% for page in pages %} | |||||
<li> | |||||
<h2>{{ page.title }}</h2> | |||||
{% if page.gallery is defined %} | |||||
{% for image in page.gallery %} | |||||
<img src="{{ lc_liip(image.path, 'thumbnail') }}" alt="{{ image.legend }}" /> | |||||
{% endfor %} | |||||
{% endif %} | |||||
</li> | |||||
{% endfor %} | |||||
</ul> | |||||
{% endblock body %} |
ch_cookie_consent: | |||||
title: 'Cookies' | |||||
intro: "Un cookie est un fichier texte qui enregistre des informations concernant votre navigation sur ce site internet. Nous en utilisons notamment pour réaliser des statistiques de visite." | |||||
read_more: 'En savoir plus' | |||||
analytics: | |||||
title: 'Google Analytics' | |||||
description: "Analyse d'audience du site web" | |||||
tracking: | |||||
title: 'Do you want tracking cookies?' | |||||
description: '' | |||||
marketing: | |||||
title: 'Do you want personalised ads?' | |||||
description: '' | |||||
social_media: | |||||
title: 'Do you want social media cookies?' | |||||
description: '' | |||||
site: | |||||
title: 'Site' | |||||
description: 'Fonctionnement du site' | |||||
piwik: | |||||
title: 'Piwik' | |||||
description: 'Statistiques du site' | |||||
no: 'Non' | |||||
yes: 'Oui' | |||||
save: 'Sauvegarder' | |||||
use_only_functional_cookies: 'Only use functional cookies' | |||||
use_all_cookies: 'Allow all cookies' | |||||
show_details: 'Show details' | |||||
hide_details: 'Hide details' |
.addAliases({ | .addAliases({ | ||||
'core-js': path.join(__dirname, 'node_modules/core-js'), | 'core-js': path.join(__dirname, 'node_modules/core-js'), | ||||
'jquery': path.join(__dirname, 'node_modules/jquery/src/jquery'), | 'jquery': path.join(__dirname, 'node_modules/jquery/src/jquery'), | ||||
'jquery-ui': path.join(__dirname, 'node_modules/jquery-ui-dist/jquery-ui'), | |||||
'jquery-ui-sortable': path.join(__dirname, 'node_modules/jquery-ui-sortable/jquery-ui.min.js'), | |||||
'adminlte-js': path.join(__dirname, 'node_modules/admin-lte/dist/js/adminlte.min.js'), | 'adminlte-js': path.join(__dirname, 'node_modules/admin-lte/dist/js/adminlte.min.js'), | ||||
'adminlte-css': path.join(__dirname, 'node_modules/admin-lte/build/scss/adminlte.scss'), | 'adminlte-css': path.join(__dirname, 'node_modules/admin-lte/build/scss/adminlte.scss'), | ||||
'fontawesome-css': path.join(__dirname, 'node_modules/admin-lte/plugins/fontawesome-free/css/all.css'), | 'fontawesome-css': path.join(__dirname, 'node_modules/admin-lte/plugins/fontawesome-free/css/all.css'), | ||||
'adminlte-plugin': path.join(__dirname, 'node_modules/admin-lte/plugins/'), | |||||
'bootstrap': path.join(__dirname, 'node_modules/bootstrap/'), | |||||
'bootstrap-autocomplete': path.join(__dirname, 'node_modules/bootstrap-autocomplete/dist/latest/bootstrap-autocomplete.min.js'), | |||||
'select2': path.join(__dirname, 'node_modules/select2/dist/'), | |||||
'select2-bootstrap-theme': path.join(__dirname, 'node_modules/@ttskch/select2-bootstrap4-theme/dist/select2-bootstrap4.css'), | |||||
'toastr': path.join(__dirname, 'node_modules/toastr'), | 'toastr': path.join(__dirname, 'node_modules/toastr'), | ||||
'daterangepicker': path.join(__dirname, 'node_modules/bootstrap-daterangepicker'), | |||||
'moment': path.join(__dirname, 'node_modules/moment/dist/moment.js'), | |||||
/*'adminlte': path.resolve(__dirname, './node_modules/admin-lte/dist/js/adminlte.min.js'), | /*'adminlte': path.resolve(__dirname, './node_modules/admin-lte/dist/js/adminlte.min.js'), | ||||
'adminltePlugin': path.resolve(__dirname, './node_modules/admin-lte/plugins/'), | 'adminltePlugin': path.resolve(__dirname, './node_modules/admin-lte/plugins/'), | ||||
* Each entry will result in one JavaScript file (e.g. app.js) | * Each entry will result in one JavaScript file (e.g. app.js) | ||||
* and one CSS file (e.g. app.css) if your JavaScript imports CSS. | * and one CSS file (e.g. app.css) if your JavaScript imports CSS. | ||||
*/ | */ | ||||
.addEntry('adminlte-common', './Lc/SovBundle/Resources/assets/app/adminlte/common/app.common.js') | |||||
.addEntry('adminlte-plugins', './Lc/SovBundle/Resources/assets/app/adminlte/plugins/app.plugins.js') | |||||
.addEntry('adminlte-index', './Lc/SovBundle/Resources/assets/app/adminlte/index/app.index.js') | .addEntry('adminlte-index', './Lc/SovBundle/Resources/assets/app/adminlte/index/app.index.js') | ||||
.addEntry('adminlte-form', './Lc/SovBundle/Resources/assets/app/adminlte/form/app.form.js') | .addEntry('adminlte-form', './Lc/SovBundle/Resources/assets/app/adminlte/form/app.form.js') | ||||
.addEntry('adminlte-sort', './Lc/SovBundle/Resources/assets/app/adminlte/sort/app.sort.js') | .addEntry('adminlte-sort', './Lc/SovBundle/Resources/assets/app/adminlte/sort/app.sort.js') | ||||
.addEntry('adminlte-field-filemanager', './Lc/SovBundle/Resources/assets/app/adminlte/field/filemanager/app.filemanager.js') | .addEntry('adminlte-field-filemanager', './Lc/SovBundle/Resources/assets/app/adminlte/field/filemanager/app.filemanager.js') | ||||
.addEntry('adminlte-field-collection', './Lc/SovBundle/Resources/assets/app/adminlte/field/collection/app.collection.js') | .addEntry('adminlte-field-collection', './Lc/SovBundle/Resources/assets/app/adminlte/field/collection/app.collection.js') | ||||
.addEntry('adminlte-main', './Lc/SovBundle/Resources/assets/app/adminlte/main/app.main.js') | |||||
.addEntry('sov-reminder', './Lc/SovBundle/Resources/assets/app/admin/reminder/app.reminder.js') | |||||
.addEntry('sov-ticket', './Lc/SovBundle/Resources/assets/app/admin/ticket/app.ticket.js') | |||||
.addEntry('app-backend', './assets/app/backend/common/app.common.js') | |||||
.addEntry('app-frontend', './assets/app/frontend/app/app.common.js') | |||||
// enables the Symfony UX Stimulus bridge (used in assets/bootstrap.js) | // enables the Symfony UX Stimulus bridge (used in assets/bootstrap.js) | ||||
.enableStimulusBridge('./assets/controllers.json') | .enableStimulusBridge('./assets/controllers.json') | ||||
.enableBuildNotifications() | .enableBuildNotifications() | ||||
.enableSourceMaps(!Encore.isProduction()) | .enableSourceMaps(!Encore.isProduction()) | ||||
// enables hashed filenames (e.g. app.abc123.css) | // enables hashed filenames (e.g. app.abc123.css) | ||||
.enableVersioning(Encore.isProduction()) | |||||
.enableVersioning() | |||||
// .enableVersioning(Encore.isProduction()) | |||||
.configureBabel((config) => { | .configureBabel((config) => { | ||||
config.plugins.push('@babel/plugin-proposal-class-properties'); | config.plugins.push('@babel/plugin-proposal-class-properties'); | ||||
config.corejs = 3; | config.corejs = 3; | ||||
}) | }) | ||||
//ckeditor config | |||||
.copyFiles([ | |||||
{from: './node_modules/ckeditor/', to: 'ckeditor/[path][name].[ext]', pattern: /\.(js|css)$/, includeSubdirectories: false}, | |||||
{from: './node_modules/ckeditor/adapters', to: 'ckeditor/adapters/[path][name].[ext]'}, | |||||
{from: './node_modules/ckeditor/lang', to: 'ckeditor/lang/[path][name].[ext]'}, | |||||
{from: './node_modules/ckeditor/plugins', to: 'ckeditor/plugins/[path][name].[ext]'}, | |||||
{from: './node_modules/ckeditor/skins', to: 'ckeditor/skins/[path][name].[ext]'}, | |||||
{from: './node_modules/ckeditor/vendor', to: 'ckeditor/vendor/[path][name].[ext]'} | |||||
]) | |||||
// enables Sass/SCSS support | // enables Sass/SCSS support | ||||
//.enableSassLoader() | //.enableSassLoader() |