Browse Source

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

develop
charly 3 years ago
parent
commit
3313ee3c7a
9 changed files with 18 additions and 570 deletions
  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 View File

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

+ 2
- 27
src/Entity/Dream.php View File



use App\Repository\DreamRepository; use App\Repository\DreamRepository;
use Doctrine\ORM\Mapping as ORM; 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) * @ORM\Entity(repositoryClass=DreamRepository::class)
*/ */
class Dream implements DescriptionProjectInterface, EntityInterface
class Dream extends PietroDream
{ {
use DescriptionProjectTrait;


/** /**
* @ORM\Id * @ORM\Id
*/ */
private $id; private $id;


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

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


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

public function getId(): ?int public function getId(): ?int
{ {
return $this->id; 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 public function getCollectifData(): ?CollectifData
{ {
return $this->collectifData; return $this->collectifData;

+ 2
- 288
src/Entity/IndividualData.php View File

namespace App\Entity; namespace App\Entity;


use App\Repository\IndividualDataRepository; use App\Repository\IndividualDataRepository;
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\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) * @ORM\Entity(repositoryClass=IndividualDataRepository::class)
*/ */
class IndividualData extends AbstractData
class IndividualData extends PietroIndividualData
{ {


/** /**
*/ */
private $id; 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 public function getId(): ?int
{ {
return $this->id; 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 View File



use App\Repository\ProjectBoostRepository; use App\Repository\ProjectBoostRepository;
use Doctrine\ORM\Mapping as ORM; 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) * @ORM\Entity(repositoryClass=ProjectBoostRepository::class)
*/ */
class ProjectBoost implements DescriptionProjectInterface, EntityInterface
class ProjectBoost extends PietroProjectBoost
{ {
use DescriptionProjectTrait;

/** /**
* @ORM\Id * @ORM\Id
* @ORM\GeneratedValue * @ORM\GeneratedValue
*/ */
private $id; private $id;


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

/** /**
* @ORM\ManyToOne(targetEntity=CollectifData::class, inversedBy="projectBoost") * @ORM\ManyToOne(targetEntity=CollectifData::class, inversedBy="projectBoost")
*/ */
return $this->id; 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 public function getCollectifData(): ?CollectifData
{ {
return $this->collectifData; return $this->collectifData;

+ 2
- 27
src/Entity/ProjectInspiring.php View File



use App\Repository\ProjectInspiringRepository; use App\Repository\ProjectInspiringRepository;
use Doctrine\ORM\Mapping as ORM; 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) * @ORM\Entity(repositoryClass=ProjectInspiringRepository::class)
*/ */
class ProjectInspiring implements DescriptionProjectInterface, EntityInterface
class ProjectInspiring extends PietroProjectInspiring
{ {
use DescriptionProjectTrait;


/** /**
* @ORM\Id * @ORM\Id
*/ */
private $id; private $id;


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

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


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

public function getId(): ?int public function getId(): ?int
{ {
return $this->id; 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 public function getCollectifData(): ?CollectifData
{ {
return $this->collectifData; return $this->collectifData;

+ 2
- 23
src/Entity/Revolt.php View File



use App\Repository\RevoltRepository; use App\Repository\RevoltRepository;
use Doctrine\ORM\Mapping as ORM; 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) * @ORM\Entity(repositoryClass=RevoltRepository::class)
*/ */
class Revolt implements DescriptionProjectInterface, EntityInterface
class Revolt extends PietroRevolt
{ {
use DescriptionProjectTrait;

/** /**
* @ORM\Id * @ORM\Id
* @ORM\GeneratedValue * @ORM\GeneratedValue
*/ */
private $id; private $id;


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

/** /**
* @ORM\ManyToOne(targetEntity=CollectifData::class, inversedBy="revolt") * @ORM\ManyToOne(targetEntity=CollectifData::class, inversedBy="revolt")
*/ */
return $this->id; 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 public function getCollectifData(): ?CollectifData
{ {
return $this->collectifData; return $this->collectifData;

+ 2
- 41
src/Entity/Subthematic.php View File



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


/** /**
* @ORM\Entity(repositoryClass=SubthematicRepository::class) * @ORM\Entity(repositoryClass=SubthematicRepository::class)
*/ */
class Subthematic implements EntityInterface
class Subthematic extends PietroSubthematic
{ {
/** /**
* @ORM\Id * @ORM\Id
*/ */
private $id; 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 public function getId(): ?int
{ {
return $this->id; 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 View File

use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection; use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM; 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) * @ORM\Entity(repositoryClass=TerritoryRepository::class)
*/ */
class Territory implements EntityInterface, DevAliasInterface
class Territory extends PietroTerritory
{ {
use DevAliasTrait;

/** /**
* @ORM\Id * @ORM\Id
* @ORM\GeneratedValue * @ORM\GeneratedValue
*/ */
private $id; 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") * @ORM\OneToMany(targetEntity=CollectifData::class, mappedBy="territory")
*/ */


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

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


public function getId(): ?int public function getId(): ?int
return $this->id; 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[] * @return Collection|CollectifData[]
*/ */
return $this; 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 View File

namespace App\Entity; namespace App\Entity;


use App\Repository\ThematicRepository; use App\Repository\ThematicRepository;
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\Doctrine\EntityInterface;
use Lc\PietroBundle\Model\Thematic as PietroThematic;


/** /**
* @ORM\Entity(repositoryClass=ThematicRepository::class) * @ORM\Entity(repositoryClass=ThematicRepository::class)
*/ */
class Thematic implements EntityInterface
class Thematic extends PietroThematic
{ {
/** /**
* @ORM\Id * @ORM\Id
*/ */
private $id; 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 public function getId(): ?int
{ {
return $this->id; 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;
}
} }

Loading…
Cancel
Save