<?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 Version20210531143333 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, 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, 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, INDEX IDX_FD07CC0AE2920B1 (individual_data_id), INDEX IDX_FD07CC0AD9275BF1 (collectif_data_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, 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, PRIMARY KEY(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, INDEX IDX_C3E57356E2920B1 (individual_data_id), INDEX IDX_C3E57356D9275BF1 (collectif_data_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, INDEX IDX_E60CAEC6E2920B1 (individual_data_id), INDEX IDX_E60CAEC6D9275BF1 (collectif_data_id), PRIMARY KEY(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, INDEX IDX_68E7DC9FE2920B1 (individual_data_id), INDEX IDX_68E7DC9FD9275BF1 (collectif_data_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, individual_data_id INT DEFAULT NULL, name VARCHAR(255) NOT NULL, INDEX IDX_E9743966E2920B1 (individual_data_id), 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('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 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_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 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 territory ADD CONSTRAINT FK_E9743966E2920B1 FOREIGN KEY (individual_data_id) REFERENCES individual_data (id)'); | |||||
} | |||||
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 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 territory DROP FOREIGN KEY FK_E9743966E2920B1'); | |||||
$this->addSql('ALTER TABLE collectif_data DROP FOREIGN KEY FK_F35F850373F74AD4'); | |||||
$this->addSql('DROP TABLE collectif_data'); | |||||
$this->addSql('DROP TABLE configuration'); | |||||
$this->addSql('DROP TABLE dreams'); | |||||
$this->addSql('DROP TABLE individual_data'); | |||||
$this->addSql('DROP TABLE projects_boost'); | |||||
$this->addSql('DROP TABLE projects_inspiring'); | |||||
$this->addSql('DROP TABLE revolts'); | |||||
$this->addSql('DROP TABLE territory'); | |||||
$this->addSql('DROP TABLE thematic'); | |||||
} | |||||
} |
<?php | |||||
namespace App\Entity; | |||||
use App\Entity\User\User; | |||||
use App\Repository\CollectifDataRepository; | |||||
use Doctrine\Common\Collections\ArrayCollection; | |||||
use Doctrine\Common\Collections\Collection; | |||||
use Doctrine\ORM\Mapping as ORM; | |||||
/** | |||||
* @ORM\Entity(repositoryClass=CollectifDataRepository::class) | |||||
*/ | |||||
class CollectifData | |||||
{ | |||||
/** | |||||
* @ORM\Id | |||||
* @ORM\GeneratedValue | |||||
* @ORM\Column(type="integer") | |||||
*/ | |||||
private $id; | |||||
/** | |||||
* @ORM\Column(type="integer") | |||||
*/ | |||||
private $nbParticipant; | |||||
/** | |||||
* @ORM\ManyToOne(targetEntity=User::class, inversedBy="collectifData") | |||||
*/ | |||||
private $user; | |||||
/** | |||||
* @ORM\OneToMany(targetEntity=Revolts::class, mappedBy="collectifData") | |||||
*/ | |||||
private $revolts; | |||||
/** | |||||
* @ORM\OneToMany(targetEntity=Dreams::class, mappedBy="collectifData") | |||||
*/ | |||||
private $dreams; | |||||
/** | |||||
* @ORM\OneToMany(targetEntity=ProjectsBoost::class, mappedBy="collectifData") | |||||
*/ | |||||
private $projectsBoost; | |||||
/** | |||||
* @ORM\OneToMany(targetEntity=ProjectsInspiring::class, mappedBy="collectifData") | |||||
*/ | |||||
private $projectsInspiring; | |||||
/** | |||||
* @ORM\ManyToOne(targetEntity=Territory::class, inversedBy="collectifData") | |||||
*/ | |||||
private $territory; | |||||
public function __construct() | |||||
{ | |||||
$this->revolts = new ArrayCollection(); | |||||
$this->dreams = new ArrayCollection(); | |||||
$this->projectsBoost = new ArrayCollection(); | |||||
$this->projectsInspiring = new ArrayCollection(); | |||||
} | |||||
public function getId(): ?int | |||||
{ | |||||
return $this->id; | |||||
} | |||||
public function getNbParticipant(): ?int | |||||
{ | |||||
return $this->nbParticipant; | |||||
} | |||||
public function setNbParticipant(int $nbParticipant): self | |||||
{ | |||||
$this->nbParticipant = $nbParticipant; | |||||
return $this; | |||||
} | |||||
public function getUser(): ?User | |||||
{ | |||||
return $this->user; | |||||
} | |||||
public function setUser(?User $user): self | |||||
{ | |||||
$this->user = $user; | |||||
return $this; | |||||
} | |||||
/** | |||||
* @return Collection|Revolts[] | |||||
*/ | |||||
public function getRevolts(): Collection | |||||
{ | |||||
return $this->revolts; | |||||
} | |||||
public function addRevolt(Revolts $revolt): self | |||||
{ | |||||
if (!$this->revolts->contains($revolt)) { | |||||
$this->revolts[] = $revolt; | |||||
$revolt->setCollectifData($this); | |||||
} | |||||
return $this; | |||||
} | |||||
public function removeRevolt(Revolts $revolt): self | |||||
{ | |||||
if ($this->revolts->removeElement($revolt)) { | |||||
// set the owning side to null (unless already changed) | |||||
if ($revolt->getCollectifData() === $this) { | |||||
$revolt->setCollectifData(null); | |||||
} | |||||
} | |||||
return $this; | |||||
} | |||||
/** | |||||
* @return Collection|Dreams[] | |||||
*/ | |||||
public function getDreams(): Collection | |||||
{ | |||||
return $this->dreams; | |||||
} | |||||
public function addDream(Dreams $dream): self | |||||
{ | |||||
if (!$this->dreams->contains($dream)) { | |||||
$this->dreams[] = $dream; | |||||
$dream->setCollectifData($this); | |||||
} | |||||
return $this; | |||||
} | |||||
public function removeDream(Dreams $dream): self | |||||
{ | |||||
if ($this->dreams->removeElement($dream)) { | |||||
// set the owning side to null (unless already changed) | |||||
if ($dream->getCollectifData() === $this) { | |||||
$dream->setCollectifData(null); | |||||
} | |||||
} | |||||
return $this; | |||||
} | |||||
/** | |||||
* @return Collection|ProjectsBoost[] | |||||
*/ | |||||
public function getProjectsBoost(): Collection | |||||
{ | |||||
return $this->projectsBoost; | |||||
} | |||||
public function addProjectsBoost(ProjectsBoost $projectsBoost): self | |||||
{ | |||||
if (!$this->projectsBoost->contains($projectsBoost)) { | |||||
$this->projectsBoost[] = $projectsBoost; | |||||
$projectsBoost->setCollectifData($this); | |||||
} | |||||
return $this; | |||||
} | |||||
public function removeProjectsBoost(ProjectsBoost $projectsBoost): self | |||||
{ | |||||
if ($this->projectsBoost->removeElement($projectsBoost)) { | |||||
// set the owning side to null (unless already changed) | |||||
if ($projectsBoost->getCollectifData() === $this) { | |||||
$projectsBoost->setCollectifData(null); | |||||
} | |||||
} | |||||
return $this; | |||||
} | |||||
/** | |||||
* @return Collection|ProjectsInspiring[] | |||||
*/ | |||||
public function getProjectsInspiring(): Collection | |||||
{ | |||||
return $this->projectsInspiring; | |||||
} | |||||
public function addProjectsInspiring(ProjectsInspiring $projectsInspiring): self | |||||
{ | |||||
if (!$this->projectsInspiring->contains($projectsInspiring)) { | |||||
$this->projectsInspiring[] = $projectsInspiring; | |||||
$projectsInspiring->setCollectifData($this); | |||||
} | |||||
return $this; | |||||
} | |||||
public function removeProjectsInspiring(ProjectsInspiring $projectsInspiring): self | |||||
{ | |||||
if ($this->projectsInspiring->removeElement($projectsInspiring)) { | |||||
// set the owning side to null (unless already changed) | |||||
if ($projectsInspiring->getCollectifData() === $this) { | |||||
$projectsInspiring->setCollectifData(null); | |||||
} | |||||
} | |||||
return $this; | |||||
} | |||||
public function getTerritory(): ?Territory | |||||
{ | |||||
return $this->territory; | |||||
} | |||||
public function setTerritory(?Territory $territory): self | |||||
{ | |||||
$this->territory = $territory; | |||||
return $this; | |||||
} | |||||
} |
<?php | |||||
namespace App\Entity; | |||||
use App\Repository\ConfigurationRepository; | |||||
use Doctrine\ORM\Mapping as ORM; | |||||
/** | |||||
* @ORM\Entity(repositoryClass=ConfigurationRepository::class) | |||||
*/ | |||||
class Configuration | |||||
{ | |||||
/** | |||||
* @ORM\Id | |||||
* @ORM\GeneratedValue | |||||
* @ORM\Column(type="integer") | |||||
*/ | |||||
private $id; | |||||
/** | |||||
* @ORM\Column(type="string", length=255) | |||||
*/ | |||||
private $value; | |||||
public function getId(): ?int | |||||
{ | |||||
return $this->id; | |||||
} | |||||
public function getValue(): ?string | |||||
{ | |||||
return $this->value; | |||||
} | |||||
public function setValue(string $value): self | |||||
{ | |||||
$this->value = $value; | |||||
return $this; | |||||
} | |||||
} |
<?php | |||||
namespace App\Entity; | |||||
use App\Repository\DreamsRepository; | |||||
use Doctrine\ORM\Mapping as ORM; | |||||
/** | |||||
* @ORM\Entity(repositoryClass=DreamsRepository::class) | |||||
*/ | |||||
class Dreams | |||||
{ | |||||
/** | |||||
* @ORM\Id | |||||
* @ORM\GeneratedValue | |||||
* @ORM\Column(type="integer") | |||||
*/ | |||||
private $id; | |||||
/** | |||||
* @ORM\ManyToOne(targetEntity=IndividualData::class, inversedBy="dreams") | |||||
*/ | |||||
private $individualData; | |||||
/** | |||||
* @ORM\ManyToOne(targetEntity=CollectifData::class, inversedBy="Dreams") | |||||
*/ | |||||
private $collectifData; | |||||
public function getId(): ?int | |||||
{ | |||||
return $this->id; | |||||
} | |||||
public function getIndividualData(): ?IndividualData | |||||
{ | |||||
return $this->individualData; | |||||
} | |||||
public function setIndividualData(?IndividualData $individualData): self | |||||
{ | |||||
$this->individualData = $individualData; | |||||
return $this; | |||||
} | |||||
public function getCollectifData(): ?CollectifData | |||||
{ | |||||
return $this->collectifData; | |||||
} | |||||
public function setCollectifData(?CollectifData $collectifData): self | |||||
{ | |||||
$this->collectifData = $collectifData; | |||||
return $this; | |||||
} | |||||
} |
<?php | |||||
namespace App\Entity; | |||||
use App\Repository\IndividualDataRepository; | |||||
use Doctrine\Common\Collections\ArrayCollection; | |||||
use Doctrine\Common\Collections\Collection; | |||||
use Doctrine\ORM\Mapping as ORM; | |||||
/** | |||||
* @ORM\Entity(repositoryClass=IndividualDataRepository::class) | |||||
*/ | |||||
class IndividualData | |||||
{ | |||||
/** | |||||
* @ORM\Id | |||||
* @ORM\GeneratedValue | |||||
* @ORM\Column(type="integer") | |||||
*/ | |||||
private $id; | |||||
/** | |||||
* @ORM\Column(type="string", length=255) | |||||
*/ | |||||
private $firstname; | |||||
/** | |||||
* @ORM\Column(type="string", length=255) | |||||
*/ | |||||
private $lastname; | |||||
/** | |||||
* @ORM\Column(type="string", length=255) | |||||
*/ | |||||
private $email; | |||||
/** | |||||
* @ORM\Column(type="string", length=255) | |||||
*/ | |||||
private $introQuestion; | |||||
/** | |||||
* @ORM\Column(type="string", length=255, nullable=true) | |||||
*/ | |||||
private $introAnswer; | |||||
/** | |||||
* @ORM\OneToMany(targetEntity=Revolts::class, mappedBy="individualData") | |||||
*/ | |||||
private $revolts; | |||||
/** | |||||
* @ORM\OneToMany(targetEntity=Dreams::class, mappedBy="individualData") | |||||
*/ | |||||
private $dreams; | |||||
/** | |||||
* @ORM\OneToMany(targetEntity=ProjectsBoost::class, mappedBy="individualData") | |||||
*/ | |||||
private $projectsBoost; | |||||
/** | |||||
* @ORM\OneToMany(targetEntity=ProjectsInspiring::class, mappedBy="individualData") | |||||
*/ | |||||
private $projectsInspiring; | |||||
/** | |||||
* @ORM\OneToMany(targetEntity=Territory::class, mappedBy="individualData") | |||||
*/ | |||||
private $territory; | |||||
public function __construct() | |||||
{ | |||||
$this->revolts = new ArrayCollection(); | |||||
$this->dreams = new ArrayCollection(); | |||||
$this->projectsBoost = new ArrayCollection(); | |||||
$this->projectsInspiring = new ArrayCollection(); | |||||
$this->territory = new ArrayCollection(); | |||||
} | |||||
public function getId(): ?int | |||||
{ | |||||
return $this->id; | |||||
} | |||||
public function getFirstname(): ?string | |||||
{ | |||||
return $this->firstname; | |||||
} | |||||
public function setFirstname(string $firstname): self | |||||
{ | |||||
$this->firstname = $firstname; | |||||
return $this; | |||||
} | |||||
public function getLastname(): ?string | |||||
{ | |||||
return $this->lastname; | |||||
} | |||||
public function setLastname(string $lastname): self | |||||
{ | |||||
$this->lastname = $lastname; | |||||
return $this; | |||||
} | |||||
public function getEmail(): ?string | |||||
{ | |||||
return $this->email; | |||||
} | |||||
public function setEmail(string $email): self | |||||
{ | |||||
$this->email = $email; | |||||
return $this; | |||||
} | |||||
public function getIntroQuestion(): ?string | |||||
{ | |||||
return $this->introQuestion; | |||||
} | |||||
public function setIntroQuestion(string $introQuestion): self | |||||
{ | |||||
$this->introQuestion = $introQuestion; | |||||
return $this; | |||||
} | |||||
public function getIntroAnswer(): ?string | |||||
{ | |||||
return $this->introAnswer; | |||||
} | |||||
public function setIntroAnswer(?string $introAnswer): self | |||||
{ | |||||
$this->introAnswer = $introAnswer; | |||||
return $this; | |||||
} | |||||
/** | |||||
* @return Collection|Revolts[] | |||||
*/ | |||||
public function getRevolts(): Collection | |||||
{ | |||||
return $this->revolts; | |||||
} | |||||
public function addRevolt(Revolts $revolt): self | |||||
{ | |||||
if (!$this->revolts->contains($revolt)) { | |||||
$this->revolts[] = $revolt; | |||||
$revolt->setIndividualData($this); | |||||
} | |||||
return $this; | |||||
} | |||||
public function removeRevolt(Revolts $revolt): self | |||||
{ | |||||
if ($this->revolts->removeElement($revolt)) { | |||||
// set the owning side to null (unless already changed) | |||||
if ($revolt->getIndividualData() === $this) { | |||||
$revolt->setIndividualData(null); | |||||
} | |||||
} | |||||
return $this; | |||||
} | |||||
/** | |||||
* @return Collection|Dreams[] | |||||
*/ | |||||
public function getDreams(): Collection | |||||
{ | |||||
return $this->dreams; | |||||
} | |||||
public function addDream(Dreams $dream): self | |||||
{ | |||||
if (!$this->dreams->contains($dream)) { | |||||
$this->dreams[] = $dream; | |||||
$dream->setIndividualData($this); | |||||
} | |||||
return $this; | |||||
} | |||||
public function removeDream(Dreams $dream): self | |||||
{ | |||||
if ($this->dreams->removeElement($dream)) { | |||||
// set the owning side to null (unless already changed) | |||||
if ($dream->getIndividualData() === $this) { | |||||
$dream->setIndividualData(null); | |||||
} | |||||
} | |||||
return $this; | |||||
} | |||||
/** | |||||
* @return Collection|ProjectsBoost[] | |||||
*/ | |||||
public function getProjectsBoost(): Collection | |||||
{ | |||||
return $this->projectsBoost; | |||||
} | |||||
public function addProjectsBoost(ProjectsBoost $projectsBoost): self | |||||
{ | |||||
if (!$this->projectsBoost->contains($projectsBoost)) { | |||||
$this->projectsBoost[] = $projectsBoost; | |||||
$projectsBoost->setIndividualData($this); | |||||
} | |||||
return $this; | |||||
} | |||||
public function removeProjectsBoost(ProjectsBoost $projectsBoost): self | |||||
{ | |||||
if ($this->projectsBoost->removeElement($projectsBoost)) { | |||||
// set the owning side to null (unless already changed) | |||||
if ($projectsBoost->getIndividualData() === $this) { | |||||
$projectsBoost->setIndividualData(null); | |||||
} | |||||
} | |||||
return $this; | |||||
} | |||||
/** | |||||
* @return Collection|ProjectsInspiring[] | |||||
*/ | |||||
public function getProjectsInspiring(): Collection | |||||
{ | |||||
return $this->projectsInspiring; | |||||
} | |||||
public function addProjectsInspiring(ProjectsInspiring $projectsInspiring): self | |||||
{ | |||||
if (!$this->projectsInspiring->contains($projectsInspiring)) { | |||||
$this->projectsInspiring[] = $projectsInspiring; | |||||
$projectsInspiring->setIndividualData($this); | |||||
} | |||||
return $this; | |||||
} | |||||
public function removeProjectsInspiring(ProjectsInspiring $projectsInspiring): self | |||||
{ | |||||
if ($this->projectsInspiring->removeElement($projectsInspiring)) { | |||||
// set the owning side to null (unless already changed) | |||||
if ($projectsInspiring->getIndividualData() === $this) { | |||||
$projectsInspiring->setIndividualData(null); | |||||
} | |||||
} | |||||
return $this; | |||||
} | |||||
/** | |||||
* @return Collection|Territory[] | |||||
*/ | |||||
public function getTerritory(): Collection | |||||
{ | |||||
return $this->territory; | |||||
} | |||||
public function addTerritory(Territory $territory): self | |||||
{ | |||||
if (!$this->territory->contains($territory)) { | |||||
$this->territory[] = $territory; | |||||
$territory->setIndividualData($this); | |||||
} | |||||
return $this; | |||||
} | |||||
public function removeTerritory(Territory $territory): self | |||||
{ | |||||
if ($this->territory->removeElement($territory)) { | |||||
// set the owning side to null (unless already changed) | |||||
if ($territory->getIndividualData() === $this) { | |||||
$territory->setIndividualData(null); | |||||
} | |||||
} | |||||
return $this; | |||||
} | |||||
} |
<?php | |||||
namespace App\Entity; | |||||
use App\Repository\ProjectsBoostRepository; | |||||
use Doctrine\ORM\Mapping as ORM; | |||||
/** | |||||
* @ORM\Entity(repositoryClass=ProjectsBoostRepository::class) | |||||
*/ | |||||
class ProjectsBoost | |||||
{ | |||||
/** | |||||
* @ORM\Id | |||||
* @ORM\GeneratedValue | |||||
* @ORM\Column(type="integer") | |||||
*/ | |||||
private $id; | |||||
/** | |||||
* @ORM\ManyToOne(targetEntity=IndividualData::class, inversedBy="ProjectsBoost") | |||||
*/ | |||||
private $individualData; | |||||
/** | |||||
* @ORM\ManyToOne(targetEntity=CollectifData::class, inversedBy="projectsBoost") | |||||
*/ | |||||
private $collectifData; | |||||
public function getId(): ?int | |||||
{ | |||||
return $this->id; | |||||
} | |||||
public function getIndividualData(): ?IndividualData | |||||
{ | |||||
return $this->individualData; | |||||
} | |||||
public function setIndividualData(?IndividualData $individualData): self | |||||
{ | |||||
$this->individualData = $individualData; | |||||
return $this; | |||||
} | |||||
public function getCollectifData(): ?CollectifData | |||||
{ | |||||
return $this->collectifData; | |||||
} | |||||
public function setCollectifData(?CollectifData $collectifData): self | |||||
{ | |||||
$this->collectifData = $collectifData; | |||||
return $this; | |||||
} | |||||
} |
<?php | |||||
namespace App\Entity; | |||||
use App\Repository\ProjectsInspiringRepository; | |||||
use Doctrine\ORM\Mapping as ORM; | |||||
/** | |||||
* @ORM\Entity(repositoryClass=ProjectsInspiringRepository::class) | |||||
*/ | |||||
class ProjectsInspiring | |||||
{ | |||||
/** | |||||
* @ORM\Id | |||||
* @ORM\GeneratedValue | |||||
* @ORM\Column(type="integer") | |||||
*/ | |||||
private $id; | |||||
/** | |||||
* @ORM\ManyToOne(targetEntity=IndividualData::class, inversedBy="projectsInspiring") | |||||
*/ | |||||
private $individualData; | |||||
/** | |||||
* @ORM\ManyToOne(targetEntity=CollectifData::class, inversedBy="projectsInspiring") | |||||
*/ | |||||
private $collectifData; | |||||
public function getId(): ?int | |||||
{ | |||||
return $this->id; | |||||
} | |||||
public function getIndividualData(): ?IndividualData | |||||
{ | |||||
return $this->individualData; | |||||
} | |||||
public function setIndividualData(?IndividualData $individualData): self | |||||
{ | |||||
$this->individualData = $individualData; | |||||
return $this; | |||||
} | |||||
public function getCollectifData(): ?CollectifData | |||||
{ | |||||
return $this->collectifData; | |||||
} | |||||
public function setCollectifData(?CollectifData $collectifData): self | |||||
{ | |||||
$this->collectifData = $collectifData; | |||||
return $this; | |||||
} | |||||
} |
<?php | |||||
namespace App\Entity; | |||||
use App\Repository\RevoltsRepository; | |||||
use Doctrine\ORM\Mapping as ORM; | |||||
/** | |||||
* @ORM\Entity(repositoryClass=RevoltsRepository::class) | |||||
*/ | |||||
class Revolts | |||||
{ | |||||
/** | |||||
* @ORM\Id | |||||
* @ORM\GeneratedValue | |||||
* @ORM\Column(type="integer") | |||||
*/ | |||||
private $id; | |||||
/** | |||||
* @ORM\ManyToOne(targetEntity=IndividualData::class, inversedBy="revolts") | |||||
*/ | |||||
private $individualData; | |||||
/** | |||||
* @ORM\ManyToOne(targetEntity=CollectifData::class, inversedBy="revolts") | |||||
*/ | |||||
private $collectifData; | |||||
public function getId(): ?int | |||||
{ | |||||
return $this->id; | |||||
} | |||||
public function getIndividualData(): ?IndividualData | |||||
{ | |||||
return $this->individualData; | |||||
} | |||||
public function setIndividualData(?IndividualData $individualData): self | |||||
{ | |||||
$this->individualData = $individualData; | |||||
return $this; | |||||
} | |||||
public function getCollectifData(): ?CollectifData | |||||
{ | |||||
return $this->collectifData; | |||||
} | |||||
public function setCollectifData(?CollectifData $collectifData): self | |||||
{ | |||||
$this->collectifData = $collectifData; | |||||
return $this; | |||||
} | |||||
} |
<?php | |||||
namespace App\Entity; | |||||
use App\Repository\TerritoryRepository; | |||||
use Doctrine\Common\Collections\ArrayCollection; | |||||
use Doctrine\Common\Collections\Collection; | |||||
use Doctrine\ORM\Mapping as ORM; | |||||
/** | |||||
* @ORM\Entity(repositoryClass=TerritoryRepository::class) | |||||
*/ | |||||
class Territory | |||||
{ | |||||
/** | |||||
* @ORM\Id | |||||
* @ORM\GeneratedValue | |||||
* @ORM\Column(type="integer") | |||||
*/ | |||||
private $id; | |||||
/** | |||||
* @ORM\Column(type="string", length=255) | |||||
*/ | |||||
private $name; | |||||
/** | |||||
* @ORM\ManyToOne(targetEntity=IndividualData::class, inversedBy="territory") | |||||
*/ | |||||
private $individualData; | |||||
/** | |||||
* @ORM\OneToMany(targetEntity=CollectifData::class, mappedBy="territory") | |||||
*/ | |||||
private $collectifData; | |||||
public function __construct() | |||||
{ | |||||
$this->collectifData = new ArrayCollection(); | |||||
} | |||||
public function getId(): ?int | |||||
{ | |||||
return $this->id; | |||||
} | |||||
public function getName(): ?string | |||||
{ | |||||
return $this->name; | |||||
} | |||||
public function setName(string $name): self | |||||
{ | |||||
$this->name = $name; | |||||
return $this; | |||||
} | |||||
public function getIndividualData(): ?IndividualData | |||||
{ | |||||
return $this->individualData; | |||||
} | |||||
public function setIndividualData(?IndividualData $individualData): self | |||||
{ | |||||
$this->individualData = $individualData; | |||||
return $this; | |||||
} | |||||
/** | |||||
* @return Collection|CollectifData[] | |||||
*/ | |||||
public function getCollectifData(): Collection | |||||
{ | |||||
return $this->collectifData; | |||||
} | |||||
public function addCollectifData(CollectifData $collectifData): self | |||||
{ | |||||
if (!$this->collectifData->contains($collectifData)) { | |||||
$this->collectifData[] = $collectifData; | |||||
$collectifData->setTerritory($this); | |||||
} | |||||
return $this; | |||||
} | |||||
public function removeCollectifData(CollectifData $collectifData): self | |||||
{ | |||||
if ($this->collectifData->removeElement($collectifData)) { | |||||
// set the owning side to null (unless already changed) | |||||
if ($collectifData->getTerritory() === $this) { | |||||
$collectifData->setTerritory(null); | |||||
} | |||||
} | |||||
return $this; | |||||
} | |||||
} |
<?php | |||||
namespace App\Entity; | |||||
use App\Repository\ThematicRepository; | |||||
use Doctrine\ORM\Mapping as ORM; | |||||
/** | |||||
* @ORM\Entity(repositoryClass=ThematicRepository::class) | |||||
*/ | |||||
class Thematic | |||||
{ | |||||
/** | |||||
* @ORM\Id | |||||
* @ORM\GeneratedValue | |||||
* @ORM\Column(type="integer") | |||||
*/ | |||||
private $id; | |||||
/** | |||||
* @ORM\Column(type="string", length=255) | |||||
*/ | |||||
private $name; | |||||
public function getId(): ?int | |||||
{ | |||||
return $this->id; | |||||
} | |||||
public function getName(): ?string | |||||
{ | |||||
return $this->name; | |||||
} | |||||
public function setName(string $name): self | |||||
{ | |||||
$this->name = $name; | |||||
return $this; | |||||
} | |||||
} |
namespace App\Entity\User; | 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 Doctrine\ORM\Mapping as ORM; | ||||
use Lc\SovBundle\Model\User\User as SovUserModel; | use Lc\SovBundle\Model\User\User as SovUserModel; | ||||
use Lc\SovBundle\Model\User\UserInterface; | use Lc\SovBundle\Model\User\UserInterface; | ||||
*/ | */ | ||||
private $id; | private $id; | ||||
/** | |||||
* @ORM\OneToMany(targetEntity=CollectifData::class, mappedBy="user") | |||||
*/ | |||||
private $collectifData; | |||||
public function __construct() | |||||
{ | |||||
$this->collectifData = new ArrayCollection(); | |||||
} | |||||
public function getId(): ?int | public function getId(): ?int | ||||
{ | { | ||||
return $this->id; | return $this->id; | ||||
} | } | ||||
/** | |||||
* @return Collection|CollectifData[] | |||||
*/ | |||||
public function getCollectifData(): Collection | |||||
{ | |||||
return $this->collectifData; | |||||
} | |||||
public function addCollectifData(CollectifData $collectifData): self | |||||
{ | |||||
if (!$this->collectifData->contains($collectifData)) { | |||||
$this->collectifData[] = $collectifData; | |||||
$collectifData->setUser($this); | |||||
} | |||||
return $this; | |||||
} | |||||
public function removeCollectifData(CollectifData $collectifData): self | |||||
{ | |||||
if ($this->collectifData->removeElement($collectifData)) { | |||||
// set the owning side to null (unless already changed) | |||||
if ($collectifData->getUser() === $this) { | |||||
$collectifData->setUser(null); | |||||
} | |||||
} | |||||
return $this; | |||||
} | |||||
} | } |
<?php | |||||
namespace App\Repository; | |||||
use App\Entity\CollectifData; | |||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; | |||||
use Doctrine\Persistence\ManagerRegistry; | |||||
/** | |||||
* @method CollectifData|null find($id, $lockMode = null, $lockVersion = null) | |||||
* @method CollectifData|null findOneBy(array $criteria, array $orderBy = null) | |||||
* @method CollectifData[] findAll() | |||||
* @method CollectifData[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) | |||||
*/ | |||||
class CollectifDataRepository extends ServiceEntityRepository | |||||
{ | |||||
public function __construct(ManagerRegistry $registry) | |||||
{ | |||||
parent::__construct($registry, CollectifData::class); | |||||
} | |||||
// /** | |||||
// * @return CollectifData[] Returns an array of CollectifData objects | |||||
// */ | |||||
/* | |||||
public function findByExampleField($value) | |||||
{ | |||||
return $this->createQueryBuilder('c') | |||||
->andWhere('c.exampleField = :val') | |||||
->setParameter('val', $value) | |||||
->orderBy('c.id', 'ASC') | |||||
->setMaxResults(10) | |||||
->getQuery() | |||||
->getResult() | |||||
; | |||||
} | |||||
*/ | |||||
/* | |||||
public function findOneBySomeField($value): ?CollectifData | |||||
{ | |||||
return $this->createQueryBuilder('c') | |||||
->andWhere('c.exampleField = :val') | |||||
->setParameter('val', $value) | |||||
->getQuery() | |||||
->getOneOrNullResult() | |||||
; | |||||
} | |||||
*/ | |||||
} |
<?php | |||||
namespace App\Repository; | |||||
use App\Entity\Configuration; | |||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; | |||||
use Doctrine\Persistence\ManagerRegistry; | |||||
/** | |||||
* @method Configuration|null find($id, $lockMode = null, $lockVersion = null) | |||||
* @method Configuration|null findOneBy(array $criteria, array $orderBy = null) | |||||
* @method Configuration[] findAll() | |||||
* @method Configuration[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) | |||||
*/ | |||||
class ConfigurationRepository extends ServiceEntityRepository | |||||
{ | |||||
public function __construct(ManagerRegistry $registry) | |||||
{ | |||||
parent::__construct($registry, Configuration::class); | |||||
} | |||||
// /** | |||||
// * @return Configuration[] Returns an array of Configuration objects | |||||
// */ | |||||
/* | |||||
public function findByExampleField($value) | |||||
{ | |||||
return $this->createQueryBuilder('c') | |||||
->andWhere('c.exampleField = :val') | |||||
->setParameter('val', $value) | |||||
->orderBy('c.id', 'ASC') | |||||
->setMaxResults(10) | |||||
->getQuery() | |||||
->getResult() | |||||
; | |||||
} | |||||
*/ | |||||
/* | |||||
public function findOneBySomeField($value): ?Configuration | |||||
{ | |||||
return $this->createQueryBuilder('c') | |||||
->andWhere('c.exampleField = :val') | |||||
->setParameter('val', $value) | |||||
->getQuery() | |||||
->getOneOrNullResult() | |||||
; | |||||
} | |||||
*/ | |||||
} |
<?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() | |||||
; | |||||
} | |||||
*/ | |||||
} |
<?php | |||||
namespace App\Repository; | |||||
use App\Entity\IndividualData; | |||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; | |||||
use Doctrine\Persistence\ManagerRegistry; | |||||
/** | |||||
* @method IndividualData|null find($id, $lockMode = null, $lockVersion = null) | |||||
* @method IndividualData|null findOneBy(array $criteria, array $orderBy = null) | |||||
* @method IndividualData[] findAll() | |||||
* @method IndividualData[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) | |||||
*/ | |||||
class IndividualDataRepository extends ServiceEntityRepository | |||||
{ | |||||
public function __construct(ManagerRegistry $registry) | |||||
{ | |||||
parent::__construct($registry, IndividualData::class); | |||||
} | |||||
// /** | |||||
// * @return IndividualData[] Returns an array of IndividualData objects | |||||
// */ | |||||
/* | |||||
public function findByExampleField($value) | |||||
{ | |||||
return $this->createQueryBuilder('i') | |||||
->andWhere('i.exampleField = :val') | |||||
->setParameter('val', $value) | |||||
->orderBy('i.id', 'ASC') | |||||
->setMaxResults(10) | |||||
->getQuery() | |||||
->getResult() | |||||
; | |||||
} | |||||
*/ | |||||
/* | |||||
public function findOneBySomeField($value): ?IndividualData | |||||
{ | |||||
return $this->createQueryBuilder('i') | |||||
->andWhere('i.exampleField = :val') | |||||
->setParameter('val', $value) | |||||
->getQuery() | |||||
->getOneOrNullResult() | |||||
; | |||||
} | |||||
*/ | |||||
} |
<?php | |||||
namespace App\Repository; | |||||
use App\Entity\ProjectsBoost; | |||||
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) | |||||
*/ | |||||
class ProjectsBoostRepository extends ServiceEntityRepository | |||||
{ | |||||
public function __construct(ManagerRegistry $registry) | |||||
{ | |||||
parent::__construct($registry, ProjectsBoost::class); | |||||
} | |||||
// /** | |||||
// * @return ProjectsBoost[] Returns an array of ProjectsBoost objects | |||||
// */ | |||||
/* | |||||
public function findByExampleField($value) | |||||
{ | |||||
return $this->createQueryBuilder('p') | |||||
->andWhere('p.exampleField = :val') | |||||
->setParameter('val', $value) | |||||
->orderBy('p.id', 'ASC') | |||||
->setMaxResults(10) | |||||
->getQuery() | |||||
->getResult() | |||||
; | |||||
} | |||||
*/ | |||||
/* | |||||
public function findOneBySomeField($value): ?ProjectsBoost | |||||
{ | |||||
return $this->createQueryBuilder('p') | |||||
->andWhere('p.exampleField = :val') | |||||
->setParameter('val', $value) | |||||
->getQuery() | |||||
->getOneOrNullResult() | |||||
; | |||||
} | |||||
*/ | |||||
} |
<?php | |||||
namespace App\Repository; | |||||
use App\Entity\ProjectsInspiring; | |||||
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) | |||||
*/ | |||||
class ProjectsInspiringRepository extends ServiceEntityRepository | |||||
{ | |||||
public function __construct(ManagerRegistry $registry) | |||||
{ | |||||
parent::__construct($registry, ProjectsInspiring::class); | |||||
} | |||||
// /** | |||||
// * @return ProjectsInspiring[] Returns an array of ProjectsInspiring objects | |||||
// */ | |||||
/* | |||||
public function findByExampleField($value) | |||||
{ | |||||
return $this->createQueryBuilder('p') | |||||
->andWhere('p.exampleField = :val') | |||||
->setParameter('val', $value) | |||||
->orderBy('p.id', 'ASC') | |||||
->setMaxResults(10) | |||||
->getQuery() | |||||
->getResult() | |||||
; | |||||
} | |||||
*/ | |||||
/* | |||||
public function findOneBySomeField($value): ?ProjectsInspiring | |||||
{ | |||||
return $this->createQueryBuilder('p') | |||||
->andWhere('p.exampleField = :val') | |||||
->setParameter('val', $value) | |||||
->getQuery() | |||||
->getOneOrNullResult() | |||||
; | |||||
} | |||||
*/ | |||||
} |
<?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() | |||||
; | |||||
} | |||||
*/ | |||||
} |
<?php | |||||
namespace App\Repository; | |||||
use App\Entity\Territory; | |||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; | |||||
use Doctrine\Persistence\ManagerRegistry; | |||||
/** | |||||
* @method Territory|null find($id, $lockMode = null, $lockVersion = null) | |||||
* @method Territory|null findOneBy(array $criteria, array $orderBy = null) | |||||
* @method Territory[] findAll() | |||||
* @method Territory[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) | |||||
*/ | |||||
class TerritoryRepository extends ServiceEntityRepository | |||||
{ | |||||
public function __construct(ManagerRegistry $registry) | |||||
{ | |||||
parent::__construct($registry, Territory::class); | |||||
} | |||||
// /** | |||||
// * @return Territory[] Returns an array of Territory objects | |||||
// */ | |||||
/* | |||||
public function findByExampleField($value) | |||||
{ | |||||
return $this->createQueryBuilder('t') | |||||
->andWhere('t.exampleField = :val') | |||||
->setParameter('val', $value) | |||||
->orderBy('t.id', 'ASC') | |||||
->setMaxResults(10) | |||||
->getQuery() | |||||
->getResult() | |||||
; | |||||
} | |||||
*/ | |||||
/* | |||||
public function findOneBySomeField($value): ?Territory | |||||
{ | |||||
return $this->createQueryBuilder('t') | |||||
->andWhere('t.exampleField = :val') | |||||
->setParameter('val', $value) | |||||
->getQuery() | |||||
->getOneOrNullResult() | |||||
; | |||||
} | |||||
*/ | |||||
} |
<?php | |||||
namespace App\Repository; | |||||
use App\Entity\Thematic; | |||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; | |||||
use Doctrine\Persistence\ManagerRegistry; | |||||
/** | |||||
* @method Thematic|null find($id, $lockMode = null, $lockVersion = null) | |||||
* @method Thematic|null findOneBy(array $criteria, array $orderBy = null) | |||||
* @method Thematic[] findAll() | |||||
* @method Thematic[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) | |||||
*/ | |||||
class ThematicRepository extends ServiceEntityRepository | |||||
{ | |||||
public function __construct(ManagerRegistry $registry) | |||||
{ | |||||
parent::__construct($registry, Thematic::class); | |||||
} | |||||
// /** | |||||
// * @return Thematic[] Returns an array of Thematic objects | |||||
// */ | |||||
/* | |||||
public function findByExampleField($value) | |||||
{ | |||||
return $this->createQueryBuilder('t') | |||||
->andWhere('t.exampleField = :val') | |||||
->setParameter('val', $value) | |||||
->orderBy('t.id', 'ASC') | |||||
->setMaxResults(10) | |||||
->getQuery() | |||||
->getResult() | |||||
; | |||||
} | |||||
*/ | |||||
/* | |||||
public function findOneBySomeField($value): ?Thematic | |||||
{ | |||||
return $this->createQueryBuilder('t') | |||||
->andWhere('t.exampleField = :val') | |||||
->setParameter('val', $value) | |||||
->getQuery() | |||||
->getOneOrNullResult() | |||||
; | |||||
} | |||||
*/ | |||||
} |