Kaynağa Gözat

Merge branch 'develop' of https://forge.laclic.fr/Laclic/ActesCitoyens into develop

develop
charly 3 yıl önce
ebeveyn
işleme
3313ee3c7a
9 değiştirilmiş dosya ile 18 ekleme ve 570 silme
  1. +1
    -0
      config/bundles.php
  2. +2
    -27
      src/Entity/Dream.php
  3. +2
    -288
      src/Entity/IndividualData.php
  4. +2
    -23
      src/Entity/ProjectBoost.php
  5. +2
    -27
      src/Entity/ProjectInspiring.php
  6. +2
    -23
      src/Entity/Revolt.php
  7. +2
    -41
      src/Entity/Subthematic.php
  8. +3
    -75
      src/Entity/Territory.php
  9. +2
    -66
      src/Entity/Thematic.php

+ 1
- 0
config/bundles.php Dosyayı Görüntüle

@@ -18,6 +18,7 @@ return [
Artgris\Bundle\FileManagerBundle\ArtgrisFileManagerBundle::class => ['all' => true],
EasyCorp\Bundle\EasyAdminBundle\EasyAdminBundle::class => ['all' => true],
Lc\SovBundle\LcSovBundle::class => ['all' => true],
Lc\PietroBundle\LcPietroBundle::class => ['all' => true],
Symfony\WebpackEncoreBundle\WebpackEncoreBundle::class => ['all' => true],
Knp\Bundle\PaginatorBundle\KnpPaginatorBundle::class => ['all' => true],
Welp\MailchimpBundle\WelpMailchimpBundle::class => ['all' => true],

+ 2
- 27
src/Entity/Dream.php Dosyayı Görüntüle

@@ -4,16 +4,13 @@ namespace App\Entity;

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;
use Lc\PietroBundle\Model\Dream as PietroDream;

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

/**
* @ORM\Id
@@ -22,38 +19,16 @@ class Dream implements DescriptionProjectInterface, EntityInterface
*/
private $id;

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

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

public function __toString()
{
return "Nos rêves";
}

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;

+ 2
- 288
src/Entity/IndividualData.php Dosyayı Görüntüle

@@ -3,17 +3,13 @@
namespace App\Entity;

use App\Repository\IndividualDataRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Lc\SovBundle\Doctrine\EntityInterface;
use Lc\SovBundle\Doctrine\Extension\StatusInterface;
use Lc\SovBundle\Doctrine\Extension\StatusTrait;
use Lc\PietroBundle\Model\IndividualData as PietroIndividualData;

/**
* @ORM\Entity(repositoryClass=IndividualDataRepository::class)
*/
class IndividualData extends AbstractData
class IndividualData extends PietroIndividualData
{

/**
@@ -23,290 +19,8 @@ class IndividualData extends AbstractData
*/
private $id;

/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $firstname;

/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $lastname;

/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $email;

/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $introQuestion;

/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $introAnswer;

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

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

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

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

/**
* @ORM\ManyToOne(targetEntity=Territory::class, inversedBy="individualData")
*/
protected $territory;

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

public function getResume()
{
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 __toString()
{
return $this->firstname . " " . $this->lastname;
}

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

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

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

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

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|Revolt[]
*/
public function getRevolt(): Collection
{
return $this->revolt;
}

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

return $this;
}

public function removeRevolt(Revolt $revolt): self
{
if ($this->revolt->removeElement($revolt)) {
// set the owning side to null (unless already changed)
if ($revolt->getIndividualData() === $this) {
$revolt->setIndividualData(null);
}
}

return $this;
}

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

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

return $this;
}

public function removeDream(Dream $dream): self
{
if ($this->dream->removeElement($dream)) {
// set the owning side to null (unless already changed)
if ($dream->getIndividualData() === $this) {
$dream->setIndividualData(null);
}
}

return $this;
}

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

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

return $this;
}

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

return $this;
}

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

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

return $this;
}

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

return $this;
}

public function getTerritory(): ?Territory
{
return $this->territory;
}

public function setTerritory(?Territory $territory): self
{
$this->territory = $territory;

return $this;
}
}

+ 2
- 23
src/Entity/ProjectBoost.php Dosyayı Görüntüle

@@ -4,17 +4,13 @@ namespace App\Entity;

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;
use Lc\PietroBundle\Model\ProjectBoost as PietroProjectBoost;

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

/**
* @ORM\Id
* @ORM\GeneratedValue
@@ -22,11 +18,6 @@ class ProjectBoost implements DescriptionProjectInterface, EntityInterface
*/
private $id;

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

/**
* @ORM\ManyToOne(targetEntity=CollectifData::class, inversedBy="projectBoost")
*/
@@ -42,18 +33,6 @@ class ProjectBoost implements DescriptionProjectInterface, EntityInterface
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;

+ 2
- 27
src/Entity/ProjectInspiring.php Dosyayı Görüntüle

@@ -4,16 +4,13 @@ namespace App\Entity;

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;
use Lc\PietroBundle\Model\ProjectInspiring as PietroProjectInspiring;

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

/**
* @ORM\Id
@@ -22,38 +19,16 @@ class ProjectInspiring implements DescriptionProjectInterface, EntityInterface
*/
private $id;

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

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

public function __toString()
{
return "Les actions inspirantes";
}

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;

+ 2
- 23
src/Entity/Revolt.php Dosyayı Görüntüle

