Selaa lähdekoodia

renoming class with 's' and SearchForm fonctionnel

v1
Charly 3 vuotta sitten
vanhempi
commit
f8e58b9516
39 muutettua tiedostoa jossa 800 lisäystä ja 11344 poistoa
  1. +0
    -149
      migrations/Version20210823141711.php
  2. +39
    -0
      migrations/Version20210824143117.php
  3. +39
    -0
      migrations/Version20210824143619.php
  4. +39
    -0
      migrations/Version20210824144406.php
  5. +39
    -0
      migrations/Version20210824144602.php
  6. +0
    -10866
      public/build/app-frontend.35f52dd6.css
  7. +16
    -16
      src/Controller/Admin/CollectifDataCrudController.php
  8. +14
    -14
      src/Controller/Admin/DashboardController.php
  9. +85
    -17
      src/Controller/Frontend/DefaultController.php
  10. +59
    -59
      src/Entity/CollectifData.php
  11. +5
    -5
      src/Entity/Dream.php
  12. +50
    -50
      src/Entity/IndividualData.php
  13. +5
    -5
      src/Entity/ProjectBoost.php
  14. +5
    -5
      src/Entity/ProjectInspiring.php
  15. +5
    -5
      src/Entity/Revolt.php
  16. +60
    -0
      src/Form/SearchListForm.php
  17. +21
    -0
      src/Repository/DreamRepository.php
  18. +13
    -0
      src/Repository/DreamRepositoryQuery.php
  19. +14
    -0
      src/Repository/DreamStore.php
  20. +0
    -50
      src/Repository/DreamsRepository.php
  21. +9
    -9
      src/Repository/ProjectBoostRepository.php
  22. +13
    -0
      src/Repository/ProjectBoostRepositoryQuery.php
  23. +14
    -0
      src/Repository/ProjectBoostStore.php
  24. +9
    -9
      src/Repository/ProjectInspiringRepository.php
  25. +13
    -0
      src/Repository/ProjectInspiringRepositoryQuery.php
  26. +14
    -0
      src/Repository/ProjectInspiringStore.php
  27. +21
    -0
      src/Repository/RevoltRepository.php
  28. +13
    -0
      src/Repository/RevoltRepositoryQuery.php
  29. +14
    -0
      src/Repository/RevoltStore.php
  30. +0
    -50
      src/Repository/RevoltsRepository.php
  31. +75
    -0
      src/Repository/SearchRepositoryQuery.php
  32. +53
    -0
      src/Repository/SearchStore.php
  33. +5
    -5
      src/Type/DreamType.php
  34. +5
    -5
      src/Type/ProjectBoostType.php
  35. +5
    -5
      src/Type/ProjectInspiringType.php
  36. +5
    -5
      src/Type/RevoltType.php
  37. +3
    -3
      templates/adminlte/dashboard.html.twig
  38. +9
    -0
      templates/frontend/carto-liste.html.twig
  39. +12
    -12
      translations/admin.fr.yaml

+ 0
- 149
migrations/Version20210823141711.php Näytä tiedosto

