Quellcode durchsuchen

adaptation au bundle pietro

develop
Charly vor 3 Jahren
Ursprung
Commit
654b820af7
9 geänderte Dateien mit 54 neuen und 28 gelöschten Zeilen
  1. +1
    -1
      config/packages/framework.yaml
  2. +10
    -14
      config/packages/security.yaml
  3. +31
    -0
      migrations/Version20211011104739.php
  4. +4
    -5
      src/Controller/Admin/CollectifDataCrudController.php
  5. +1
    -0
      src/Controller/Admin/DashboardController.php
  6. +1
    -1
      src/Controller/Admin/IndividualData/IndividualDataAdminController.php
  7. +1
    -1
      src/Controller/Admin/Subthematic/SubthematicAdminController.php
  8. +4
    -4
      src/Form/IndividualDataForm.php
  9. +1
    -2
      src/Form/SearchListForm.php

+ 1
- 1
config/packages/framework.yaml Datei anzeigen

@@ -1,7 +1,7 @@
# see https://symfony.com/doc/current/reference/configuration/framework.html
framework:
secret: '%env(APP_SECRET)%'
#csrf_protection: true
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.

+ 10
- 14
config/packages/security.yaml Datei anzeigen

@@ -1,4 +1,5 @@
security:
enable_authenticator_manager: true
encoders:
App\Entity\User\User:
algorithm: auto
@@ -15,24 +16,19 @@ security:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false

main:
pattern: ^/
anonymous: true
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
guard:
authenticators:
- Lc\SovBundle\Authenticator\LoginFormAuthenticator
custom_authenticator: Lc\SovBundle\Authenticator\LoginFormAuthenticator
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
# Note: Only the *first* access control that matches will be used

+ 31
- 0
migrations/Version20211011104739.php Datei anzeigen

@@ -0,0 +1,31 @@
<?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 Version20211011104739 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 user ADD created_at DATETIME NOT NULL, ADD updated_at DATETIME NOT NULL');
}

public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE user DROP created_at, DROP updated_at');
}
}

+ 4
- 5
src/Controller/Admin/CollectifDataCrudController.php Datei anzeigen

@@ -3,11 +3,10 @@
namespace App\Controller\Admin;

use App\Entity\CollectifData;
use App\Entity\Configuration;
use App\Type\DreamType;
use App\Type\ProjectBoostType;
use App\Type\ProjectInspiringType;
use App\Type\RevoltType;
use Lc\PietroBundle\Form\Dream\DreamType;
use Lc\PietroBundle\Form\ProjectBoost\ProjectBoostType;
use Lc\PietroBundle\Form\ProjectInspiring\ProjectInspiringType;
use Lc\PietroBundle\Form\Revolt\RevoltType;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\QueryBuilder;
use EasyCorp\Bundle\EasyAdminBundle\Collection\FieldCollection;

+ 1
- 0
src/Controller/Admin/DashboardController.php Datei anzeigen

@@ -3,6 +3,7 @@
namespace App\Controller\Admin;


use App\Controller\Admin\IndividualData\IndividualDataAdminController;
use App\Entity\Block;
use App\Entity\CollectifData;
use App\Entity\Configuration;

+ 1
- 1
src/Controller/Admin/IndividualData/IndividualDataAdminController.php Datei anzeigen

@@ -2,7 +2,7 @@

namespace App\Controller\Admin\IndividualData;

use Lc\PietroBundle\Model\IndividualData\IndividualData;
use App\Entity\IndividualData;
use Lc\PietroBundle\Controller\IndividualData\IndividualDataAdminController as PietroIndividualDataAdminController;

class IndividualDataAdminController extends PietroIndividualDataAdminController

src/Controller/Admin/Subthematic/ThematicAdminController.php → src/Controller/Admin/Subthematic/SubthematicAdminController.php Datei anzeigen

@@ -5,7 +5,7 @@ namespace App\Controller\Admin\Subthematic;
use App\Entity\Subthematic;
use Lc\PietroBundle\Controller\Subthematic\SubthematicAdminController as PietroSubthematicAdminController;

class ThematicAdminController extends PietroSubthematicAdminController
class SubthematicAdminController extends PietroSubthematicAdminController
{
public static function getEntityFqcn(): string
{

+ 4
- 4
src/Form/IndividualDataForm.php Datei anzeigen

@@ -4,10 +4,10 @@ namespace App\Form;

use App\Entity\IndividualData;
use App\Entity\Territory;
use App\Type\DreamType;
use App\Type\ProjectBoostType;
use App\Type\ProjectInspiringType;
use App\Type\RevoltType;
use Lc\PietroBundle\Form\Revolt\RevoltType;
use Lc\PietroBundle\Form\Dream\DreamType;
use Lc\PietroBundle\Form\ProjectInspiring\ProjectInspiringType;
use Lc\PietroBundle\Form\ProjectBoost\ProjectBoostType;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\CollectionType;

+ 1
- 2
src/Form/SearchListForm.php Datei anzeigen

@@ -2,7 +2,6 @@

namespace App\Form;

use App\Entity\AbstractData;
use App\Entity\Territory;
use App\Entity\Thematic;
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
@@ -38,7 +37,7 @@ class SearchListForm extends AbstractType
'expanded' => true,
'multiple' => true,
'choices' => [
AbstractData::getCategory()
\Lc\PietroBundle\Model\AbstractData::getCategory()
]
])
->add('thematic', EntityType::class, [

Laden…
Abbrechen
Speichern