瀏覽代碼

pietro skeleton

master
Charly 2 年之前
父節點
當前提交
93bb769ffe
共有 100 個文件被更改,包括 13161 次插入0 次删除
  1. +37
    -0
      .env
  2. +31
    -0
      .gitignore
  3. +10
    -0
      assets/app/backend/common/app.common.js
  4. +0
    -0
      assets/app/backend/common/common.js
  5. +0
    -0
      assets/app/backend/common/common.scss
  6. +10
    -0
      assets/app/frontend/app/app.common.js
  7. +3
    -0
      assets/app/frontend/app/app.js
  8. +10
    -0
      assets/app/frontend/app/app.scss
  9. +3
    -0
      assets/app/frontend/js/script.js
  10. +62
    -0
      assets/app/frontend/scss/base.scss
  11. +114
    -0
      assets/app/frontend/scss/cookies.scss
  12. +0
    -0
      assets/app/frontend/scss/footer.scss
  13. +0
    -0
      assets/app/frontend/scss/header.scss
  14. +0
    -0
      assets/app/frontend/scss/home.scss
  15. +24
    -0
      assets/app/frontend/scss/mixin_responsive.scss
  16. +0
    -0
      assets/app/frontend/scss/page.scss
  17. +27
    -0
      assets/app/frontend/scss/vars.scss
  18. +4
    -0
      assets/controllers.json
  19. +43
    -0
      bin/console
  20. +13
    -0
      bin/phpunit
  21. +110
    -0
      composer.json
  22. +10595
    -0
      composer.lock
  23. +25
    -0
      config/bundles.php
  24. +5
    -0
      config/packages/artgris_file_manager.yaml
  25. +3
    -0
      config/packages/assets.yaml
  26. +19
    -0
      config/packages/cache.yaml
  27. +2
    -0
      config/packages/ch_cookie_consent.yaml
  28. +4
    -0
      config/packages/dev/debug.yaml
  29. +19
    -0
      config/packages/dev/monolog.yaml
  30. +6
    -0
      config/packages/dev/web_profiler.yaml
  31. +24
    -0
      config/packages/doctrine.yaml
  32. +6
    -0
      config/packages/doctrine_migrations.yaml
  33. +24
    -0
      config/packages/fos_ckeditor.yaml
  34. +17
    -0
      config/packages/framework.yaml
  35. +8
    -0
      config/packages/lc_sov.yaml
  36. +2
    -0
      config/packages/liip_imagine.yaml
  37. +30
    -0
      config/packages/liip_imagine/base.yaml
  38. +15
    -0
      config/packages/liip_imagine/specific.yaml
  39. +3
    -0
      config/packages/mailer.yaml
  40. +4
    -0
      config/packages/mailjet.yaml
  41. +16
    -0
      config/packages/notifier.yaml
  42. +8
    -0
      config/packages/prod/deprecations.yaml
  43. +20
    -0
      config/packages/prod/doctrine.yaml
  44. +17
    -0
      config/packages/prod/monolog.yaml
  45. +3
    -0
      config/packages/prod/routing.yaml
  46. +4
    -0
      config/packages/prod/webpack_encore.yaml
  47. +7
    -0
      config/packages/routing.yaml
  48. +38
    -0
      config/packages/security.yaml
  49. +3
    -0
      config/packages/sensio_framework_extra.yaml
  50. +13
    -0
      config/packages/stof_doctrine_extensions.yaml
  51. +4
    -0
      config/packages/test/doctrine.yaml
  52. +4
    -0
      config/packages/test/framework.yaml
  53. +12
    -0
      config/packages/test/monolog.yaml
  54. +2
    -0
      config/packages/test/twig.yaml
  55. +3
    -0
      config/packages/test/validator.yaml
  56. +6
    -0
      config/packages/test/web_profiler.yaml
  57. +2
    -0
      config/packages/test/webpack_encore.yaml
  58. +6
    -0
      config/packages/translation.yaml
  59. +2
    -0
      config/packages/twig.yaml
  60. +8
    -0
      config/packages/validator.yaml
  61. +30
    -0
      config/packages/webpack_encore.yaml
  62. +5
    -0
      config/preload.php
  63. +11
    -0
      config/routes.yaml
  64. +7
    -0
      config/routes/annotations.yaml
  65. +2
    -0
      config/routes/ch_cookie_consent.yaml
  66. +3
    -0
      config/routes/dev/framework.yaml
  67. +7
    -0
      config/routes/dev/web_profiler.yaml
  68. +45
    -0
      config/services.yaml
  69. +0
    -0
      migrations/.gitignore
  70. +103
    -0
      migrations/Version20211012115728.php
  71. +32
    -0
      package.json
  72. +45
    -0
      phpunit.xml.dist
  73. +12
    -0
      public/.htaccess
  74. 二進制
      public/assets/img/laclic.png
  75. +22
    -0
      public/index.php
  76. +0
    -0
      src/Controller/.gitignore
  77. +34
    -0
      src/Controller/Admin/DashboardController.php
  78. +42
    -0
      src/Controller/Admin/PageCrudController.php
  79. +15
    -0
      src/Controller/Admin/UserCrudController.php
  80. +25
    -0
      src/Controller/Frontend/HomeController.php
  81. +0
    -0
      src/Entity/.gitignore
  82. +31
    -0
      src/Entity/File/File.php
  83. +25
    -0
      src/Entity/Reminder/Reminder.php
  84. +25
    -0
      src/Entity/Setting/SiteSetting.php
  85. +103
    -0
      src/Entity/Site/Page.php
  86. +25
    -0
      src/Entity/Site/Site.php
  87. +25
    -0
      src/Entity/Ticket/Ticket.php
  88. +25
    -0
      src/Entity/Ticket/TicketMessage.php
  89. +26
    -0
      src/Entity/User/GroupUser.php
  90. +35
    -0
      src/Entity/User/User.php
  91. +70
    -0
      src/Form/CookieConsentTypeExtension.php
  92. +38
    -0
      src/Kernel.php
  93. +0
    -0
      src/Repository/.gitignore
  94. +697
    -0
      symfony.lock
  95. +58
    -0
      templates/frontend/layout/base.html.twig
  96. +5
    -0
      templates/frontend/layout/footer.html.twig
  97. +3
    -0
      templates/frontend/layout/header.html.twig
  98. +17
    -0
      templates/frontend/layout/macro.html.twig
  99. +12
    -0
      templates/frontend/site/home.html.twig
  100. +11
    -0
      tests/bootstrap.php

+ 37
- 0
.env 查看文件

# In all environments, the following files are loaded if they exist,
# the latter taking precedence over the former:
#
# * .env contains default values for the environment variables needed by the app
# * .env.local uncommitted file with local overrides
# * .env.$APP_ENV committed environment-specific defaults
# * .env.$APP_ENV.local uncommitted environment-specific overrides
#
# Real environment variables win over .env files.
#
# DO NOT DEFINE PRODUCTION SECRETS IN THIS FILE NOR IN ANY OTHER COMMITTED FILES.
#
# Run "composer dump-env prod" to compile .env files for production use (requires symfony/flex >=1.2).
# https://symfony.com/doc/current/best_practices.html#use-environment-variables-for-infrastructure-configuration

###> symfony/framework-bundle ###
APP_ENV=dev
APP_SECRET=555bc2aee588a05641d07ab10b081636
###< symfony/framework-bundle ###

###> symfony/mailer ###
# MAILER_DSN=smtp://localhost
###< symfony/mailer ###

###> doctrine/doctrine-bundle ###
# Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
# IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml
#
# DATABASE_URL="sqlite:///%kernel.project_dir%/var/data.db"
# 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"
###< doctrine/doctrine-bundle ###

###> mailjet/mailjet-bundle ###
MAILJET_APIKEY_PUBLIC=your-api_key
MAILJET_APIKEY_PRIVATE=@@your-secret_key
###< mailjet/mailjet-bundle ###

+ 31
- 0
.gitignore 查看文件