@@ -4,17 +4,13 @@ namespace App\Entity;

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;
use Lc\PietroBundle\Model\Revolt as PietroRevolt;

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

/**
* @ORM\Id
* @ORM\GeneratedValue
@@ -22,11 +18,6 @@ class Revolt implements DescriptionProjectInterface, EntityInterface
*/
private $id;

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

/**
* @ORM\ManyToOne(targetEntity=CollectifData::class, inversedBy="revolt")
*/
@@ -42,18 +33,6 @@ class Revolt implements DescriptionProjectInterface, EntityInterface
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;

+ 2
- 41
src/Entity/Subthematic.php Dosyayı Görüntüle

@@ -4,12 +4,12 @@ namespace App\Entity;

use App\Repository\SubthematicRepository;
use Doctrine\ORM\Mapping as ORM;
use Lc\SovBundle\Doctrine\EntityInterface;
use Lc\PietroBundle\Model\Subthematic as PietroSubthematic;

/**
* @ORM\Entity(repositoryClass=SubthematicRepository::class)
*/
class Subthematic implements EntityInterface
class Subthematic extends PietroSubthematic
{
/**
* @ORM\Id
@@ -18,47 +18,8 @@ class Subthematic implements EntityInterface
*/
private $id;

/**
* @ORM\Column(type="string", length=255)
*/
private $name;

/**
* @ORM\ManyToOne(targetEntity=Thematic::class, inversedBy="subthematic")
*/
private $thematic;

public function __toString()
{
return $this->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;
}

public function getThematic(): ?Thematic
{
return $this->thematic;
}

public function setThematic(?Thematic $thematic): self
{
$this->thematic = $thematic;

return $this;
}
}

+ 3
- 75
src/Entity/Territory.php Dosyayı Görüntüle

@@ -6,17 +6,13 @@ use App\Repository\TerritoryRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Lc\SovBundle\Doctrine\EntityInterface;
use Lc\SovBundle\Doctrine\Extension\DevAliasInterface;
use Lc\SovBundle\Doctrine\Extension\DevAliasTrait;
use Lc\PietroBundle\Model\Territory as PietroTerritory;

/**
* @ORM\Entity(repositoryClass=TerritoryRepository::class)
*/
class Territory implements EntityInterface, DevAliasInterface
class Territory extends PietroTerritory
{
use DevAliasTrait;

/**
* @ORM\Id
* @ORM\GeneratedValue
@@ -24,16 +20,6 @@ class Territory implements EntityInterface, DevAliasInterface
*/
private $id;

/**
* @ORM\Column(type="string", length=255)
*/
private $name;

/**
* @ORM\OneToMany(targetEntity=IndividualData::class, mappedBy="territory")
*/
private $individualData;

/**
* @ORM\OneToMany(targetEntity=CollectifData::class, mappedBy="territory")
*/
@@ -41,13 +27,8 @@ class Territory implements EntityInterface, DevAliasInterface

public function __construct()
{
parent::__construct();
$this->collectifData = new ArrayCollection();
$this->individualData = new ArrayCollection();
}

public function __toString()
{
return $this->name;
}

public function getId(): ?int
@@ -55,30 +36,6 @@ class Territory implements EntityInterface, DevAliasInterface
return $this->id;
}

public function getName(): ?string
{
return $this->name;
}

public function setName(string $name): self
{
$this->name = $name;

return $this;
}

public function getIndividualData(): ?Collection
{
return $this->individualData;
}

public function setIndividualData(?IndividualData $individualData): self
{
$this->individualData = $individualData;

return $this;
}

/**
* @return Collection|CollectifData[]
*/
@@ -109,33 +66,4 @@ class Territory implements EntityInterface, DevAliasInterface
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;
}
}

+ 2
- 66
src/Entity/Thematic.php Dosyayı Görüntüle

@@ -3,15 +3,13 @@
namespace App\Entity;

use App\Repository\ThematicRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Lc\SovBundle\Doctrine\EntityInterface;
use Lc\PietroBundle\Model\Thematic as PietroThematic;

/**
* @ORM\Entity(repositoryClass=ThematicRepository::class)
*/
class Thematic implements EntityInterface
class Thematic extends PietroThematic
{
/**
* @ORM\Id
@@ -20,71 +18,9 @@ class Thematic implements EntityInterface
*/
private $id;

/**
* @ORM\Column(type="string", length=255)
*/
private $name;

/**
* @ORM\OneToMany(targetEntity=Subthematic::class, mappedBy="thematic", cascade={"persist", "remove"})
*/
private $subthematic;


public function __construct()
{
$this->subthematic = new ArrayCollection();
}

public function __toString()
{
return $this->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;
}

/**
* @return Collection|Subthematic[]
*/
public function getSubthematic(): Collection
{
return $this->subthematic;
}

public function addSubthematic(Subthematic $subthematic): self
{
if (!$this->subthematic->contains($subthematic)) {
$this->subthematic[] = $subthematic;
$subthematic->setThematic($this);
}

return $this;
}

public function removeSubthematic(Subthematic $subthematic): self
{
if ($this->subthematic->removeElement($subthematic)) {
// set the owning side to null (unless already changed)
if ($subthematic->getThematic() === $this) {
$subthematic->setThematic(null);
}
}

return $this;
}
}

Yükleniyor…
İptal
Kaydet