@@ -1,149 +0,0 @@
<?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 Version20210823141711 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 collectif_data (id INT AUTO_INCREMENT NOT NULL, user_id INT DEFAULT NULL, territory_id INT DEFAULT NULL, nb_participant INT NOT NULL, status DOUBLE PRECISION NOT NULL, INDEX IDX_F35F8503A76ED395 (user_id), INDEX IDX_F35F850373F74AD4 (territory_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE configuration (id INT AUTO_INCREMENT NOT NULL, value VARCHAR(255) 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 dreams (id INT AUTO_INCREMENT NOT NULL, individual_data_id INT DEFAULT NULL, collectif_data_id INT DEFAULT NULL, thematic_id INT DEFAULT NULL, description LONGTEXT NOT NULL, INDEX IDX_FD07CC0AE2920B1 (individual_data_id), INDEX IDX_FD07CC0AD9275BF1 (collectif_data_id), INDEX IDX_FD07CC0A2395FCED (thematic_id), 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 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 group_user (id INT AUTO_INCREMENT NOT NULL, created_by_id INT NOT NULL, updated_by_id INT NOT NULL, title VARCHAR(255) NOT NULL, dev_alias VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT 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 individual_data (id INT AUTO_INCREMENT NOT NULL, territory_id INT DEFAULT NULL, firstname VARCHAR(255) NOT NULL, lastname VARCHAR(255) NOT NULL, email VARCHAR(255) NOT NULL, intro_question VARCHAR(255) NOT NULL, intro_answer VARCHAR(255) DEFAULT NULL, status DOUBLE PRECISION NOT NULL, INDEX IDX_653169D073F74AD4 (territory_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 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_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 projects_boost (id INT AUTO_INCREMENT NOT NULL, individual_data_id INT DEFAULT NULL, collectif_data_id INT DEFAULT NULL, thematic_id INT DEFAULT NULL, description LONGTEXT NOT NULL, INDEX IDX_C3E57356E2920B1 (individual_data_id), INDEX IDX_C3E57356D9275BF1 (collectif_data_id), INDEX IDX_C3E573562395FCED (thematic_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE projects_inspiring (id INT AUTO_INCREMENT NOT NULL, individual_data_id INT DEFAULT NULL, collectif_data_id INT DEFAULT NULL, thematic_id INT DEFAULT NULL, description LONGTEXT NOT NULL, INDEX IDX_E60CAEC6E2920B1 (individual_data_id), INDEX IDX_E60CAEC6D9275BF1 (collectif_data_id), INDEX IDX_E60CAEC62395FCED (thematic_id), PRIMARY KEY(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 NOT NULL, updated_by_id INT NOT 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 revolts (id INT AUTO_INCREMENT NOT NULL, individual_data_id INT DEFAULT NULL, collectif_data_id INT DEFAULT NULL, thematic_id INT DEFAULT NULL, description LONGTEXT NOT NULL, INDEX IDX_68E7DC9FE2920B1 (individual_data_id), INDEX IDX_68E7DC9FD9275BF1 (collectif_data_id), INDEX IDX_68E7DC9F2395FCED (thematic_id), PRIMARY KEY(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 territory (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) 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 thematic (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) NOT NULL, 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 NOT NULL, updated_by_id INT NOT 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 NOT NULL, updated_by_id INT NOT 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 LONGTEXT NOT NULL COMMENT \'(DC2Type:json)\', 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, 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 collectif_data ADD CONSTRAINT FK_F35F8503A76ED395 FOREIGN KEY (user_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE collectif_data ADD CONSTRAINT FK_F35F850373F74AD4 FOREIGN KEY (territory_id) REFERENCES territory (id)');
$this->addSql('ALTER TABLE dreams ADD CONSTRAINT FK_FD07CC0AE2920B1 FOREIGN KEY (individual_data_id) REFERENCES individual_data (id)');
$this->addSql('ALTER TABLE dreams ADD CONSTRAINT FK_FD07CC0AD9275BF1 FOREIGN KEY (collectif_data_id) REFERENCES collectif_data (id)');
$this->addSql('ALTER TABLE dreams ADD CONSTRAINT FK_FD07CC0A2395FCED FOREIGN KEY (thematic_id) REFERENCES thematic (id)');
$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 individual_data ADD CONSTRAINT FK_653169D073F74AD4 FOREIGN KEY (territory_id) REFERENCES territory (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 projects_boost ADD CONSTRAINT FK_C3E57356E2920B1 FOREIGN KEY (individual_data_id) REFERENCES individual_data (id)');
$this->addSql('ALTER TABLE projects_boost ADD CONSTRAINT FK_C3E57356D9275BF1 FOREIGN KEY (collectif_data_id) REFERENCES collectif_data (id)');
$this->addSql('ALTER TABLE projects_boost ADD CONSTRAINT FK_C3E573562395FCED FOREIGN KEY (thematic_id) REFERENCES thematic (id)');
$this->addSql('ALTER TABLE projects_inspiring ADD CONSTRAINT FK_E60CAEC6E2920B1 FOREIGN KEY (individual_data_id) REFERENCES individual_data (id)');
$this->addSql('ALTER TABLE projects_inspiring ADD CONSTRAINT FK_E60CAEC6D9275BF1 FOREIGN KEY (collectif_data_id) REFERENCES collectif_data (id)');
$this->addSql('ALTER TABLE projects_inspiring ADD CONSTRAINT FK_E60CAEC62395FCED FOREIGN KEY (thematic_id) REFERENCES thematic (id)');
$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 revolts ADD CONSTRAINT FK_68E7DC9FE2920B1 FOREIGN KEY (individual_data_id) REFERENCES individual_data (id)');
$this->addSql('ALTER TABLE revolts ADD CONSTRAINT FK_68E7DC9FD9275BF1 FOREIGN KEY (collectif_data_id) REFERENCES collectif_data (id)');
$this->addSql('ALTER TABLE revolts ADD CONSTRAINT FK_68E7DC9F2395FCED FOREIGN KEY (thematic_id) REFERENCES thematic (id)');
$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 dreams DROP FOREIGN KEY FK_FD07CC0AD9275BF1');
$this->addSql('ALTER TABLE projects_boost DROP FOREIGN KEY FK_C3E57356D9275BF1');
$this->addSql('ALTER TABLE projects_inspiring DROP FOREIGN KEY FK_E60CAEC6D9275BF1');
$this->addSql('ALTER TABLE revolts DROP FOREIGN KEY FK_68E7DC9FD9275BF1');
$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 dreams DROP FOREIGN KEY FK_FD07CC0AE2920B1');
$this->addSql('ALTER TABLE projects_boost DROP FOREIGN KEY FK_C3E57356E2920B1');
$this->addSql('ALTER TABLE projects_inspiring DROP FOREIGN KEY FK_E60CAEC6E2920B1');
$this->addSql('ALTER TABLE revolts DROP FOREIGN KEY FK_68E7DC9FE2920B1');
$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 collectif_data DROP FOREIGN KEY FK_F35F850373F74AD4');
$this->addSql('ALTER TABLE individual_data DROP FOREIGN KEY FK_653169D073F74AD4');
$this->addSql('ALTER TABLE dreams DROP FOREIGN KEY FK_FD07CC0A2395FCED');
$this->addSql('ALTER TABLE projects_boost DROP FOREIGN KEY FK_C3E573562395FCED');
$this->addSql('ALTER TABLE projects_inspiring DROP FOREIGN KEY FK_E60CAEC62395FCED');
$this->addSql('ALTER TABLE revolts DROP FOREIGN KEY FK_68E7DC9F2395FCED');
$this->addSql('ALTER TABLE ticket_message DROP FOREIGN KEY FK_BA71692D700047D2');
$this->addSql('ALTER TABLE collectif_data DROP FOREIGN KEY FK_F35F8503A76ED395');
$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 collectif_data');
$this->addSql('DROP TABLE configuration');
$this->addSql('DROP TABLE dreams');
$this->addSql('DROP TABLE file');
$this->addSql('DROP TABLE group_user');
$this->addSql('DROP TABLE individual_data');
$this->addSql('DROP TABLE page');
$this->addSql('DROP TABLE page_file');
$this->addSql('DROP TABLE projects_boost');
$this->addSql('DROP TABLE projects_inspiring');
$this->addSql('DROP TABLE reminder');
$this->addSql('DROP TABLE reminder_user_interface');
$this->addSql('DROP TABLE revolts');
$this->addSql('DROP TABLE site');
$this->addSql('DROP TABLE site_setting');
$this->addSql('DROP TABLE territory');
$this->addSql('DROP TABLE thematic');
$this->addSql('DROP TABLE ticket');
$this->addSql('DROP TABLE ticket_message');
$this->addSql('DROP TABLE user');
$this->addSql('DROP TABLE user_group_user_interface');
}
}

+ 39
- 0
migrations/Version20210824143117.php Näytä tiedosto

@@ -0,0 +1,39 @@
<?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 Version20210824143117 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 dream (id INT AUTO_INCREMENT NOT NULL, individual_data_id INT DEFAULT NULL, collectif_data_id INT DEFAULT NULL, thematic_id INT DEFAULT NULL, description LONGTEXT NOT NULL, INDEX IDX_6A5F004FE2920B1 (individual_data_id), INDEX IDX_6A5F004FD9275BF1 (collectif_data_id), INDEX IDX_6A5F004F2395FCED (thematic_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE dream ADD CONSTRAINT FK_6A5F004FE2920B1 FOREIGN KEY (individual_data_id) REFERENCES individual_data (id)');
$this->addSql('ALTER TABLE dream ADD CONSTRAINT FK_6A5F004FD9275BF1 FOREIGN KEY (collectif_data_id) REFERENCES collectif_data (id)');
$this->addSql('ALTER TABLE dream ADD CONSTRAINT FK_6A5F004F2395FCED FOREIGN KEY (thematic_id) REFERENCES thematic (id)');
$this->addSql('DROP TABLE dreams');
}

public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE TABLE dreams (id INT AUTO_INCREMENT NOT NULL, individual_data_id INT DEFAULT NULL, collectif_data_id INT DEFAULT NULL, thematic_id INT DEFAULT NULL, description LONGTEXT CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, INDEX IDX_FD07CC0AE2920B1 (individual_data_id), INDEX IDX_FD07CC0AD9275BF1 (collectif_data_id), INDEX IDX_FD07CC0A2395FCED (thematic_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('ALTER TABLE dreams ADD CONSTRAINT FK_FD07CC0A2395FCED FOREIGN KEY (thematic_id) REFERENCES thematic (id)');
$this->addSql('ALTER TABLE dreams ADD CONSTRAINT FK_FD07CC0AD9275BF1 FOREIGN KEY (collectif_data_id) REFERENCES collectif_data (id)');
$this->addSql('ALTER TABLE dreams ADD CONSTRAINT FK_FD07CC0AE2920B1 FOREIGN KEY (individual_data_id) REFERENCES individual_data (id)');
$this->addSql('DROP TABLE dream');
}
}

+ 39
- 0
migrations/Version20210824143619.php Näytä tiedosto

@@ -0,0 +1,39 @@
<?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 Version20210824143619 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 project_boost (id INT AUTO_INCREMENT NOT NULL, individual_data_id INT DEFAULT NULL, collectif_data_id INT DEFAULT NULL, thematic_id INT DEFAULT NULL, description LONGTEXT NOT NULL, INDEX IDX_45312EF6E2920B1 (individual_data_id), INDEX IDX_45312EF6D9275BF1 (collectif_data_id), INDEX IDX_45312EF62395FCED (thematic_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE project_boost ADD CONSTRAINT FK_45312EF6E2920B1 FOREIGN KEY (individual_data_id) REFERENCES individual_data (id)');
$this->addSql('ALTER TABLE project_boost ADD CONSTRAINT FK_45312EF6D9275BF1 FOREIGN KEY (collectif_data_id) REFERENCES collectif_data (id)');
$this->addSql('ALTER TABLE project_boost ADD CONSTRAINT FK_45312EF62395FCED FOREIGN KEY (thematic_id) REFERENCES thematic (id)');
$this->addSql('DROP TABLE projects_boost');
}

public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE TABLE projects_boost (id INT AUTO_INCREMENT NOT NULL, individual_data_id INT DEFAULT NULL, collectif_data_id INT DEFAULT NULL, thematic_id INT DEFAULT NULL, description LONGTEXT CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, INDEX IDX_C3E57356E2920B1 (individual_data_id), INDEX IDX_C3E57356D9275BF1 (collectif_data_id), INDEX IDX_C3E573562395FCED (thematic_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('ALTER TABLE projects_boost ADD CONSTRAINT FK_C3E573562395FCED FOREIGN KEY (thematic_id) REFERENCES thematic (id)');
$this->addSql('ALTER TABLE projects_boost ADD CONSTRAINT FK_C3E57356D9275BF1 FOREIGN KEY (collectif_data_id) REFERENCES collectif_data (id)');
$this->addSql('ALTER TABLE projects_boost ADD CONSTRAINT FK_C3E57356E2920B1 FOREIGN KEY (individual_data_id) REFERENCES individual_data (id)');
$this->addSql('DROP TABLE project_boost');
}
}

+ 39
- 0
migrations/Version20210824144406.php Näytä tiedosto

@@ -0,0 +1,39 @@
<?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 Version20210824144406 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 project_inspiring (id INT AUTO_INCREMENT NOT NULL, individual_data_id INT DEFAULT NULL, collectif_data_id INT DEFAULT NULL, thematic_id INT DEFAULT NULL, description LONGTEXT NOT NULL, INDEX IDX_2E8C2C2EE2920B1 (individual_data_id), INDEX IDX_2E8C2C2ED9275BF1 (collectif_data_id), INDEX IDX_2E8C2C2E2395FCED (thematic_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE project_inspiring ADD CONSTRAINT FK_2E8C2C2EE2920B1 FOREIGN KEY (individual_data_id) REFERENCES individual_data (id)');
$this->addSql('ALTER TABLE project_inspiring ADD CONSTRAINT FK_2E8C2C2ED9275BF1 FOREIGN KEY (collectif_data_id) REFERENCES collectif_data (id)');
$this->addSql('ALTER TABLE project_inspiring ADD CONSTRAINT FK_2E8C2C2E2395FCED FOREIGN KEY (thematic_id) REFERENCES thematic (id)');
$this->addSql('DROP TABLE projects_inspiring');
}

public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE TABLE projects_inspiring (id INT AUTO_INCREMENT NOT NULL, individual_data_id INT DEFAULT NULL, collectif_data_id INT DEFAULT NULL, thematic_id INT DEFAULT NULL, description LONGTEXT CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, INDEX IDX_E60CAEC6E2920B1 (individual_data_id), INDEX IDX_E60CAEC6D9275BF1 (collectif_data_id), INDEX IDX_E60CAEC62395FCED (thematic_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('ALTER TABLE projects_inspiring ADD CONSTRAINT FK_E60CAEC62395FCED FOREIGN KEY (thematic_id) REFERENCES thematic (id)');
$this->addSql('ALTER TABLE projects_inspiring ADD CONSTRAINT FK_E60CAEC6D9275BF1 FOREIGN KEY (collectif_data_id) REFERENCES collectif_data (id)');
$this->addSql('ALTER TABLE projects_inspiring ADD CONSTRAINT FK_E60CAEC6E2920B1 FOREIGN KEY (individual_data_id) REFERENCES individual_data (id)');
$this->addSql('DROP TABLE project_inspiring');
}
}

+ 39
- 0
migrations/Version20210824144602.php Näytä tiedosto

@@ -0,0 +1,39 @@
<?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 Version20210824144602 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 revolt (id INT AUTO_INCREMENT NOT NULL, individual_data_id INT DEFAULT NULL, collectif_data_id INT DEFAULT NULL, thematic_id INT DEFAULT NULL, description LONGTEXT NOT NULL, INDEX IDX_35051787E2920B1 (individual_data_id), INDEX IDX_35051787D9275BF1 (collectif_data_id), INDEX IDX_350517872395FCED (thematic_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE revolt ADD CONSTRAINT FK_35051787E2920B1 FOREIGN KEY (individual_data_id) REFERENCES individual_data (id)');
$this->addSql('ALTER TABLE revolt ADD CONSTRAINT FK_35051787D9275BF1 FOREIGN KEY (collectif_data_id) REFERENCES collectif_data (id)');
$this->addSql('ALTER TABLE revolt ADD CONSTRAINT FK_350517872395FCED FOREIGN KEY (thematic_id) REFERENCES thematic (id)');
$this->addSql('DROP TABLE revolts');
}

public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE TABLE revolts (id INT AUTO_INCREMENT NOT NULL, individual_data_id INT DEFAULT NULL, collectif_data_id INT DEFAULT NULL, thematic_id INT DEFAULT NULL, description LONGTEXT CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, INDEX IDX_68E7DC9FE2920B1 (individual_data_id), INDEX IDX_68E7DC9FD9275BF1 (collectif_data_id), INDEX IDX_68E7DC9F2395FCED (thematic_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('ALTER TABLE revolts ADD CONSTRAINT FK_68E7DC9F2395FCED FOREIGN KEY (thematic_id) REFERENCES thematic (id)');
$this->addSql('ALTER TABLE revolts ADD CONSTRAINT FK_68E7DC9FD9275BF1 FOREIGN KEY (collectif_data_id) REFERENCES collectif_data (id)');
$this->addSql('ALTER TABLE revolts ADD CONSTRAINT FK_68E7DC9FE2920B1 FOREIGN KEY (individual_data_id) REFERENCES individual_data (id)');
$this->addSql('DROP TABLE revolt');
}
}

+ 0
- 10866
public/build/app-frontend.35f52dd6.css
File diff suppressed because it is too large
Näytä tiedosto


+ 16
- 16
src/Controller/Admin/CollectifDataCrudController.php Näytä tiedosto

@@ -4,10 +4,10 @@ namespace App\Controller\Admin;

use App\Entity\CollectifData;
use App\Entity\Configuration;
use App\Type\DreamsType;
use App\Type\ProjectsBoostType;
use App\Type\ProjectsInspiringType;
use App\Type\RevoltsType;
use App\Type\DreamType;
use App\Type\ProjectBoostType;
use App\Type\ProjectInspiringType;
use App\Type\RevoltType;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\QueryBuilder;
use EasyCorp\Bundle\EasyAdminBundle\Collection\FieldCollection;
@@ -38,31 +38,31 @@ class CollectifDataCrudController extends AbstractCrudController
$fields[] = AssociationField::new('territory')
->setTemplatePath('crud/field/association.html.twig');
$fields[] = IntegerField::new('nbParticipant');
$fields[] = TextField::new('nbDreams')
$fields[] = TextField::new('nbDream')
->onlyOnIndex();
$fields[] = TextField::new('nbRevolts')
$fields[] = TextField::new('nbRevolt')
->onlyOnIndex();
$fields[] = TextField::new('nbProjectsBoost')
$fields[] = TextField::new('nbProjectBoost')
->onlyOnIndex();
$fields[] = TextField::new('nbProjectsInspiring')
$fields[] = TextField::new('nbProjectInspiring')
->onlyOnIndex();
$fields[] = CollectionField::new('revolts')
->setFormTypeOption('entry_type', RevoltsType::class)
$fields[] = CollectionField::new('revolt')
->setFormTypeOption('entry_type', RevoltType::class)
->setFormTypeOption('by_reference', false)
->setRequired(false)
->hideOnIndex();
$fields[] = CollectionField::new('dreams')
->setFormTypeOption('entry_type', DreamsType::class)
$fields[] = CollectionField::new('dream')
->setFormTypeOption('entry_type', DreamType::class)
->setFormTypeOption('by_reference', false)
->setRequired(false)
->hideOnIndex();
$fields[] = CollectionField::new('projectsboost')
->setFormTypeOption('entry_type', ProjectsBoostType::class)
$fields[] = CollectionField::new('projectBoost')
->setFormTypeOption('entry_type', ProjectBoostType::class)
->setFormTypeOption('by_reference', false)
->setRequired(false)
->hideOnIndex();
$fields[] = CollectionField::new('projectsinspiring')
->setFormTypeOption('entry_type', ProjectsInspiringType::class)
$fields[] = CollectionField::new('projectinspiring')
->setFormTypeOption('entry_type', ProjectInspiringType::class)
->setFormTypeOption('by_reference', false)
->setRequired(false)
->hideOnIndex();

+ 14
- 14
src/Controller/Admin/DashboardController.php Näytä tiedosto

@@ -5,10 +5,10 @@ namespace App\Controller\Admin;

use App\Entity\CollectifData;
use App\Entity\Configuration;
use App\Entity\Dreams;
use App\Entity\ProjectsBoost;
use App\Entity\ProjectsInspiring;
use App\Entity\Revolts;
use App\Entity\Dream;
use App\Entity\ProjectBoost;
use App\Entity\ProjectInspiring;
use App\Entity\Revolt;
use App\Entity\Site\Page;
use App\Entity\Territory;
use App\Entity\Thematic;
@@ -36,19 +36,19 @@ class DashboardController extends SovDashboardController
public function index(): Response
{
$repoCollectifData = $this->getDoctrine()->getRepository(CollectifData::class);
$repoDreams = $this->getDoctrine()->getRepository(Dreams::class);
$repoRevolts = $this->getDoctrine()->getRepository(Revolts::class);
$repoProjectsBoost = $this->getDoctrine()->getRepository(ProjectsBoost::class);
$repoProjectsInsp = $this->getDoctrine()->getRepository(ProjectsInspiring::class);
$repoDream = $this->getDoctrine()->getRepository(Dream::class);
$repoRevolt = $this->getDoctrine()->getRepository(Revolt::class);
$repoProjectBoost = $this->getDoctrine()->getRepository(ProjectBoost::class);
$repoProjectsInsp = $this->getDoctrine()->getRepository(ProjectInspiring::class);
$repoUser = $this->getDoctrine()->getRepository(User::class);

$formUnvalid = $repoCollectifData->findByStatus(0);

$formValid = $repoCollectifData->findByStatus(1);

$dreams = $repoDreams->findAll();
$revolts = $repoRevolts->findAll();
$projectsBoost = $repoProjectsBoost->findAll();
$dream = $repoDream->findAll();
$revolt = $repoRevolt->findAll();
$projectBoost = $repoProjectBoost->findAll();
$projectsInsp = $repoProjectsInsp->findAll();

$animators = $repoUser->findByRole(self::ROLE_ANIMATOR);
@@ -57,9 +57,9 @@ class DashboardController extends SovDashboardController
[
'nbFormUnvalid' => count($formUnvalid),
'nbFormValid' => count($formValid),
'nbDreams' => count($dreams),
'nbRevolts' => count($revolts),
'nbProjectsBoost' => count($projectsBoost),
'nbDream' => count($dream),
'nbRevolt' => count($revolt),
'nbProjectBoost' => count($projectBoost),
'nbProjectsInsp' => count($projectsInsp),
'nbAnimator' => count($animators)
]);

+ 85
- 17
src/Controller/Frontend/DefaultController.php Näytä tiedosto

@@ -2,12 +2,17 @@

namespace App\Controller\Frontend;

use App\Entity\Dreams;
use App\Entity\ProjectsBoost;
use App\Entity\ProjectsInspiring;
use App\Entity\Revolts;
use App\Entity\Dream;
use App\Entity\ProjectBoost;
use App\Entity\ProjectInspiring;
use App\Entity\Revolt;
use App\Form\ContactForm;
use App\Form\IndividualForm;
use App\Form\SearchListForm;
use App\Repository\DreamStore;
use App\Repository\ProjectBoostStore;
use App\Repository\ProjectInspiringStore;
use App\Repository\RevoltStore;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\JsonResponse;
@@ -20,10 +25,23 @@ use Symfony\Component\HttpFoundation\Request;
class DefaultController extends AbstractController
{
protected $em;

public function __construct(EntityManagerInterface $em)
{
protected DreamStore $dreamStore;
protected RevoltStore $revoltStore;
protected ProjectBoostStore $projectBoostStore;
protected ProjectInspiringStore $projectInspiringStore;

public function __construct(
EntityManagerInterface $em,
DreamStore $dreamStore,
RevoltStore $revoltStore,
ProjectBoostStore $projectBoostStore,
ProjectInspiringStore $projectInspiringStore
) {
$this->em = $em;
$this->dreamStore = $dreamStore;
$this->revoltStore = $revoltStore;
$this->projectBoostStore = $projectBoostStore;
$this->projectInspiringStore = $projectInspiringStore;
}

public function home()
@@ -41,11 +59,61 @@ class DefaultController extends AbstractController
);
}

public function cartoListe()
public function cartoListe(Request $request)
{
$form = $this->createForm(SearchListForm::class);
$form->handleRequest($request);

if ($form->isSubmitted() && $form->isValid()) {
$data = $form->getData();
$description = $data['search'];
$categoryArray = $data['category'];
$territoryArray = $data['territory'];
$thematicArray = $data['thematic'];
dump($data);
$dreamArray = $revoltArray = $projectBoostArray = $projectInspiringArray = array();

if (in_array('dream', $categoryArray)) {
$dreamArray = $this->dreamStore->filterSearch($description, $territoryArray, $thematicArray);
dump('DREAMS');
dump($dreamArray);
}
if (in_array('revolt', $categoryArray)) {
$revoltArray = $this->revoltStore->filterSearch($description, $territoryArray, $thematicArray);
dump('REVOLT');
dump($revoltArray);
}
if (in_array('projectBoost', $categoryArray)) {
$projectBoostArray = $this->projectBoostStore->filterSearch($description, $territoryArray, $thematicArray);
dump('PROJECTBOOST');
dump($projectBoostArray);
}
if (in_array('projectInspiring', $categoryArray)) {
$projectInspiringArray = $this->projectInspiringStore->filterSearch($description, $territoryArray, $thematicArray);
dump('PROJECTINSP');
dump($projectInspiringArray);
}

$resultArray = array_merge($dreamArray, $revoltArray, $projectBoostArray, $projectInspiringArray);
dump('RESULT');
dump($resultArray);

// foreach ($dreamArray as $dream) {
// if($dream->getCollectifData()){
// dump($dream->getCollectifData()->getTerritory()->getName());
// }
// if($dream->getIndividualData()){
// dump($dream->getIndividualData()->getTerritory()->getName());
// }
// }
die;
// return $this->redirectToRoute('task_success');
}

return $this->render(
'frontend/carto-liste.html.twig',
[
'form' => $form->createView(),
'nbContrib' => $this->countContrib()
]
);
@@ -140,17 +208,17 @@ class DefaultController extends AbstractController

private function countContrib(): int
{
$dreamRepository = $this->em->getRepository(Dreams::class);
$revoltRepository = $this->em->getRepository(Revolts::class);
$projectsBoostRepository = $this->em->getRepository(ProjectsBoost::class);
$projectsInspiringRepository = $this->em->getRepository(ProjectsInspiring::class);
$dreamRepository = $this->em->getRepository(Dream::class);
$revoltRepository = $this->em->getRepository(Revolt::class);
$projectBoostRepository = $this->em->getRepository(ProjectBoost::class);
$projectInspiringRepository = $this->em->getRepository(ProjectInspiring::class);

$dreams = count($dreamRepository->findAll());
$revolts = count($revoltRepository->findAll());
$projectsBoost = count($projectsBoostRepository->findAll());
$projectsInspiring = count($projectsBoostRepository->findAll());
$dream = count($dreamRepository->findAll());
$revolt = count($revoltRepository->findAll());
$projectBoost = count($projectBoostRepository->findAll());
$projectInspiring = count($projectBoostRepository->findAll());

$nbContrib = $dreams + $revolts + $projectsBoost + $projectsInspiring;
$nbContrib = $dream + $revolt + $projectBoost + $projectInspiring;

return $nbContrib;
}

+ 59
- 59
src/Entity/CollectifData.php Näytä tiedosto

@@ -36,24 +36,24 @@ class CollectifData implements StatusInterface, EntityInterface
private $user;

/**
* @ORM\OneToMany(targetEntity=Revolts::class, mappedBy="collectifData", cascade={"persist", "remove"})
* @ORM\OneToMany(targetEntity=Revolt::class, mappedBy="collectifData", cascade={"persist", "remove"})
*/
private $revolts;
private $revolt;

/**
* @ORM\OneToMany(targetEntity=Dreams::class, mappedBy="collectifData", cascade={"persist", "remove"})
* @ORM\OneToMany(targetEntity=Dream::class, mappedBy="collectifData", cascade={"persist", "remove"})
*/
private $dreams;
private $dream;

/**
* @ORM\OneToMany(targetEntity=ProjectsBoost::class, mappedBy="collectifData", cascade={"persist", "remove"})
* @ORM\OneToMany(targetEntity=ProjectBoost::class, mappedBy="collectifData", cascade={"persist", "remove"})
*/
private $projectsBoost;
private $projectBoost;

/**
* @ORM\OneToMany(targetEntity=ProjectsInspiring::class, mappedBy="collectifData", cascade={"persist", "remove"})
* @ORM\OneToMany(targetEntity=ProjectInspiring::class, mappedBy="collectifData", cascade={"persist", "remove"})
*/
private $projectsInspiring;
private $projectInspiring;

/**
* @ORM\ManyToOne(targetEntity=Territory::class, inversedBy="collectifData")
@@ -62,10 +62,10 @@ class CollectifData implements StatusInterface, EntityInterface

public function __construct()
{
$this->revolts = new ArrayCollection();
$this->dreams = new ArrayCollection();
$this->projectsBoost = new ArrayCollection();
$this->projectsInspiring = new ArrayCollection();
$this->revolt = new ArrayCollection();
$this->dream = new ArrayCollection();
$this->projectBoost = new ArrayCollection();
$this->projectInspiring = new ArrayCollection();
}

public function __toString()
@@ -75,27 +75,27 @@ class CollectifData implements StatusInterface, EntityInterface

public function getResume()
{
return count($this->getRevolts()) . " révolte(s) - " . count($this->getDreams()) . " rêve(s) - " . count($this->getProjectsBoost()) . " projet(s) boosté(s) - " . count($this->getProjectsInspiring()) . " projets inspirants";
return count($this->getRevolt()) . " révolte(s) - " . count($this->getDream()) . " rêve(s) - " . count($this->getProjectBoost()) . " projet(s) boosté(s) - " . count($this->getProjectInspiring()) . " projets inspirants";
}

public function getNbDreams():string
public function getNbDream():string
{
return count($this->getDreams());
return count($this->getDream());
}

public function getNbRevolts():string
public function getNbRevolt():string
{
return count($this->getRevolts());
return count($this->getRevolt());
}

public function getNbProjectsBoost():string
public function getNbProjectBoost():string
{
return count($this->getProjectsBoost());
return count($this->getProjectBoost());
}

public function getNbProjectsInspiring():string
public function getNbProjectInspiring():string
{
return count($this->getProjectsInspiring());
return count($this->getProjectInspiring());
}

public function getId(): ?int
@@ -128,26 +128,26 @@ class CollectifData implements StatusInterface, EntityInterface
}

/**
* @return Collection|Revolts[]
* @return Collection|Revolt[]
*/
public function getRevolts(): Collection
public function getRevolt(): Collection
{
return $this->revolts;
return $this->revolt;
}

public function addRevolt(Revolts $revolt): self
public function addRevolt(Revolt $revolt): self
{
if (!$this->revolts->contains($revolt)) {
$this->revolts[] = $revolt;
if (!$this->revolt->contains($revolt)) {
$this->revolt[] = $revolt;
$revolt->setCollectifData($this);
}

return $this;
}

public function removeRevolt(Revolts $revolt): self
public function removeRevolt(Revolt $revolt): self
{
if ($this->revolts->removeElement($revolt)) {
if ($this->revolt->removeElement($revolt)) {
// set the owning side to null (unless already changed)
if ($revolt->getCollectifData() === $this) {
$revolt->setCollectifData(null);
@@ -158,26 +158,26 @@ class CollectifData implements StatusInterface, EntityInterface
}

/**
* @return Collection|Dreams[]
* @return Collection|Dream[]
*/
public function getDreams(): Collection
public function getDream(): Collection
{
return $this->dreams;
return $this->dream;
}

public function addDream(Dreams $dream): self
public function addDream(Dream $dream): self
{
if (!$this->dreams->contains($dream)) {
$this->dreams[] = $dream;
if (!$this->dream->contains($dream)) {
$this->dream[] = $dream;
$dream->setCollectifData($this);
}

return $this;
}

public function removeDream(Dreams $dream): self
public function removeDream(Dream $dream): self
{
if ($this->dreams->removeElement($dream)) {
if ($this->dream->removeElement($dream)) {
// set the owning side to null (unless already changed)
if ($dream->getCollectifData() === $this) {
$dream->setCollectifData(null);
@@ -188,29 +188,29 @@ class CollectifData implements StatusInterface, EntityInterface
}

/**
* @return Collection|ProjectsBoost[]
* @return Collection|ProjectBoost[]
*/
public function getProjectsBoost(): Collection
public function getProjectBoost(): Collection
{
return $this->projectsBoost;
return $this->projectBoost;
}

public function addProjectsBoost(ProjectsBoost $projectsBoost): self
public function addProjectBoost(ProjectBoost $projectBoost): self
{
if (!$this->projectsBoost->contains($projectsBoost)) {
$this->projectsBoost[] = $projectsBoost;
$projectsBoost->setCollectifData($this);
if (!$this->projectBoost->contains($projectBoost)) {
$this->projectBoost[] = $projectBoost;
$projectBoost->setCollectifData($this);
}

return $this;
}

public function removeProjectsBoost(ProjectsBoost $projectsBoost): self
public function removeProjectBoost(ProjectBoost $projectBoost): self
{
if ($this->projectsBoost->removeElement($projectsBoost)) {
if ($this->projectBoost->removeElement($projectBoost)) {
// set the owning side to null (unless already changed)
if ($projectsBoost->getCollectifData() === $this) {
$projectsBoost->setCollectifData(null);
if ($projectBoost->getCollectifData() === $this) {
$projectBoost->setCollectifData(null);
}
}

@@ -218,29 +218,29 @@ class CollectifData implements StatusInterface, EntityInterface
}

/**
* @return Collection|ProjectsInspiring[]
* @return Collection|ProjectInspiring[]
*/
public function getProjectsInspiring(): Collection
public function getProjectInspiring(): Collection
{
return $this->projectsInspiring;
return $this->projectInspiring;
}

public function addProjectsInspiring(ProjectsInspiring $projectsInspiring): self
public function addProjectInspiring(ProjectInspiring $projectInspiring): self
{
if (!$this->projectsInspiring->contains($projectsInspiring)) {
$this->projectsInspiring[] = $projectsInspiring;
$projectsInspiring->setCollectifData($this);
if (!$this->projectInspiring->contains($projectInspiring)) {
$this->projectInspiring[] = $projectInspiring;
$projectInspiring->setCollectifData($this);
}

return $this;
}

public function removeProjectsInspiring(ProjectsInspiring $projectsInspiring): self
public function removeProjectInspiring(ProjectInspiring $projectInspiring): self
{
if ($this->projectsInspiring->removeElement($projectsInspiring)) {
if ($this->projectInspiring->removeElement($projectInspiring)) {
// set the owning side to null (unless already changed)
if ($projectsInspiring->getCollectifData() === $this) {
$projectsInspiring->setCollectifData(null);
if ($projectInspiring->getCollectifData() === $this) {
$projectInspiring->setCollectifData(null);
}
}


src/Entity/Revolts.php → src/Entity/Dream.php Näytä tiedosto

@@ -2,16 +2,16 @@

namespace App\Entity;

use App\Repository\RevoltsRepository;
use App\Repository\DreamRepository;
use Doctrine\ORM\Mapping as ORM;
use App\Doctrine\Extension\DescriptionProjectInterface;
use App\Doctrine\Extension\DescriptionProjectTrait;
use Lc\SovBundle\Doctrine\EntityInterface;

/**
* @ORM\Entity(repositoryClass=RevoltsRepository::class)
* @ORM\Entity(repositoryClass=DreamRepository::class)
*/
class Revolts implements DescriptionProjectInterface, EntityInterface
class Dream implements DescriptionProjectInterface, EntityInterface
{
use DescriptionProjectTrait;

@@ -23,12 +23,12 @@ class Revolts implements DescriptionProjectInterface, EntityInterface
private $id;

/**
* @ORM\ManyToOne(targetEntity=IndividualData::class, inversedBy="revolts")
* @ORM\ManyToOne(targetEntity=IndividualData::class, inversedBy="dream")
*/
private $individualData;

/**
* @ORM\ManyToOne(targetEntity=CollectifData::class, inversedBy="revolts")
* @ORM\ManyToOne(targetEntity=CollectifData::class, inversedBy="dream")
*/
private $collectifData;


+ 50
- 50
src/Entity/IndividualData.php Näytä tiedosto

@@ -50,24 +50,24 @@ class IndividualData implements StatusInterface, EntityInterface
private $introAnswer;

/**
* @ORM\OneToMany(targetEntity=Revolts::class, mappedBy="individualData")
* @ORM\OneToMany(targetEntity=Revolt::class, mappedBy="individualData")
*/
private $revolts;
private $revolt;

/**
* @ORM\OneToMany(targetEntity=Dreams::class, mappedBy="individualData")
* @ORM\OneToMany(targetEntity=Dream::class, mappedBy="individualData")
*/
private $dreams;
private $dream;

/**
* @ORM\OneToMany(targetEntity=ProjectsBoost::class, mappedBy="individualData")
* @ORM\OneToMany(targetEntity=ProjectBoost::class, mappedBy="individualData")
*/
private $projectsBoost;
private $projectBoost;

/**
* @ORM\OneToMany(targetEntity=ProjectsInspiring::class, mappedBy="individualData")
* @ORM\OneToMany(targetEntity=ProjectInspiring::class, mappedBy="individualData")
*/
private $projectsInspiring;
private $projectInspiring;

/**
* @ORM\ManyToOne(targetEntity=Territory::class, inversedBy="individualData")
@@ -76,10 +76,10 @@ class IndividualData implements StatusInterface, EntityInterface

public function __construct()
{
$this->revolts = new ArrayCollection();
$this->dreams = new ArrayCollection();
$this->projectsBoost = new ArrayCollection();
$this->projectsInspiring = new ArrayCollection();
$this->revolt = new ArrayCollection();
$this->dream = new ArrayCollection();
$this->projectBoost = new ArrayCollection();
$this->projectInspiring = new ArrayCollection();
}

public function __toString()
@@ -153,26 +153,26 @@ class IndividualData implements StatusInterface, EntityInterface
}

/**
* @return Collection|Revolts[]
* @return Collection|Revolt[]
*/
public function getRevolts(): Collection
public function getRevolt(): Collection
{
return $this->revolts;
return $this->revolt;
}

public function addRevolt(Revolts $revolt): self
public function addRevolt(Revolt $revolt): self
{
if (!$this->revolts->contains($revolt)) {
$this->revolts[] = $revolt;
if (!$this->revolt->contains($revolt)) {
$this->revolt[] = $revolt;
$revolt->setIndividualData($this);
}

return $this;
}

public function removeRevolt(Revolts $revolt): self
public function removeRevolt(Revolt $revolt): self
{
if ($this->revolts->removeElement($revolt)) {
if ($this->revolt->removeElement($revolt)) {
// set the owning side to null (unless already changed)
if ($revolt->getIndividualData() === $this) {
$revolt->setIndividualData(null);
@@ -183,26 +183,26 @@ class IndividualData implements StatusInterface, EntityInterface
}

/**
* @return Collection|Dreams[]
* @return Collection|Dream[]
*/
public function getDreams(): Collection
public function getDream(): Collection
{
return $this->dreams;
return $this->dream;
}

public function addDream(Dreams $dream): self
public function addDream(Dream $dream): self
{
if (!$this->dreams->contains($dream)) {
$this->dreams[] = $dream;
if (!$this->dream->contains($dream)) {
$this->dream[] = $dream;
$dream->setIndividualData($this);
}

return $this;
}

public function removeDream(Dreams $dream): self
public function removeDream(Dream $dream): self
{
if ($this->dreams->removeElement($dream)) {
if ($this->dream->removeElement($dream)) {
// set the owning side to null (unless already changed)
if ($dream->getIndividualData() === $this) {
$dream->setIndividualData(null);
@@ -213,29 +213,29 @@ class IndividualData implements StatusInterface, EntityInterface
}

/**
* @return Collection|ProjectsBoost[]
* @return Collection|ProjectBoost[]
*/
public function getProjectsBoost(): Collection
public function getProjectBoost(): Collection
{
return $this->projectsBoost;
return $this->projectBoost;
}

public function addProjectsBoost(ProjectsBoost $projectsBoost): self
public function addProjectBoost(ProjectBoost $projectBoost): self
{
if (!$this->projectsBoost->contains($projectsBoost)) {
$this->projectsBoost[] = $projectsBoost;
$projectsBoost->setIndividualData($this);
if (!$this->projectBoost->contains($projectBoost)) {
$this->projectBoost[] = $projectBoost;
$projectBoost->setIndividualData($this);
}

return $this;
}

public function removeProjectsBoost(ProjectsBoost $projectsBoost): self
public function removeProjectBoost(ProjectBoost $projectBoost): self
{
if ($this->projectsBoost->removeElement($projectsBoost)) {
if ($this->projectBoost->removeElement($projectBoost)) {
// set the owning side to null (unless already changed)
if ($projectsBoost->getIndividualData() === $this) {
$projectsBoost->setIndividualData(null);
if ($projectBoost->getIndividualData() === $this) {
$projectBoost->setIndividualData(null);
}
}

@@ -243,29 +243,29 @@ class IndividualData implements StatusInterface, EntityInterface
}

/**
* @return Collection|ProjectsInspiring[]
* @return Collection|ProjectInspiring[]
*/
public function getProjectsInspiring(): Collection
public function getProjectInspiring(): Collection
{
return $this->projectsInspiring;
return $this->projectInspiring;
}

public function addProjectsInspiring(ProjectsInspiring $projectsInspiring): self
public function addProjectInspiring(ProjectInspiring $projectInspiring): self
{
if (!$this->projectsInspiring->contains($projectsInspiring)) {
$this->projectsInspiring[] = $projectsInspiring;
$projectsInspiring->setIndividualData($this);
if (!$this->projectInspiring->contains($projectInspiring)) {
$this->projectInspiring[] = $projectInspiring;
$projectInspiring->setIndividualData($this);
}

return $this;
}

public function removeProjectsInspiring(ProjectsInspiring $projectsInspiring): self
public function removeProjectInspiring(ProjectInspiring $projectInspiring): self
{
if ($this->projectsInspiring->removeElement($projectsInspiring)) {
if ($this->projectInspiring->removeElement($projectInspiring)) {
// set the owning side to null (unless already changed)
if ($projectsInspiring->getIndividualData() === $this) {
$projectsInspiring->setIndividualData(null);
if ($projectInspiring->getIndividualData() === $this) {
$projectInspiring->setIndividualData(null);
}
}


src/Entity/ProjectsBoost.php → src/Entity/ProjectBoost.php Näytä tiedosto

@@ -2,16 +2,16 @@

namespace App\Entity;

use App\Repository\ProjectsBoostRepository;
use App\Repository\ProjectBoostRepository;
use Doctrine\ORM\Mapping as ORM;
use App\Doctrine\Extension\DescriptionProjectInterface;
use App\Doctrine\Extension\DescriptionProjectTrait;
use Lc\SovBundle\Doctrine\EntityInterface;

/**
* @ORM\Entity(repositoryClass=ProjectsBoostRepository::class)
* @ORM\Entity(repositoryClass=ProjectBoostRepository::class)
*/
class ProjectsBoost implements DescriptionProjectInterface, EntityInterface
class ProjectBoost implements DescriptionProjectInterface, EntityInterface
{
use DescriptionProjectTrait;

@@ -23,12 +23,12 @@ class ProjectsBoost implements DescriptionProjectInterface, EntityInterface
private $id;

/**
* @ORM\ManyToOne(targetEntity=IndividualData::class, inversedBy="projectsBoost")
* @ORM\ManyToOne(targetEntity=IndividualData::class, inversedBy="projectBoost")
*/
private $individualData;

/**
* @ORM\ManyToOne(targetEntity=CollectifData::class, inversedBy="projectsBoost")
* @ORM\ManyToOne(targetEntity=CollectifData::class, inversedBy="projectBoost")
*/
private $collectifData;


src/Entity/ProjectsInspiring.php → src/Entity/ProjectInspiring.php Näytä tiedosto

@@ -2,16 +2,16 @@

namespace App\Entity;

use App\Repository\ProjectsInspiringRepository;
use App\Repository\ProjectInspiringRepository;
use Doctrine\ORM\Mapping as ORM;
use App\Doctrine\Extension\DescriptionProjectInterface;
use App\Doctrine\Extension\DescriptionProjectTrait;
use Lc\SovBundle\Doctrine\EntityInterface;

/**
* @ORM\Entity(repositoryClass=ProjectsInspiringRepository::class)
* @ORM\Entity(repositoryClass=ProjectInspiringRepository::class)
*/
class ProjectsInspiring implements DescriptionProjectInterface, EntityInterface
class ProjectInspiring implements DescriptionProjectInterface, EntityInterface
{
use DescriptionProjectTrait;

@@ -23,12 +23,12 @@ class ProjectsInspiring implements DescriptionProjectInterface, EntityInterface
private $id;

/**
* @ORM\ManyToOne(targetEntity=IndividualData::class, inversedBy="projectsInspiring")
* @ORM\ManyToOne(targetEntity=IndividualData::class, inversedBy="projectInspiring")
*/
private $individualData;

/**
* @ORM\ManyToOne(targetEntity=CollectifData::class, inversedBy="projectsInspiring")
* @ORM\ManyToOne(targetEntity=CollectifData::class, inversedBy="projectInspiring")
*/
private $collectifData;


src/Entity/Dreams.php → src/Entity/Revolt.php Näytä tiedosto

@@ -2,16 +2,16 @@

namespace App\Entity;

use App\Repository\DreamsRepository;
use App\Repository\RevoltRepository;
use Doctrine\ORM\Mapping as ORM;
use App\Doctrine\Extension\DescriptionProjectInterface;
use App\Doctrine\Extension\DescriptionProjectTrait;
use Lc\SovBundle\Doctrine\EntityInterface;

/**
* @ORM\Entity(repositoryClass=DreamsRepository::class)
* @ORM\Entity(repositoryClass=RevoltRepository::class)
*/
class Dreams implements DescriptionProjectInterface, EntityInterface
class Revolt implements DescriptionProjectInterface, EntityInterface
{
use DescriptionProjectTrait;

@@ -23,12 +23,12 @@ class Dreams implements DescriptionProjectInterface, EntityInterface
private $id;

/**
* @ORM\ManyToOne(targetEntity=IndividualData::class, inversedBy="dreams")
* @ORM\ManyToOne(targetEntity=IndividualData::class, inversedBy="revolt")
*/
private $individualData;

/**
* @ORM\ManyToOne(targetEntity=CollectifData::class, inversedBy="dreams")
* @ORM\ManyToOne(targetEntity=CollectifData::class, inversedBy="revolt")
*/
private $collectifData;


+ 60
- 0
src/Form/SearchListForm.php Näytä tiedosto

@@ -0,0 +1,60 @@
<?php

namespace App\Form;

use App\Entity\Territory;
use App\Entity\Thematic;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;

class SearchListForm extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('search', TextType::class, [
'required' => false,
'attr' => [
'placeholder' => 'Saisir des critères par mots clés'
],
])
->add('territory', EntityType::class, [
'label' => 'Lieux',
'class' => Territory::class,
'expanded' => true,
'multiple' => true,
])
->add('category', ChoiceType::class, [
'label' => 'Catégorie',
'expanded' => true,
'multiple' => true,
'choices' => [
'Nos révoltes' => 'revolt',
'Nos rêves' => 'dream',
'Les actions à booster' => 'projectBoost',
'Les actions inspirantes' => 'projectInspiring'
]
])
->add('thematic', EntityType::class, [
'label' => 'Thématique',
'class' => Thematic::class,
'expanded' => true,
'multiple' => true,
])
->add('search_button', SubmitType::class, [
'attr' => ['class' => 'search'],
]);
}

public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefaults([
// Configure your form options here
]);
}
}

+ 21
- 0
src/Repository/DreamRepository.php Näytä tiedosto

@@ -0,0 +1,21 @@
<?php

namespace App\Repository;

use App\Entity\Dream;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;

/**
* @method Dream|null find($id, $lockMode = null, $lockVersion = null)
* @method Dream|null findOneBy(array $criteria, array $orderBy = null)
* @method Dream[] findAll()
* @method Dream[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
*/
class DreamRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, Dream::class);
}
}

+ 13
- 0
src/Repository/DreamRepositoryQuery.php Näytä tiedosto

@@ -0,0 +1,13 @@
<?php

namespace App\Repository;

use Knp\Component\Pager\PaginatorInterface;

class DreamRepositoryQuery extends SearchRepositoryQuery
{
public function __construct(DreamRepository $repository, PaginatorInterface $paginator)
{
parent::__construct($repository, $paginator);
}
}

+ 14
- 0
src/Repository/DreamStore.php Näytä tiedosto

@@ -0,0 +1,14 @@
<?php

namespace App\Repository;


class DreamStore extends SearchStore
{
protected $query;

public function __construct(DreamRepositoryQuery $query)
{
$this->query = $query;
}
}

+ 0
- 50
src/Repository/DreamsRepository.php Näytä tiedosto

@@ -1,50 +0,0 @@
<?php

namespace App\Repository;

use App\Entity\Dreams;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;

/**
* @method Dreams|null find($id, $lockMode = null, $lockVersion = null)
* @method Dreams|null findOneBy(array $criteria, array $orderBy = null)
* @method Dreams[] findAll()
* @method Dreams[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
*/
class DreamsRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, Dreams::class);
}

// /**
// * @return Dreams[] Returns an array of Dreams objects
// */
/*
public function findByExampleField($value)
{
return $this->createQueryBuilder('d')
->andWhere('d.exampleField = :val')
->setParameter('val', $value)
->orderBy('d.id', 'ASC')
->setMaxResults(10)
->getQuery()
->getResult()
;
}
*/

/*
public function findOneBySomeField($value): ?Dreams
{
return $this->createQueryBuilder('d')
->andWhere('d.exampleField = :val')
->setParameter('val', $value)
->getQuery()
->getOneOrNullResult()
;
}
*/
}

src/Repository/ProjectsBoostRepository.php → src/Repository/ProjectBoostRepository.php Näytä tiedosto

@@ -2,25 +2,25 @@

namespace App\Repository;

use App\Entity\ProjectsBoost;
use App\Entity\ProjectBoost;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;

/**
* @method ProjectsBoost|null find($id, $lockMode = null, $lockVersion = null)
* @method ProjectsBoost|null findOneBy(array $criteria, array $orderBy = null)
* @method ProjectsBoost[] findAll()
* @method ProjectsBoost[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
* @method ProjectBoost|null find($id, $lockMode = null, $lockVersion = null)
* @method ProjectBoost|null findOneBy(array $criteria, array $orderBy = null)
* @method ProjectBoost[] findAll()
* @method ProjectBoost[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
*/
class ProjectsBoostRepository extends ServiceEntityRepository
class ProjectBoostRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, ProjectsBoost::class);
parent::__construct($registry, ProjectBoost::class);
}

// /**
// * @return ProjectsBoost[] Returns an array of ProjectsBoost objects
// * @return ProjectBoost[] Returns an array of ProjectBoost objects
// */
/*
public function findByExampleField($value)
@@ -37,7 +37,7 @@ class ProjectsBoostRepository extends ServiceEntityRepository
*/

/*
public function findOneBySomeField($value): ?ProjectsBoost
public function findOneBySomeField($value): ?ProjectBoost
{
return $this->createQueryBuilder('p')
->andWhere('p.exampleField = :val')

+ 13
- 0
src/Repository/ProjectBoostRepositoryQuery.php Näytä tiedosto

@@ -0,0 +1,13 @@
<?php

namespace App\Repository;

use Knp\Component\Pager\PaginatorInterface;

class ProjectBoostRepositoryQuery extends SearchRepositoryQuery
{
public function __construct(ProjectBoostRepository $repository, PaginatorInterface $paginator)
{
parent::__construct($repository, $paginator);
}
}

+ 14
- 0
src/Repository/ProjectBoostStore.php Näytä tiedosto

@@ -0,0 +1,14 @@
<?php

namespace App\Repository;


class ProjectBoostStore extends SearchStore
{
protected $query;

public function __construct(ProjectBoostRepositoryQuery $query)
{
$this->query = $query;
}
}

src/Repository/ProjectsInspiringRepository.php → src/Repository/ProjectInspiringRepository.php Näytä tiedosto

@@ -2,25 +2,25 @@

namespace App\Repository;

use App\Entity\ProjectsInspiring;
use App\Entity\ProjectInspiring;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;

/**
* @method ProjectsInspiring|null find($id, $lockMode = null, $lockVersion = null)
* @method ProjectsInspiring|null findOneBy(array $criteria, array $orderBy = null)
* @method ProjectsInspiring[] findAll()
* @method ProjectsInspiring[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
* @method ProjectInspiring|null find($id, $lockMode = null, $lockVersion = null)
* @method ProjectInspiring|null findOneBy(array $criteria, array $orderBy = null)
* @method ProjectInspiring[] findAll()
* @method ProjectInspiring[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
*/
class ProjectsInspiringRepository extends ServiceEntityRepository
class ProjectInspiringRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, ProjectsInspiring::class);
parent::__construct($registry, ProjectInspiring::class);
}

// /**
// * @return ProjectsInspiring[] Returns an array of ProjectsInspiring objects
// * @return ProjectInspiring[] Returns an array of ProjectInspiring objects
// */
/*
public function findByExampleField($value)
@@ -37,7 +37,7 @@ class ProjectsInspiringRepository extends ServiceEntityRepository
*/

/*
public function findOneBySomeField($value): ?ProjectsInspiring
public function findOneBySomeField($value): ?ProjectInspiring
{
return $this->createQueryBuilder('p')
->andWhere('p.exampleField = :val')

+ 13
- 0
src/Repository/ProjectInspiringRepositoryQuery.php Näytä tiedosto

@@ -0,0 +1,13 @@
<?php

namespace App\Repository;

use Knp\Component\Pager\PaginatorInterface;

class ProjectInspiringRepositoryQuery extends SearchRepositoryQuery
{
public function __construct(ProjectInspiringRepository $repository, PaginatorInterface $paginator)
{
parent::__construct($repository, $paginator);
}
}

+ 14
- 0
src/Repository/ProjectInspiringStore.php Näytä tiedosto

@@ -0,0 +1,14 @@
<?php

namespace App\Repository;


class ProjectInspiringStore extends SearchStore
{
protected $query;

public function __construct(ProjectInspiringRepositoryQuery $query)
{
$this->query = $query;
}
}

+ 21
- 0
src/Repository/RevoltRepository.php Näytä tiedosto

@@ -0,0 +1,21 @@
<?php

namespace App\Repository;

use App\Entity\Revolt;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;

/**
* @method Revolt|null find($id, $lockMode = null, $lockVersion = null)
* @method Revolt|null findOneBy(array $criteria, array $orderBy = null)
* @method Revolt[] findAll()
* @method Revolt[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
*/
class RevoltRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, Revolt::class);
}
}

+ 13
- 0
src/Repository/RevoltRepositoryQuery.php Näytä tiedosto

@@ -0,0 +1,13 @@
<?php

namespace App\Repository;

use Knp\Component\Pager\PaginatorInterface;

class RevoltRepositoryQuery extends SearchRepositoryQuery
{
public function __construct(RevoltRepository $repository, PaginatorInterface $paginator)
{
parent::__construct($repository, $paginator);
}
}

+ 14
- 0
src/Repository/RevoltStore.php Näytä tiedosto

@@ -0,0 +1,14 @@
<?php

namespace App\Repository;


class RevoltStore extends SearchStore
{
protected $query;

public function __construct(RevoltRepositoryQuery $query)
{
$this->query = $query;
}
}

+ 0
- 50
src/Repository/RevoltsRepository.php Näytä tiedosto

@@ -1,50 +0,0 @@
<?php

namespace App\Repository;

use App\Entity\Revolts;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;

/**
* @method Revolts|null find($id, $lockMode = null, $lockVersion = null)
* @method Revolts|null findOneBy(array $criteria, array $orderBy = null)
* @method Revolts[] findAll()
* @method Revolts[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
*/
class RevoltsRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, Revolts::class);
}

// /**
// * @return Revolts[] Returns an array of Revolts objects
// */
/*
public function findByExampleField($value)
{
return $this->createQueryBuilder('r')
->andWhere('r.exampleField = :val')
->setParameter('val', $value)
->orderBy('r.id', 'ASC')
->setMaxResults(10)
->getQuery()
->getResult()
;
}
*/

/*
public function findOneBySomeField($value): ?Revolts
{
return $this->createQueryBuilder('r')
->andWhere('r.exampleField = :val')
->setParameter('val', $value)
->getQuery()
->getOneOrNullResult()
;
}
*/
}

+ 75
- 0
src/Repository/SearchRepositoryQuery.php Näytä tiedosto

@@ -0,0 +1,75 @@
<?php

namespace App\Repository;

use Doctrine\Common\Collections\ArrayCollection;
use Gedmo\Tree\RepositoryInterface;
use Knp\Component\Pager\PaginatorInterface;
use Lc\SovBundle\Repository\AbstractRepositoryQuery;
use Lc\SovBundle\Repository\RepositoryQueryInterface;

class SearchRepositoryQuery extends AbstractRepositoryQuery implements RepositoryQueryInterface
{
protected $isJoinCollectifData = false;
protected $isJoinIndividualData = false;

public function __construct($repository, PaginatorInterface $paginator)
{
parent::__construct($repository, 'r', $paginator);
}

public function filterIsValid()
{
$this->joinCollectifData();
$this->joinIndividualData();

return $this
->andWhere('colData.status = 1 OR indivData.status = 1');
}

public function filterByThematic(ArrayCollection $thematicArray): self
{
return $this
->andWhere('.thematic IN (:thematic)')
->setParameter(':thematic', $thematicArray);
}

public function filterByDescription(string $description): self
{
return $this
->andWhere('.description LIKE :description')
->setParameter(':description', '%' . $description . '%');
}

public function filterByTerritory(ArrayCollection $territoryArray): self
{
$this->joinCollectifData();
$this->joinIndividualData();

return $this
->andWhere('colData.territory IN (:territory) OR indivData.territory IN (:territory)')
->setParameter(':territory', $territoryArray);
}

public function joinCollectifData(): self
{
if (!$this->isJoinCollectifData) {
$this->isJoinCollectifData = true;

return $this
->leftJoin('.collectifData', 'colData');
}
return $this;
}

public function joinIndividualData(): self
{
if (!$this->isJoinIndividualData) {
$this->isJoinIndividualData = true;

return $this
->leftJoin('.individualData', 'indivData');
}
return $this;
}
}

+ 53
- 0
src/Repository/SearchStore.php Näytä tiedosto

@@ -0,0 +1,53 @@
<?php

namespace App\Repository;


use Doctrine\Common\Collections\ArrayCollection;
use Lc\SovBundle\Repository\AbstractStore;
use Lc\SovBundle\Repository\RepositoryQueryInterface;
use Lc\SovBundle\Repository\StoreInterface;

class SearchStore extends AbstractStore implements StoreInterface
{

public function __construct($query)
{
$this->query = $query;
}

public function orderByDefault(RepositoryQueryInterface $query): RepositoryQueryInterface
{
$query->orderBy('id');
return $query;
}

public function filtersDefault(RepositoryQueryInterface $query): RepositoryQueryInterface
{
$query->filterIsValid();
return $query;
}

public function relationsDefault(RepositoryQueryInterface $query): RepositoryQueryInterface
{
return $query;
}

public function filterSearch(
?string $description,
ArrayCollection $territoryArray,
ArrayCollection $thematicArray,
$query = null
) {
$query = $this->createDefaultQuery($query);
$query
->filterByThematic($thematicArray)
->filterByTerritory($territoryArray);
if (!empty($description)) {
$query->filterByDescription($description);
}

return $query->find();
}

}

src/Type/DreamsType.php → src/Type/DreamType.php Näytä tiedosto

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

namespace App\Type;

use App\Entity\Dreams;
use App\Entity\Dream;
use App\Entity\Thematic;
use Lc\SovBundle\Doctrine\EntityManager;
use Lc\SovBundle\Model\User\UserInterface;
@@ -18,7 +18,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Security\Core\Validator\Constraints\UserPassword;
use Symfony\Component\Validator\Constraints\NotBlank;

class DreamsType extends AbstractType
class DreamType extends AbstractType
{

protected $em;
@@ -39,7 +39,7 @@ class DreamsType extends AbstractType
'description',
TextareaType::class,
[
'label' => 'form.field.dreams.description',
'label' => 'form.field.dream.description',
'constraints' => [
new NotBlank(),
],
@@ -49,7 +49,7 @@ class DreamsType extends AbstractType
'thematic',
EntityType::class,
[
'label' => 'form.field.dreams.thematic',
'label' => 'form.field.dream.thematic',
'class' => Thematic::class,
'required' => false,
]
@@ -63,7 +63,7 @@ class DreamsType extends AbstractType
{
$resolver->setDefaults(
[
'data_class' => $this->em->getEntityName(Dreams::class),
'data_class' => $this->em->getEntityName(Dream::class),
]
);
}

src/Type/ProjectsBoostType.php → src/Type/ProjectBoostType.php Näytä tiedosto

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

namespace App\Type;

use App\Entity\ProjectsBoost;
use App\Entity\ProjectBoost;
use App\Entity\Thematic;
use Lc\SovBundle\Doctrine\EntityManager;
use Lc\SovBundle\Model\User\UserInterface;
@@ -18,7 +18,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Security\Core\Validator\Constraints\UserPassword;
use Symfony\Component\Validator\Constraints\NotBlank;

class ProjectsBoostType extends AbstractType
class ProjectBoostType extends AbstractType
{

protected $em;
@@ -39,7 +39,7 @@ class ProjectsBoostType extends AbstractType
'description',
TextareaType::class,
[
'label' => 'form.field.projectsboost.description',
'label' => 'form.field.projectBoost.description',
'constraints' => [
new NotBlank(),
],
@@ -49,7 +49,7 @@ class ProjectsBoostType extends AbstractType
'thematic',
EntityType::class,
[
'label' => 'form.field.projectsboost.thematic',
'label' => 'form.field.projectBoost.thematic',
'class' => Thematic::class,
'required' => false,
]
@@ -63,7 +63,7 @@ class ProjectsBoostType extends AbstractType
{
$resolver->setDefaults(
[
'data_class' => $this->em->getEntityName(ProjectsBoost::class),
'data_class' => $this->em->getEntityName(ProjectBoost::class),
]
);
}

src/Type/ProjectsInspiringType.php → src/Type/ProjectInspiringType.php Näytä tiedosto

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

namespace App\Type;

use App\Entity\ProjectsInspiring;
use App\Entity\ProjectInspiring;
use App\Entity\Thematic;
use Lc\SovBundle\Doctrine\EntityManager;
use Lc\SovBundle\Model\User\UserInterface;
@@ -18,7 +18,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Security\Core\Validator\Constraints\UserPassword;
use Symfony\Component\Validator\Constraints\NotBlank;

class ProjectsInspiringType extends AbstractType
class ProjectInspiringType extends AbstractType
{

protected $em;
@@ -39,7 +39,7 @@ class ProjectsInspiringType extends AbstractType
'description',
TextareaType::class,
[
'label' => 'form.field.projectsinspiring.description',
'label' => 'form.field.projectinspiring.description',
'constraints' => [
new NotBlank(),
],
@@ -49,7 +49,7 @@ class ProjectsInspiringType extends AbstractType
'thematic',
EntityType::class,
[
'label' => 'form.field.projectsinspiring.thematic',
'label' => 'form.field.projectinspiring.thematic',
'class' => Thematic::class,
'required' => false,
]
@@ -63,7 +63,7 @@ class ProjectsInspiringType extends AbstractType
{
$resolver->setDefaults(
[
'data_class' => $this->em->getEntityName(ProjectsInspiring::class),
'data_class' => $this->em->getEntityName(ProjectInspiring::class),
]
);
}

src/Type/RevoltsType.php → src/Type/RevoltType.php Näytä tiedosto

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

namespace App\Type;

use App\Entity\Revolts;
use App\Entity\Revolt;
use App\Entity\Thematic;
use Lc\SovBundle\Doctrine\EntityManager;
use Lc\SovBundle\Translation\TranslatorAdmin;
@@ -13,7 +13,7 @@ use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Validator\Constraints\NotBlank;

class RevoltsType extends AbstractType
class RevoltType extends AbstractType
{

protected $em;
@@ -34,7 +34,7 @@ class RevoltsType extends AbstractType
'description',
TextareaType::class,
[
'label' => 'form.field.revolts.description',
'label' => 'form.field.revolt.description',
'constraints' => [
new NotBlank(),
],
@@ -44,7 +44,7 @@ class RevoltsType extends AbstractType
'thematic',
EntityType::class,
[
'label' => 'form.field.revolts.thematic',
'label' => 'form.field.revolt.thematic',
'class' => Thematic::class,
'required' => false,
]
@@ -58,7 +58,7 @@ class RevoltsType extends AbstractType
{
$resolver->setDefaults(
[
'data_class' => $this->em->getEntityName(Revolts::class),
'data_class' => $this->em->getEntityName(Revolt::class),
]
);
}

+ 3
- 3
templates/adminlte/dashboard.html.twig Näytä tiedosto

@@ -21,15 +21,15 @@
{# </div>#}
{# <div class="row">#}
{# <div class="col-sm-6 col-xs-12">#}
{# {{ minfobox.infobox("Nombre de rêves ", nbDreams, "blue", "far fa-lightbulb") }}#}
{# {{ minfobox.infobox("Nombre de rêves ", nbDream, "blue", "far fa-lightbulb") }}#}
{# </div>#}
{# <div class="col-sm-6 col-xs-12">#}
{# {{ minfobox.infobox("Nombre de révoltes ", nbRevolts, "red", "fas fa-bullhorn") }}#}
{# {{ minfobox.infobox("Nombre de révoltes ", nbRevolt, "red", "fas fa-bullhorn") }}#}
{# </div>#}
{# </div>#}
{# <div class="row">#}
{# <div class="col-sm-6 col-xs-12">#}
{# {{ minfobox.infobox("Nombre de projets boostés ", nbProjectsBoost, "indigo", "fas fa-thumbs-up") }}#}
{# {{ minfobox.infobox("Nombre de projets boostés ", nbProjectBoost, "indigo", "fas fa-thumbs-up") }}#}
{# </div>#}
{# <div class="col-sm-6 col-xs-12">#}
{# {{ minfobox.infobox("Nombre de projets inspirants ", nbProjectsInsp, "blue", "fas fa-smile") }}#}

+ 9
- 0
templates/frontend/carto-liste.html.twig Näytä tiedosto

@@ -3,6 +3,15 @@
{% block carto %}
<div id="carto-liste">
<h1 class="title-liste">La liste simple... et rêvolutionnaire !</h1>
{{ form_start(form) }}
{{ form_errors(form) }}

{{ form_row(form.search) }}
{{ form_row(form.territory) }}
{{ form_row(form.category) }}
{{ form_row(form.thematic) }}

{{ form_row(form.search_button, { 'label': 'Rechercher' }) }}
{{ form_end(form) }}
</div>
{% endblock %}

+ 12
- 12
translations/admin.fr.yaml Näytä tiedosto

@@ -20,15 +20,15 @@ entity:
fields:
territory: Territoire
nbParticipant: Nombre de participants
revolts: Les révoltes
dreams: Les rêves
projectsboost: Les projets boostés
projectsinspiring: Les projets inspirants
revolt: Les révoltes
dream: Les rêves
projectBoost: Les projets boostés
projectinspiring: Les projets inspirants
resume: Résumé
nbDreams: Rêve(s)
nbRevolts: Révolte(s)
nbProjectsBoost: Projet(s) boosté(s)
nbProjectsInspiring: Projet(s) inspirant(s)
nbDream: Rêve(s)
nbRevolt: Révolte(s)
nbProjectBoost: Projet(s) boosté(s)
nbProjectInspiring: Projet(s) inspirant(s)
IndividualData:
label: Données individuel
label_plurial: Données du formulaire individuel
@@ -50,15 +50,15 @@ entity:
label: Configuration
form:
field:
dreams:
dream:
description: Description
thematic: Thématique
projectsboost:
projectBoost:
description: Description
thematic: Thématique
projectsinspiring:
projectinspiring:
description: Description
thematic: Thématique
revolts:
revolt:
description: Description
thematic: Thématique

Loading…
Peruuta
Tallenna