###> symfony/framework-bundle ###
/.php-version
/.env.local
/.env.local.php
/.env.*.local
/config/secrets/prod/prod.decrypt.private.php
/public/bundles/
/public/uploads/
/public/userfiles/*
/public/robots.txt
/public/assets/.sass-cache/
/public/media/cache/
/var/
/vendor/
###< symfony/framework-bundle ###

###> symfony/phpunit-bridge ###
.phpunit
.phpunit.result.cache
/phpunit.xml
###< symfony/phpunit-bridge ###

/Lc/*
/.idea/*
###> symfony/webpack-encore-bundle ###
/node_modules/
npm-debug.log
yarn-error.log
###< symfony/webpack-encore-bundle ###

/public/build/

+ 10
- 0
assets/app/backend/common/app.common.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 './common.scss';
import './common.js';

+ 0
- 0
assets/app/backend/common/common.js 查看文件


+ 0
- 0
assets/app/backend/common/common.scss 查看文件


+ 10
- 0
assets/app/frontend/app/app.common.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';

+ 3
- 0
assets/app/frontend/app/app.js 查看文件

import 'bootstrap';

import "../js/script";

+ 10
- 0
assets/app/frontend/app/app.scss 查看文件

@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";

+ 3
- 0
assets/app/frontend/js/script.js 查看文件

$(document).ready(function () {

});

+ 62
- 0
assets/app/frontend/scss/base.scss 查看文件

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;
}

+ 114
- 0
assets/app/frontend/scss/cookies.scss 查看文件

/* 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;
}
}
}
}
}

+ 0
- 0
assets/app/frontend/scss/footer.scss 查看文件


+ 0
- 0
assets/app/frontend/scss/header.scss 查看文件


+ 0
- 0
assets/app/frontend/scss/home.scss 查看文件


+ 24
- 0
assets/app/frontend/scss/mixin_responsive.scss 查看文件

//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;
}
}

+ 0
- 0
assets/app/frontend/scss/page.scss 查看文件


+ 27
- 0
assets/app/frontend/scss/vars.scss 查看文件

$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
);

+ 4
- 0
assets/controllers.json 查看文件

{
"controllers": [],
"entrypoints": []
}

+ 43
- 0
bin/console 查看文件

#!/usr/bin/env php
<?php

use App\Kernel;
use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Dotenv\Dotenv;
use Symfony\Component\ErrorHandler\Debug;

if (!in_array(PHP_SAPI, ['cli', 'phpdbg', 'embed'], true)) {
echo 'Warning: The console should be invoked via the CLI version of PHP, not the '.PHP_SAPI.' SAPI'.PHP_EOL;
}

set_time_limit(0);

require dirname(__DIR__).'/vendor/autoload.php';

if (!class_exists(Application::class) || !class_exists(Dotenv::class)) {
throw new LogicException('You need to add "symfony/framework-bundle" and "symfony/dotenv" as Composer dependencies.');
}

$input = new ArgvInput();
if (null !== $env = $input->getParameterOption(['--env', '-e'], null, true)) {
putenv('APP_ENV='.$_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = $env);
}

if ($input->hasParameterOption('--no-debug', true)) {
putenv('APP_DEBUG='.$_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = '0');
}

(new Dotenv())->bootEnv(dirname(__DIR__).'/.env');

if ($_SERVER['APP_DEBUG']) {
umask(0000);

if (class_exists(Debug::class)) {
Debug::enable();
}
}

$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
$application = new Application($kernel);
$application->run($input);

+ 13
- 0
bin/phpunit 查看文件

#!/usr/bin/env php
<?php

if (!file_exists(dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php')) {
echo "Unable to find the `simple-phpunit.php` script in `vendor/symfony/phpunit-bridge/bin/`.\n";
exit(1);
}

if (false === getenv('SYMFONY_PHPUNIT_DIR')) {
putenv('SYMFONY_PHPUNIT_DIR='.__DIR__.'/.phpunit');
}

require dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php';

+ 110
- 0
composer.json 查看文件

{
"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"
},
"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": "*"
},
"extra": {
"symfony": {
"allow-contrib": false,
"require": "5.3.*"
}
}
}

+ 10595
- 0
composer.lock
文件差異過大導致無法顯示
查看文件


+ 25
- 0
config/bundles.php 查看文件

<?php

return [
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle::class => ['all' => true],
Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true],
Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true],
Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true],
Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true],
Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true],
Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true],
Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true],
Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true],
Twig\Extra\TwigExtraBundle\TwigExtraBundle::class => ['all' => true],
Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle::class => ['all' => true],
Liip\ImagineBundle\LiipImagineBundle::class => ['all' => true],
FOS\CKEditorBundle\FOSCKEditorBundle::class => ['all' => true],
Artgris\Bundle\FileManagerBundle\ArtgrisFileManagerBundle::class => ['all' => true],
EasyCorp\Bundle\EasyAdminBundle\EasyAdminBundle::class => ['all' => true],
Lc\SovBundle\LcSovBundle::class => ['all' => true],
Symfony\WebpackEncoreBundle\WebpackEncoreBundle::class => ['all' => true],
Knp\Bundle\PaginatorBundle\KnpPaginatorBundle::class => ['all' => true],
Mailjet\MailjetBundle\MailjetBundle::class => ['all' => true],
ConnectHolland\CookieConsentBundle\CHCookieConsentBundle::class => ['all' => true],
];

+ 5
- 0
config/packages/artgris_file_manager.yaml 查看文件

artgris_file_manager:
conf:
default:
dir: "../public%app.path_uploads%"
type: 'image'

+ 3
- 0
config/packages/assets.yaml 查看文件

framework:
assets:
json_manifest_path: '%kernel.project_dir%/public/build/manifest.json'

+ 19
- 0
config/packages/cache.yaml 查看文件

framework:
cache:
# Unique name of your app: used to compute stable namespaces for cache keys.
#prefix_seed: your_vendor_name/app_name

# The "app" cache stores to the filesystem by default.
# The data in this cache should persist between deploys.
# Other options include:

# Redis
#app: cache.adapter.redis
#default_redis_provider: redis://localhost

# APCu (not recommended with heavy random-write workloads as memory fragmentation can cause perf issues)
#app: cache.adapter.apcu

# Namespaced pools use the above "app" backend by default
#pools:
#my.dedicated.cache: null

+ 2
- 0
config/packages/ch_cookie_consent.yaml 查看文件

ch_cookie_consent:
categories: ['analytics', 'tracking', 'social_media', 'marketing']

+ 4
- 0
config/packages/dev/debug.yaml 查看文件

debug:
# Forwards VarDumper Data clones to a centralized server allowing to inspect dumps on CLI or in your browser.
# See the "server:dump" command to start a new server.
dump_destination: "tcp://%env(VAR_DUMPER_SERVER)%"

+ 19
- 0
config/packages/dev/monolog.yaml 查看文件

monolog:
handlers:
main:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: debug
channels: ["!event"]
# uncomment to get logging in your browser
# you may have to allow bigger header sizes in your Web server configuration
#firephp:
# type: firephp
# level: info
#chromephp:
# type: chromephp
# level: info
console:
type: console
process_psr_3_messages: false
channels: ["!event", "!doctrine", "!console"]

+ 6
- 0
config/packages/dev/web_profiler.yaml 查看文件

web_profiler:
toolbar: true
intercept_redirects: false

framework:
profiler: { only_exceptions: false }

+ 24
- 0
config/packages/doctrine.yaml 查看文件

doctrine:
dbal:
# IMPORTANT: DATABASE_URL *must* define the server version
url: '%env(resolve:DATABASE_URL)%'
orm:
auto_generate_proxy_classes: true
naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
auto_mapping: true
mappings:
App:
is_bundle: false
type: annotation
dir: '%kernel.project_dir%/src/Entity'
prefix: 'App\Entity'
alias: App
resolve_target_entities:
Lc\SovBundle\Model\User\UserInterface: App\Entity\User\User
Lc\SovBundle\Model\File\FileInterface: App\Entity\File\File
Lc\SovBundle\Model\Reminder\ReminderInterface: App\Entity\Reminder\Reminder
Lc\SovBundle\Model\User\GroupUserInterface: App\Entity\User\GroupUser
Lc\SovBundle\Model\Site\SiteInterface: App\Entity\Site\Site
Lc\SovBundle\Model\Setting\SiteSettingInterface: App\Entity\Setting\SiteSetting
Lc\SovBundle\Model\Ticket\TicketInterface: App\Entity\Ticket\Ticket
Lc\SovBundle\Model\Ticket\TicketMessageInterface: App\Entity\Ticket\TicketMessage

+ 6
- 0
config/packages/doctrine_migrations.yaml 查看文件

doctrine_migrations:
migrations_paths:
# namespace is arbitrary but should be different from App\Migrations
# as migrations classes should NOT be autoloaded
'DoctrineMigrations': '%kernel.project_dir%/migrations'
enable_profiler: '%kernel.debug%'

+ 24
- 0
config/packages/fos_ckeditor.yaml 查看文件

# Read the documentation: https://symfony.com/doc/current/bundles/FOSCKEditorBundle/index.html

fos_ck_editor:
input_sync: true
default_config: base_config
configs:
base_config:
filebrowserBrowseRoute: file_manager
filebrowserBrowseRouteParameters:
conf: default
module: ckeditor
format_tags: 'p;h2;h3'
toolbar:
- { name: "styles", items: ['Bold', 'Italic','Underline', 'Strike']}
- { name: "paragraph", items: ['Format', 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote'] }
- { name: "link", items: [ 'Link', 'Unlink'] }
- {name: 'insert', items: [ 'Image' ]}
- {name: 'document', items: [ 'Source' ]}
simple_config:
toolbar:
- { items: ['Bold', 'Italic', 'Underline', 'Colors', 'Source'] }
twig:
form_themes:
- '@FOSCKEditor/Form/ckeditor_widget.html.twig'

+ 17
- 0
config/packages/framework.yaml 查看文件

# see https://symfony.com/doc/current/reference/configuration/framework.html
framework:
secret: '%env(APP_SECRET)%'
#csrf_protection: true
#http_method_override: true

# Enables session support. Note that the session will ONLY be started if you read or write from it.
# Remove or comment this section to explicitly disable session support.
session:
handler_id: null
cookie_secure: auto
cookie_samesite: lax

#esi: true
#fragments: true
php_errors:
log: true

+ 8
- 0
config/packages/lc_sov.yaml 查看文件

# see https://symfony.com/doc/current/reference/configuration/framework.html
lc_sov:
homepage_route: 'app_homepage'
login_redirection:
redirect_referer: false
roles_redirection:
- { role: "ROLE_ADMIN", redirect: "app_admin_dashboard" }
- { role: "ROLE_SUPER_ADMIN", redirect: "app_admin_dashboard" }

+ 2
- 0
config/packages/liip_imagine.yaml 查看文件

imports:
- { resource: liip_imagine/ }

+ 30
- 0
config/packages/liip_imagine/base.yaml 查看文件

# 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"
filter_sets:
cache: ~
thumbnail:
quality: 90
filters:
thumbnail:
size: [60]
mode: outbound
page:
quality: 90
filters:
thumbnail:
size: [ 240 ]
mode: outbound
mosaic_big:
quality: 90
filters:
thumbnail:
size: [ 600, 400 ]
mode: outbound
big:
quality: 90
filters:
thumbnail:
size: [ 1600 ]
mode: outbound

+ 15
- 0
config/packages/liip_imagine/specific.yaml 查看文件

liip_imagine:
resolvers:
default:
web_path:
web_root: "%kernel.project_dir%/public"
cache_prefix: "media/cache"
# config sur le serveur d'Alwaysdata chargée lors du déploiement
#web_root: '/home/placedulocal/www/symfony/prod/shared/public/'

loaders:
default:
filesystem:
data_root: "%kernel.project_dir%/public/"
# config sur le serveur d'Alwaysdata chargée lors du déploiement
#data_root: '/home/placedulocal/www/symfony/prod/shared/public/'

+ 3
- 0
config/packages/mailer.yaml 查看文件

framework:
mailer:
dsn: '%env(MAILER_DSN)%'

+ 4
- 0
config/packages/mailjet.yaml 查看文件

mailjet:
api_key: "%env(MAILJET_APIKEY_PUBLIC)%"
secret_key: "%env(MAILJET_APIKEY_PRIVATE)%"


+ 16
- 0
config/packages/notifier.yaml 查看文件

framework:
notifier:
#chatter_transports:
# slack: '%env(SLACK_DSN)%'
# telegram: '%env(TELEGRAM_DSN)%'
#texter_transports:
# twilio: '%env(TWILIO_DSN)%'
# nexmo: '%env(NEXMO_DSN)%'
channel_policy:
# use chat/slack, chat/telegram, sms/twilio or sms/nexmo
urgent: ['email']
high: ['email']
medium: ['email']
low: ['email']
admin_recipients:
- { email: admin@example.com }

+ 8
- 0
config/packages/prod/deprecations.yaml 查看文件

# As of Symfony 5.1, deprecations are logged in the dedicated "deprecation" channel when it exists
#monolog:
# channels: [deprecation]
# handlers:
# deprecation:
# type: stream
# channels: [deprecation]
# path: php://stderr

+ 20
- 0
config/packages/prod/doctrine.yaml 查看文件

doctrine:
orm:
auto_generate_proxy_classes: false
metadata_cache_driver:
type: pool
pool: doctrine.system_cache_pool
query_cache_driver:
type: pool
pool: doctrine.system_cache_pool
result_cache_driver:
type: pool
pool: doctrine.result_cache_pool

framework:
cache:
pools:
doctrine.result_cache_pool:
adapter: cache.app
doctrine.system_cache_pool:
adapter: cache.system

+ 17
- 0
config/packages/prod/monolog.yaml 查看文件

monolog:
handlers:
main:
type: fingers_crossed
action_level: error
handler: nested
excluded_http_codes: [404, 405]
buffer_size: 50 # How many messages should be saved? Prevent memory leaks
nested:
type: stream
path: php://stderr
level: debug
formatter: monolog.formatter.json
console:
type: console
process_psr_3_messages: false
channels: ["!event", "!doctrine"]

+ 3
- 0
config/packages/prod/routing.yaml 查看文件

framework:
router:
strict_requirements: null

+ 4
- 0
config/packages/prod/webpack_encore.yaml 查看文件

#webpack_encore:
# Cache the entrypoints.json (rebuild Symfony's cache when entrypoints.json changes)
# Available in version 1.2
#cache: true

+ 7
- 0
config/packages/routing.yaml 查看文件

framework:
router:
utf8: true

# Configure how to generate URLs in non-HTTP contexts, such as CLI commands.
# See https://symfony.com/doc/current/routing.html#generating-urls-in-commands
#default_uri: http://localhost

+ 38
- 0
config/packages/security.yaml 查看文件

security:
enable_authenticator_manager: true
encoders:
App\Entity\User\User:
algorithm: auto

# https://symfony.com/doc/current/security.html#where-do-users-come-from-user-providers
providers:
# used to reload user from session & other features (e.g. switch_user)
app_user_provider:
entity:
class: App\Entity\User\User
property: email
firewalls:
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false

admin:
pattern: ^/(admin|login|logout)
lazy: true
form_login:
login_path: sov_login
check_path: sov_login
http_basic: ~
entry_point: form_login
provider: app_user_provider
custom_authenticator: Lc\SovBundle\Authenticator\LoginFormAuthenticator
logout:
path: sov_logout
target: sov_login

# 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: ^/manager, roles: [ROLE_ADMIN, ROLE_SUPER_ADMIN] }
- { path: ^/admin, roles: [ROLE_ADMIN, ROLE_SUPER_ADMIN] }
- { path: ^/profile, roles: ROLE_USER }

+ 3
- 0
config/packages/sensio_framework_extra.yaml 查看文件

sensio_framework_extra:
router:
annotations: false

+ 13
- 0
config/packages/stof_doctrine_extensions.yaml 查看文件

# 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: '%app.default_locale%'
translation_fallback: true
orm:
default:
tree: true
timestampable: true # not needed: listeners are not enabled by default
sluggable: true
blameable: true
translatable: false


+ 4
- 0
config/packages/test/doctrine.yaml 查看文件

doctrine:
dbal:
# "TEST_TOKEN" is typically set by ParaTest
dbname: 'main_test%env(default::TEST_TOKEN)%'

+ 4
- 0
config/packages/test/framework.yaml 查看文件

framework:
test: true
session:
storage_id: session.storage.mock_file

+ 12
- 0
config/packages/test/monolog.yaml 查看文件

monolog:
handlers:
main:
type: fingers_crossed
action_level: error
handler: nested
excluded_http_codes: [404, 405]
channels: ["!event"]
nested:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: debug

+ 2
- 0
config/packages/test/twig.yaml 查看文件

twig:
strict_variables: true

+ 3
- 0
config/packages/test/validator.yaml 查看文件

framework:
validation:
not_compromised_password: false

+ 6
- 0
config/packages/test/web_profiler.yaml 查看文件

web_profiler:
toolbar: false
intercept_redirects: false

framework:
profiler: { collect: false }

+ 2
- 0
config/packages/test/webpack_encore.yaml 查看文件

#webpack_encore:
# strict_mode: false

+ 6
- 0
config/packages/translation.yaml 查看文件

framework:
default_locale: '%app.default_locale%'
translator:
default_path: '%kernel.project_dir%/translations'
fallbacks:
- '%app.default_locale%'

+ 2
- 0
config/packages/twig.yaml 查看文件

twig:
default_path: '%kernel.project_dir%/templates'

+ 8
- 0
config/packages/validator.yaml 查看文件

framework:
validation:
email_validation_mode: html5

# Enables validator auto-mapping support.
# For instance, basic validation constraints will be inferred from Doctrine's metadata.
#auto_mapping:
# App\Entity\: []

+ 30
- 0
config/packages/webpack_encore.yaml 查看文件

webpack_encore:
# The path where Encore is building the assets - i.e. Encore.setOutputPath()
output_path: '%kernel.project_dir%/public/build'
# If multiple builds are defined (as shown below), you can disable the default build:
# output_path: false

# Set attributes that will be rendered on all script and link tags
script_attributes:
defer: true
# link_attributes:

# If using Encore.enableIntegrityHashes() and need the crossorigin attribute (default: false, or use 'anonymous' or 'use-credentials')
# crossorigin: 'anonymous'

# Preload all rendered script and link tags automatically via the HTTP/2 Link header
# preload: true

# Throw an exception if the entrypoints.json file is missing or an entry is missing from the data
# strict_mode: false

# If you have multiple builds:
# builds:
# pass "frontend" as the 3rg arg to the Twig functions
# {{ encore_entry_script_tags('entry1', null, 'frontend') }}

# frontend: '%kernel.project_dir%/public/frontend/build'

# Cache the entrypoints.json (rebuild Symfony's cache when entrypoints.json changes)
# Put in config/packages/prod/webpack_encore.yaml
# cache: true

+ 5
- 0
config/preload.php 查看文件

<?php

if (file_exists(dirname(__DIR__).'/var/cache/prod/App_KernelProdContainer.preload.php')) {
require dirname(__DIR__).'/var/cache/prod/App_KernelProdContainer.preload.php';
}

+ 11
- 0
config/routes.yaml 查看文件

sov_bundle:
resource: "@LcSovBundle/Resources/config/routes.yaml"
prefix: /

app_admin_dashboard:
path: /admin
controller: App\Controller\Admin\DashboardController::index

app_homepage:
path: /
defaults: { _controller: App\Controller\Frontend\HomeController::index , _locale: fr }

+ 7
- 0
config/routes/annotations.yaml 查看文件

controllers:
resource: ../../src/Controller/
type: annotation

kernel:
resource: ../../src/Kernel.php
type: annotation

+ 2
- 0
config/routes/ch_cookie_consent.yaml 查看文件

ch_cookie_consent:
resource: "@CHCookieConsentBundle/Resources/config/routing.yaml"

+ 3
- 0
config/routes/dev/framework.yaml 查看文件

_errors:
resource: '@FrameworkBundle/Resources/config/routing/errors.xml'
prefix: /_error

+ 7
- 0
config/routes/dev/web_profiler.yaml 查看文件

web_profiler_wdt:
resource: '@WebProfilerBundle/Resources/config/routing/wdt.xml'
prefix: /_wdt

web_profiler_profiler:
resource: '@WebProfilerBundle/Resources/config/routing/profiler.xml'
prefix: /_profiler

+ 45
- 0
config/services.yaml 查看文件

# This file is the entry point to configure your own services.
# Files in the packages/ subdirectory configure your dependencies.

# Put parameters here that don't need to change on each machine where the app is deployed
# https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration
parameters:
app.locales: ["fr"]
app.default_locale: "fr"
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:
# default configuration for services in *this* file
_defaults:
autowire: true # Automatically injects dependencies in your services.
autoconfigure: true # Automatically registers your services as commands, event subscribers, etc.

# makes classes in src/ available to be used as services
# this creates a service per class whose id is the fully-qualified class name
App\:
resource: '../src/'
exclude:
- '../src/DependencyInjection/'
- '../src/Entity/'
- '../src/Kernel.php'
- '../src/Tests/'

# controllers are imported separately to make sure services can be injected
# as action arguments even if you don't extend any base controller class
App\Controller\:
resource: '../src/Controller/'
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%'

+ 0
- 0
migrations/.gitignore 查看文件


+ 103
- 0
migrations/Version20211012115728.php 查看文件

<?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 Version20211012115728 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 ch_cookieconsent_log (id INT AUTO_INCREMENT NOT NULL, ip_address VARCHAR(255) NOT NULL, cookie_consent_key VARCHAR(255) NOT NULL, cookie_name VARCHAR(255) NOT NULL, cookie_value VARCHAR(255) NOT NULL, timestamp DATETIME NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE file (id INT AUTO_INCREMENT NOT NULL, created_by_id INT DEFAULT NULL, updated_by_id INT DEFAULT 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 group_user (id INT AUTO_INCREMENT NOT NULL, created_by_id INT DEFAULT NULL, updated_by_id INT DEFAULT 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_A4C98D39B03A8386 (created_by_id), INDEX IDX_A4C98D39896DBBDE (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, file_id INT DEFAULT NULL, created_by_id INT DEFAULT NULL, updated_by_id INT DEFAULT 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_140AB62093CB796C (file_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 reminder (id INT AUTO_INCREMENT NOT NULL, created_by_id INT DEFAULT NULL, updated_by_id INT DEFAULT NULL, title VARCHAR(255) NOT NULL, description LONGTEXT DEFAULT NULL, crud_action VARCHAR(64) DEFAULT NULL, crud_controller_fqcn VARCHAR(255) DEFAULT NULL, entity_id INT DEFAULT NULL, date_reminder DATE DEFAULT NULL, done TINYINT(1) NOT NULL, dev_alias VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, INDEX IDX_40374F40B03A8386 (created_by_id), INDEX IDX_40374F40896DBBDE (updated_by_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE reminder_user_interface (reminder_id INT NOT NULL, user_interface_id INT NOT NULL, INDEX IDX_7FD2584BD987BE75 (reminder_id), INDEX IDX_7FD2584B2BC79580 (user_interface_id), PRIMARY KEY(reminder_id, user_interface_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE site (id INT AUTO_INCREMENT NOT NULL, dev_alias VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE site_setting (id INT AUTO_INCREMENT NOT NULL, site_id INT NOT NULL, file_id INT DEFAULT NULL, name VARCHAR(63) NOT NULL, text LONGTEXT DEFAULT NULL, date DATETIME DEFAULT NULL, INDEX IDX_64D05A53F6BD1646 (site_id), INDEX IDX_64D05A5393CB796C (file_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE ticket (id INT AUTO_INCREMENT NOT NULL, user_id INT DEFAULT NULL, created_by_id INT DEFAULT NULL, updated_by_id INT DEFAULT NULL, type VARCHAR(32) NOT NULL, status VARCHAR(32) NOT NULL, subject VARCHAR(255) NOT NULL, tags LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:array)\', visitor_firstname VARCHAR(64) DEFAULT NULL, visitor_lastname VARCHAR(64) DEFAULT NULL, visitor_email VARCHAR(128) DEFAULT NULL, visitor_token VARCHAR(255) DEFAULT NULL, dev_alias VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, INDEX IDX_97A0ADA3A76ED395 (user_id), INDEX IDX_97A0ADA3B03A8386 (created_by_id), INDEX IDX_97A0ADA3896DBBDE (updated_by_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE ticket_message (id INT AUTO_INCREMENT NOT NULL, ticket_id INT NOT NULL, created_by_id INT DEFAULT NULL, updated_by_id INT DEFAULT NULL, message LONGTEXT NOT NULL, answer_by_admin TINYINT(1) DEFAULT NULL, image_filename VARCHAR(255) DEFAULT NULL, dev_alias VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, status DOUBLE PRECISION NOT NULL, INDEX IDX_BA71692D700047D2 (ticket_id), INDEX IDX_BA71692DB03A8386 (created_by_id), INDEX IDX_BA71692D896DBBDE (updated_by_id), PRIMARY KEY(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 JSON NOT NULL, password VARCHAR(255) NOT NULL, lastname VARCHAR(255) DEFAULT NULL, firstname VARCHAR(255) DEFAULT NULL, phone VARCHAR(20) DEFAULT NULL, gender TINYINT(1) DEFAULT NULL, birthdate DATE DEFAULT NULL, is_verified TINYINT(1) NOT NULL, ticket_types_notification LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:array)\', dev_alias VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, UNIQUE INDEX UNIQ_8D93D649E7927C74 (email), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE user_group_user_interface (user_id INT NOT NULL, group_user_interface_id INT NOT NULL, INDEX IDX_12B87B34A76ED395 (user_id), INDEX IDX_12B87B34F583BABC (group_user_interface_id), PRIMARY KEY(user_id, group_user_interface_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 group_user ADD CONSTRAINT FK_A4C98D39B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE group_user ADD CONSTRAINT FK_A4C98D39896DBBDE 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_140AB62093CB796C FOREIGN KEY (file_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');
$this->addSql('ALTER TABLE reminder ADD CONSTRAINT FK_40374F40B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE reminder ADD CONSTRAINT FK_40374F40896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE reminder_user_interface ADD CONSTRAINT FK_7FD2584BD987BE75 FOREIGN KEY (reminder_id) REFERENCES reminder (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE reminder_user_interface ADD CONSTRAINT FK_7FD2584B2BC79580 FOREIGN KEY (user_interface_id) REFERENCES user (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE site_setting ADD CONSTRAINT FK_64D05A53F6BD1646 FOREIGN KEY (site_id) REFERENCES site (id)');
$this->addSql('ALTER TABLE site_setting ADD CONSTRAINT FK_64D05A5393CB796C FOREIGN KEY (file_id) REFERENCES file (id)');
$this->addSql('ALTER TABLE ticket ADD CONSTRAINT FK_97A0ADA3A76ED395 FOREIGN KEY (user_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE ticket ADD CONSTRAINT FK_97A0ADA3B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE ticket ADD CONSTRAINT FK_97A0ADA3896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE ticket_message ADD CONSTRAINT FK_BA71692D700047D2 FOREIGN KEY (ticket_id) REFERENCES ticket (id)');
$this->addSql('ALTER TABLE ticket_message ADD CONSTRAINT FK_BA71692DB03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE ticket_message ADD CONSTRAINT FK_BA71692D896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE user_group_user_interface ADD CONSTRAINT FK_12B87B34A76ED395 FOREIGN KEY (user_id) REFERENCES user (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE user_group_user_interface ADD CONSTRAINT FK_12B87B34F583BABC FOREIGN KEY (group_user_interface_id) REFERENCES group_user (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 DROP FOREIGN KEY FK_140AB62093CB796C');
$this->addSql('ALTER TABLE page_file DROP FOREIGN KEY FK_B5B2ACA93CB796C');
$this->addSql('ALTER TABLE site_setting DROP FOREIGN KEY FK_64D05A5393CB796C');
$this->addSql('ALTER TABLE user_group_user_interface DROP FOREIGN KEY FK_12B87B34F583BABC');
$this->addSql('ALTER TABLE page_file DROP FOREIGN KEY FK_B5B2ACAC4663E4');
$this->addSql('ALTER TABLE reminder_user_interface DROP FOREIGN KEY FK_7FD2584BD987BE75');
$this->addSql('ALTER TABLE site_setting DROP FOREIGN KEY FK_64D05A53F6BD1646');
$this->addSql('ALTER TABLE ticket_message DROP FOREIGN KEY FK_BA71692D700047D2');
$this->addSql('ALTER TABLE file DROP FOREIGN KEY FK_8C9F3610B03A8386');
$this->addSql('ALTER TABLE file DROP FOREIGN KEY FK_8C9F3610896DBBDE');
$this->addSql('ALTER TABLE group_user DROP FOREIGN KEY FK_A4C98D39B03A8386');
$this->addSql('ALTER TABLE group_user DROP FOREIGN KEY FK_A4C98D39896DBBDE');
$this->addSql('ALTER TABLE page DROP FOREIGN KEY FK_140AB620B03A8386');
$this->addSql('ALTER TABLE page DROP FOREIGN KEY FK_140AB620896DBBDE');
$this->addSql('ALTER TABLE reminder DROP FOREIGN KEY FK_40374F40B03A8386');
$this->addSql('ALTER TABLE reminder DROP FOREIGN KEY FK_40374F40896DBBDE');
$this->addSql('ALTER TABLE reminder_user_interface DROP FOREIGN KEY FK_7FD2584B2BC79580');
$this->addSql('ALTER TABLE ticket DROP FOREIGN KEY FK_97A0ADA3A76ED395');
$this->addSql('ALTER TABLE ticket DROP FOREIGN KEY FK_97A0ADA3B03A8386');
$this->addSql('ALTER TABLE ticket DROP FOREIGN KEY FK_97A0ADA3896DBBDE');
$this->addSql('ALTER TABLE ticket_message DROP FOREIGN KEY FK_BA71692DB03A8386');
$this->addSql('ALTER TABLE ticket_message DROP FOREIGN KEY FK_BA71692D896DBBDE');
$this->addSql('ALTER TABLE user_group_user_interface DROP FOREIGN KEY FK_12B87B34A76ED395');
$this->addSql('DROP TABLE ch_cookieconsent_log');
$this->addSql('DROP TABLE file');
$this->addSql('DROP TABLE group_user');
$this->addSql('DROP TABLE page');
$this->addSql('DROP TABLE page_file');
$this->addSql('DROP TABLE reminder');
$this->addSql('DROP TABLE reminder_user_interface');
$this->addSql('DROP TABLE site');
$this->addSql('DROP TABLE site_setting');
$this->addSql('DROP TABLE ticket');
$this->addSql('DROP TABLE ticket_message');
$this->addSql('DROP TABLE user');
$this->addSql('DROP TABLE user_group_user_interface');
}
}

+ 32
- 0
package.json 查看文件

{
"license": "UNLICENSED",
"private": true,
"scripts": {
"dev-server": "encore dev-server",
"dev": "encore dev",
"watch": "encore dev --watch",
"build": "encore production --progress"
},
"dependencies": {
"@symfony/stimulus-bridge": "^2.0.0",
"@symfony/webpack-encore": "^1.4.0",
"bootstrap-daterangepicker": "^3.1.0",
"core-js": "^3.0.0",
"regenerator-runtime": "^0.13.2",
"sass": "^1.34.0",
"select2": "^4.0.13",
"@ttskch/select2-bootstrap4-theme": "^1.5.2",
"stimulus": "^2.0.0",
"ts-loader": "^8.0.1",
"typescript": "^4.4.2",
"webpack-notifier": "^1.6.0",
"@amcharts/amcharts4": "^4.10.22",
"admin-lte": "^3.1.0",
"jquery-ui-sortable": "^1.0.0",
"bootstrap-autocomplete": "^2.3.7",
"jquery": "^3.6.0",
"sass-loader": "^11.1.1"
},
"devDependencies": {
}
}

+ 45
- 0
phpunit.xml.dist 查看文件

<?xml version="1.0" encoding="UTF-8"?>

<!-- https://phpunit.readthedocs.io/en/latest/configuration.html -->
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="bin/.phpunit/phpunit.xsd"
backupGlobals="false"
colors="true"
bootstrap="tests/bootstrap.php"
>
<php>
<ini name="error_reporting" value="-1" />
<server name="APP_ENV" value="test" force="true" />
<server name="SHELL_VERBOSITY" value="-1" />
<server name="SYMFONY_PHPUNIT_REMOVE" value="" />
<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>

<testsuites>
<testsuite name="Project Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>

<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">src</directory>
</whitelist>
</filter>

<listeners>
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener" />
</listeners>

<!-- Run `composer require symfony/panther` before enabling this extension -->
<!--
<extensions>
<extension class="Symfony\Component\Panther\ServerExtension" />
</extensions>
-->
</phpunit>

+ 12
- 0
public/.htaccess 查看文件

<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>

<IfModule !mod_rewrite.c>
<IfModule mod_alias.c>
RedirectMatch 302 ^/$ /index.php/
</IfModule>
</IfModule>

二進制
public/assets/img/laclic.png 查看文件

Before After
Width: 523  |  Height: 106  |  Size: 9.8KB

+ 22
- 0
public/index.php 查看文件

<?php

use App\Kernel;
use Symfony\Component\Dotenv\Dotenv;
use Symfony\Component\ErrorHandler\Debug;
use Symfony\Component\HttpFoundation\Request;

require dirname(__DIR__).'/vendor/autoload.php';

(new Dotenv())->bootEnv(dirname(__DIR__).'/.env');

if ($_SERVER['APP_DEBUG']) {
umask(0000);

Debug::enable();
}

$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);

+ 0
- 0
src/Controller/.gitignore 查看文件


+ 34
- 0
src/Controller/Admin/DashboardController.php 查看文件

<?php

namespace App\Controller\Admin;


use App\Entity\Site\Page;
use App\Entity\User\User;
use EasyCorp\Bundle\EasyAdminBundle\Config\MenuItem;
use Lc\SovBundle\Controller\Dashboard\DashboardAdminController as SovDashboardController;

class DashboardController extends SovDashboardController
{

public function configureMenuItems(): iterable
{
$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;
}
}

+ 42
- 0
src/Controller/Admin/PageCrudController.php 查看文件

<?php

namespace App\Controller\Admin;

use App\Entity\Site\Page;
use EasyCorp\Bundle\EasyAdminBundle\Field\FormField;
use EasyCorp\Bundle\EasyAdminBundle\Field\NumberField;
use EasyCorp\Bundle\EasyAdminBundle\Field\TextField;
use Lc\SovBundle\Controller\AbstractAdminController as AbstractCrudController;
use Lc\SovBundle\Field\CKEditorField;
use Lc\SovBundle\Field\FileManagerField;
use Lc\SovBundle\Field\GalleryManagerField;
use Lc\SovBundle\Field\StatusField;

class PageCrudController extends AbstractCrudController
{
public static function getEntityFqcn(): string
{
return Page::class;
}

public function configureFields(string $pageName): iterable
{
$panel = parent::configureFields($pageName);

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
);
}


}

+ 15
- 0
src/Controller/Admin/UserCrudController.php 查看文件

<?php

namespace App\Controller\Admin;

use App\Entity\User\User;
use Lc\SovBundle\Controller\User\UserAdminController as AbstractUserCrudController;

class UserCrudController extends AbstractUserCrudController
{
public static function getEntityFqcn(): string
{
return User::class;
}

}

+ 25
- 0
src/Controller/Frontend/HomeController.php 查看文件

<?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');
}
}

+ 0
- 0
src/Entity/.gitignore 查看文件


+ 31
- 0
src/Entity/File/File.php 查看文件

<?php

namespace App\Entity\File;

use Doctrine\ORM\Mapping as ORM;
use Lc\SovBundle\Model\File\FileInterface;
use Lc\SovBundle\Model\File\FileModel;
use Lc\SovBundle\Repository\File\FileRepository;

/**
* @ORM\Entity(repositoryClass=FileRepository::class)
*/
class File extends FileModel implements FileInterface
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;

public function getId(): ?int
{
return $this->id;
}

public function __toString()
{
return '' . $this->getLegend();
}
}

+ 25
- 0
src/Entity/Reminder/Reminder.php 查看文件

<?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;
}
}

+ 25
- 0
src/Entity/Setting/SiteSetting.php 查看文件

<?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;
}
}

+ 103
- 0
src/Entity/Site/Page.php 查看文件

<?php

namespace App\Entity\Site;

use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Lc\SovBundle\Doctrine\Pattern\AbstractFullEntity;
use App\Entity\File\File;
use Lc\SovBundle\Repository\Site\PageRepository;

/**
* @ORM\Entity(repositoryClass=PageRepository::class)
*/
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();
}

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;
}

return $this;
}

public function removeGallery(File $gallery): self
{
$this->gallery->removeElement($gallery);

return $this;
}

public function getFile(): ?File
{
return $this->file;
}

public function setFile(?File $file): self
{
$this->file = $file;

return $this;
}

}

+ 25
- 0
src/Entity/Site/Site.php 查看文件

<?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;
}
}

+ 25
- 0
src/Entity/Ticket/Ticket.php 查看文件

<?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;
}
}

+ 25
- 0
src/Entity/Ticket/TicketMessage.php 查看文件

<?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;
}
}

+ 26
- 0
src/Entity/User/GroupUser.php 查看文件

<?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;
}

}

+ 35
- 0
src/Entity/User/User.php 查看文件

<?php

namespace App\Entity\User;

use App\Entity\CollectifData;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Lc\SovBundle\Model\User\UserModel as SovUserModel;
use Lc\SovBundle\Model\User\UserInterface;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;

/**
* @ORM\Entity(repositoryClass="Lc\SovBundle\Repository\User\UserRepository")
* @UniqueEntity(fields={"email"}, message="There is already an account with this email")
*/
class User extends SovUserModel implements UserInterface
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;

public function __toString()
{
return $this->firstname . " " . $this->lastname;
}

public function getId(): ?int
{
return $this->id;
}
}

+ 70
- 0
src/Form/CookieConsentTypeExtension.php 查看文件

<?php

namespace App\Form;

use ConnectHolland\CookieConsentBundle\Cookie\CookieChecker;
use Symfony\Component\Form\AbstractTypeExtension;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\FormBuilderInterface;
use ConnectHolland\CookieConsentBundle\Form\CookieConsentType as BaseCookieConsentType;

class CookieConsentTypeExtension extends AbstractTypeExtension
{
/**
* @var CookieChecker
*/
protected $cookieChecker;

/**
* @var array
*/
protected $cookieCategories;

/**
* @var bool
*/
protected $cookieConsentSimplified;

public function __construct(
CookieChecker $cookieChecker,
array $cookieCategories = [],
bool $cookieConsentSimplified = null
) {
$this->cookieChecker = $cookieChecker;
$this->cookieCategories = $cookieCategories;
$this->cookieConsentSimplified = $cookieConsentSimplified;
}

public function buildForm(FormBuilderInterface $builder, array $options)
{
foreach ($this->cookieCategories as $category) {
$builder->remove($category);

$data = 'true';
if ($this->cookieChecker->isCookieConsentSavedByUser() && !$this->cookieChecker->isCategoryAllowedByUser(
$category
)) {
$data = 'false';
}

$builder->add(
$category,
ChoiceType::class,
[
'expanded' => true,
'multiple' => false,
'data' => $data,
'choices' => [
['ch_cookie_consent.yes' => 'true'],
['ch_cookie_consent.no' => 'false'],
],
]
);
}
}

public static function getExtendedTypes(): iterable
{
return [BaseCookieConsentType::class];
}
}

+ 38
- 0
src/Kernel.php 查看文件

<?php

namespace App;

use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use Symfony\Component\HttpKernel\Kernel as BaseKernel;
use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;

class Kernel extends BaseKernel
{
use MicroKernelTrait;

protected function configureContainer(ContainerConfigurator $container): void
{
$container->import('../config/{packages}/*.yaml');
$container->import('../config/{packages}/'.$this->environment.'/*.yaml');

if (is_file(\dirname(__DIR__).'/config/services.yaml')) {
$container->import('../config/services.yaml');
$container->import('../config/{services}_'.$this->environment.'.yaml');
} elseif (is_file($path = \dirname(__DIR__).'/config/services.php')) {
(require $path)($container->withPath($path), $this);
}
}

protected function configureRoutes(RoutingConfigurator $routes): void
{
$routes->import('../config/{routes}/'.$this->environment.'/*.yaml');
$routes->import('../config/{routes}/*.yaml');

if (is_file(\dirname(__DIR__).'/config/routes.yaml')) {
$routes->import('../config/routes.yaml');
} elseif (is_file($path = \dirname(__DIR__).'/config/routes.php')) {
(require $path)($routes->withPath($path), $this);
}
}
}

+ 0
- 0
src/Repository/.gitignore 查看文件


+ 697
- 0
symfony.lock 查看文件

{
"artgris/filemanager-bundle": {
"version": "2.2.3"
},
"behat/transliterator": {
"version": "v1.3.0"
},
"composer/installers": {
"version": "v1.11.0"
},
"composer/package-versions-deprecated": {
"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": {
"version": "1.0",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "1.0",
"ref": "a2759dd6123694c8d901d0ec80006e044c2e6457"
},
"files": [
"config/routes/annotations.yaml"
]
},
"doctrine/cache": {
"version": "1.11.2"
},
"doctrine/collections": {
"version": "1.6.7"
},
"doctrine/common": {
"version": "3.1.2"
},
"doctrine/dbal": {
"version": "2.13.1"
},
"doctrine/deprecations": {
"version": "v0.5.3"
},
"doctrine/doctrine-bundle": {
"version": "2.3",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "2.3",
"ref": "c9e656a395646ea4fad2bd3e2b3816028baf9026"
},
"files": [
"config/packages/doctrine.yaml",
"config/packages/prod/doctrine.yaml",
"config/packages/test/doctrine.yaml",
"src/Entity/.gitignore",
"src/Repository/.gitignore"
]
},
"doctrine/doctrine-migrations-bundle": {
"version": "3.1",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "3.1",
"ref": "ee609429c9ee23e22d6fa5728211768f51ed2818"
},
"files": [
"config/packages/doctrine_migrations.yaml",
"migrations/.gitignore"
]
},
"doctrine/event-manager": {
"version": "1.1.1"
},
"doctrine/inflector": {
"version": "2.0.3"
},
"doctrine/instantiator": {
"version": "1.4.0"
},
"doctrine/lexer": {
"version": "1.2.1"
},
"doctrine/migrations": {
"version": "3.1.2"
},
"doctrine/orm": {
"version": "2.8.5"
},
"doctrine/persistence": {
"version": "2.2.1"
},
"doctrine/sql-formatter": {
"version": "1.1.1"
},
"dompdf/dompdf": {
"version": "v1.0.2"
},
"easycorp/easyadmin-bundle": {
"version": "3.0",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "3.0",
"ref": "b131e6cbfe1b898a508987851963fff485986285"
}
},
"egulias/email-validator": {
"version": "3.1.1"
},
"friendsofphp/proxy-manager-lts": {
"version": "v1.0.5"
},
"friendsofsymfony/ckeditor-bundle": {
"version": "2.0",
"recipe": {
"repo": "github.com/symfony/recipes-contrib",
"branch": "master",
"version": "2.0",
"ref": "8eb1cd0962ded6a6d6e1e5a9b6d3e888f9f94ff6"
},
"files": [
"config/packages/fos_ckeditor.yaml"
]
},
"gedmo/doctrine-extensions": {
"version": "v3.0.5"
},
"guzzlehttp/guzzle": {
"version": "7.3.0"
},
"guzzlehttp/promises": {
"version": "1.5.0"
},
"guzzlehttp/psr7": {
"version": "2.1.0"
},
"hamcrest/hamcrest-php": {
"version": "v2.0.1"
},
"imagine/imagine": {
"version": "1.2.4"
},
"knplabs/knp-components": {
"version": "v3.1.0"
},
"knplabs/knp-paginator-bundle": {
"version": "v5.7.0"
},
"laminas/laminas-code": {
"version": "4.3.0"
},
"laminas/laminas-eventmanager": {
"version": "3.3.1"
},
"laminas/laminas-zendframework-bridge": {
"version": "1.2.0"
},
"liip/imagine-bundle": {
"version": "1.8",
"recipe": {
"repo": "github.com/symfony/recipes-contrib",
"branch": "master",
"version": "1.8",
"ref": "5a5bdc2d0e2533ed6935d5ae562f2b318a8fc1ee"
}
},
"mailjet/mailjet-apiv3-php": {
"version": "v1.5.5"
},
"mailjet/mailjet-bundle": {
"version": "1.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": {
"version": "2.2.0"
},
"nikic/php-parser": {
"version": "v4.10.5"
},
"oomphinc/composer-installers-extender": {
"version": "2.0.0"
},
"phenx/php-font-lib": {
"version": "0.5.2"
},
"phenx/php-svg-lib": {
"version": "v0.3.3"
},
"phpdocumentor/reflection-common": {
"version": "2.2.0"
},
"phpdocumentor/reflection-docblock": {
"version": "5.2.2"
},
"phpdocumentor/type-resolver": {
"version": "1.4.0"
},
"psr/cache": {
"version": "1.0.1"
},
"psr/container": {
"version": "1.1.1"
},
"psr/event-dispatcher": {
"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": {
"version": "1.0.0"
},
"psr/log": {
"version": "1.1.4"
},
"ralouphie/getallheaders": {
"version": "3.0.3"
},
"sabberworm/php-css-parser": {
"version": "8.3.1"
},
"sensio/framework-extra-bundle": {
"version": "5.2",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "5.2",
"ref": "fb7e19da7f013d0d422fa9bce16f5c510e27609b"
},
"files": [
"config/packages/sensio_framework_extra.yaml"
]
},
"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": "v5.4.12"
},
"symfony/asset": {
"version": "v5.2.7"
},
"symfony/browser-kit": {
"version": "v5.2.9"
},
"symfony/cache": {
"version": "v5.2.9"
},
"symfony/cache-contracts": {
"version": "v2.4.0"
},
"symfony/config": {
"version": "v5.2.8"
},
"symfony/console": {
"version": "5.1",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "5.1",
"ref": "c6d02bdfba9da13c22157520e32a602dbee8a75c"
},
"files": [
"bin/console"
]
},
"symfony/css-selector": {
"version": "v5.2.9"
},
"symfony/debug-bundle": {
"version": "4.1",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "4.1",
"ref": "0ce7a032d344fb7b661cd25d31914cd703ad445b"
},
"files": [
"config/packages/dev/debug.yaml"
]
},
"symfony/debug-pack": {
"version": "v1.0.9"
},
"symfony/dependency-injection": {
"version": "v5.2.9"
},
"symfony/deprecation-contracts": {
"version": "v2.4.0"
},
"symfony/doctrine-bridge": {
"version": "v5.2.9"
},
"symfony/dom-crawler": {
"version": "v5.2.9"
},
"symfony/dotenv": {
"version": "v5.2.4"
},
"symfony/error-handler": {
"version": "v5.2.8"
},
"symfony/event-dispatcher": {
"version": "v5.2.4"
},
"symfony/event-dispatcher-contracts": {
"version": "v2.4.0"
},
"symfony/expression-language": {
"version": "v5.2.7"
},
"symfony/filesystem": {
"version": "v5.2.7"
},
"symfony/finder": {
"version": "v5.2.9"
},
"symfony/flex": {
"version": "1.0",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "1.0",
"ref": "c0eeb50665f0f77226616b6038a9b06c03752d8e"
},
"files": [
".env"
]
},
"symfony/form": {
"version": "v5.2.9"
},
"symfony/framework-bundle": {
"version": "5.2",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "5.2",
"ref": "6ec87563dcc85cd0c48856dcfbfc29610506d250"
},
"files": [
"config/packages/cache.yaml",
"config/packages/framework.yaml",
"config/packages/test/framework.yaml",
"config/preload.php",
"config/routes/dev/framework.yaml",
"config/services.yaml",
"public/index.php",
"src/Controller/.gitignore",
"src/Kernel.php"
]
},
"symfony/http-client": {
"version": "v5.2.9"
},
"symfony/http-client-contracts": {
"version": "v2.4.0"
},
"symfony/http-foundation": {
"version": "v5.2.8"
},
"symfony/http-kernel": {
"version": "v5.2.9"
},
"symfony/intl": {
"version": "v5.2.7"
},
"symfony/mailer": {
"version": "4.3",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "4.3",
"ref": "15658c2a0176cda2e7dba66276a2030b52bd81b2"
},
"files": [
"config/packages/mailer.yaml"
]
},
"symfony/maker-bundle": {
"version": "1.0",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "1.0",
"ref": "fadbfe33303a76e25cb63401050439aa9b1a9c7f"
}
},
"symfony/mime": {
"version": "v5.2.9"
},
"symfony/monolog-bridge": {
"version": "v5.2.7"
},
"symfony/monolog-bundle": {
"version": "3.7",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "3.7",
"ref": "329f6a5ef2e7aa033f802be833ef8d1268dd0848"
},
"files": [
"config/packages/dev/monolog.yaml",
"config/packages/prod/deprecations.yaml",
"config/packages/prod/monolog.yaml",
"config/packages/test/monolog.yaml"
]
},
"symfony/notifier": {
"version": "5.0",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "5.0",
"ref": "c31585e252b32fe0e1f30b1f256af553f4a06eb9"
},
"files": [
"config/packages/notifier.yaml"
]
},
"symfony/options-resolver": {
"version": "v5.2.4"
},
"symfony/orm-pack": {
"version": "v2.1.0"
},
"symfony/password-hasher": {
"version": "v5.3.8"
},
"symfony/phpunit-bridge": {
"version": "5.1",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "5.1",
"ref": "bf16921ef8309a81d9f046e9b6369c46bcbd031f"
},
"files": [
".env.test",
"bin/phpunit",
"phpunit.xml.dist",
"tests/bootstrap.php"
]
},
"symfony/polyfill-intl-grapheme": {
"version": "v1.22.1"
},
"symfony/polyfill-intl-icu": {
"version": "v1.22.1"
},
"symfony/polyfill-intl-idn": {
"version": "v1.22.1"
},
"symfony/polyfill-intl-normalizer": {
"version": "v1.22.1"
},
"symfony/polyfill-mbstring": {
"version": "v1.22.1"
},
"symfony/polyfill-php73": {
"version": "v1.22.1"
},
"symfony/polyfill-php80": {
"version": "v1.22.1"
},
"symfony/polyfill-php81": {
"version": "v1.23.0"
},
"symfony/polyfill-uuid": {
"version": "v1.22.1"
},
"symfony/process": {
"version": "v5.2.7"
},
"symfony/profiler-pack": {
"version": "v1.0.5"
},
"symfony/property-access": {
"version": "v5.2.4"
},
"symfony/property-info": {
"version": "v5.2.8"
},
"symfony/proxy-manager-bridge": {
"version": "v5.2.9"
},
"symfony/routing": {
"version": "5.1",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "5.1",
"ref": "b4f3e7c95e38b606eef467e8a42a8408fc460c43"
},
"files": [
"config/packages/prod/routing.yaml",
"config/packages/routing.yaml",
"config/routes.yaml"
]
},
"symfony/security-bundle": {
"version": "5.1",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "5.1",
"ref": "0a4bae19389d3b9cba1ca0102e3b2bccea724603"
},
"files": [
"config/packages/security.yaml"
]
},
"symfony/security-core": {
"version": "v5.2.9"
},
"symfony/security-csrf": {
"version": "v5.2.7"
},
"symfony/security-guard": {
"version": "v5.2.8"
},
"symfony/security-http": {
"version": "v5.2.9"
},
"symfony/serializer": {
"version": "v5.2.9"
},
"symfony/serializer-pack": {
"version": "v1.0.4"
},
"symfony/service-contracts": {
"version": "v2.4.0"
},
"symfony/stopwatch": {
"version": "v5.2.7"
},
"symfony/string": {
"version": "v5.2.8"
},
"symfony/templating": {
"version": "v5.3.7"
},
"symfony/test-pack": {
"version": "v1.0.7"
},
"symfony/translation": {
"version": "3.3",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "3.3",
"ref": "2ad9d2545bce8ca1a863e50e92141f0b9d87ffcd"
},
"files": [
"config/packages/translation.yaml",
"translations/.gitignore"
]
},
"symfony/translation-contracts": {
"version": "v2.4.0"
},
"symfony/twig-bridge": {
"version": "v5.2.8"
},
"symfony/twig-bundle": {
"version": "5.0",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "5.0",
"ref": "fab9149bbaa4d5eca054ed93f9e1b66cc500895d"
},
"files": [
"config/packages/test/twig.yaml",
"config/packages/twig.yaml",
"templates/base.html.twig"
]
},
"symfony/twig-pack": {
"version": "v1.0.1"
},
"symfony/uid": {
"version": "v5.2.6"
},
"symfony/validator": {
"version": "4.3",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "4.3",
"ref": "d902da3e4952f18d3bf05aab29512eb61cabd869"
},
"files": [
"config/packages/test/validator.yaml",
"config/packages/validator.yaml"
]
},
"symfony/var-dumper": {
"version": "v5.2.8"
},
"symfony/var-exporter": {
"version": "v5.2.8"
},
"symfony/web-link": {
"version": "v5.2.5"
},
"symfony/web-profiler-bundle": {
"version": "3.3",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "3.3",
"ref": "6bdfa1a95f6b2e677ab985cd1af2eae35d62e0f6"
},
"files": [
"config/packages/dev/web_profiler.yaml",
"config/packages/test/web_profiler.yaml",
"config/routes/dev/web_profiler.yaml"
]
},
"symfony/webpack-encore-bundle": {
"version": "1.9",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "1.9",
"ref": "9399a0bfc6ee7a0c019f952bca46d6a6045dd451"
},
"files": [
"assets/app.js",
"assets/bootstrap.js",
"assets/controllers.json",
"assets/controllers/hello_controller.js",
"assets/styles/app.css",
"config/packages/assets.yaml",
"config/packages/prod/webpack_encore.yaml",
"config/packages/test/webpack_encore.yaml",
"config/packages/webpack_encore.yaml",
"package.json",
"webpack.config.js"
]
},
"symfony/yaml": {
"version": "v5.2.9"
},
"twig/extra-bundle": {
"version": "v3.3.1"
},
"twig/twig": {
"version": "v3.3.2"
},
"webmozart/assert": {
"version": "1.10.0"
}
}

+ 58
- 0
templates/frontend/layout/base.html.twig 查看文件

<!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>

+ 5
- 0
templates/frontend/layout/footer.html.twig 查看文件

<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>

+ 3
- 0
templates/frontend/layout/header.html.twig 查看文件

<header>

</header>

+ 17
- 0
templates/frontend/layout/macro.html.twig 查看文件

{% 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 %}

+ 12
- 0
templates/frontend/site/home.html.twig 查看文件

{% 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 %}

+ 11
- 0
tests/bootstrap.php 查看文件

<?php

use Symfony\Component\Dotenv\Dotenv;

require dirname(__DIR__).'/vendor/autoload.php';

if (file_exists(dirname(__DIR__).'/config/bootstrap.php')) {
require dirname(__DIR__).'/config/bootstrap.php';
} elseif (method_exists(Dotenv::class, 'bootEnv')) {
(new Dotenv())->bootEnv(dirname(__DIR__).'/.env');
}

部分文件因文件數量過多而無法顯示

Loading…
取消
儲存