@@ -0,0 +1,39 @@ | |||
<?php | |||
namespace Lc\PietroBundle\Container\Dream; | |||
use Lc\PietroBundle\Factory\Dream\DreamFactory; | |||
use Lc\PietroBundle\Repository\Dream\DreamRepositoryQuery; | |||
use Lc\PietroBundle\Repository\Dream\DreamStore; | |||
class DreamContainer | |||
{ | |||
protected DreamFactory $factory; | |||
protected DreamRepositoryQuery $repositoryQuery; | |||
protected DreamStore $store; | |||
public function __construct( | |||
DreamFactory $factory, | |||
DreamRepositoryQuery $repositoryQuery, | |||
DreamStore $store | |||
) { | |||
$this->factory = $factory; | |||
$this->repositoryQuery = $repositoryQuery; | |||
$this->store = $store; | |||
} | |||
public function getFactory(): DreamFactory | |||
{ | |||
return $this->factory; | |||
} | |||
public function getRepositoryQuery(): DreamRepositoryQuery | |||
{ | |||
return $this->repositoryQuery; | |||
} | |||
public function getStore(): DreamStore | |||
{ | |||
return $this->store; | |||
} | |||
} |
@@ -0,0 +1,39 @@ | |||
<?php | |||
namespace Lc\PietroBundle\Container\IndividualData; | |||
use Lc\PietroBundle\Factory\IndividualData\IndividualDataFactory; | |||
use Lc\PietroBundle\Repository\IndividualData\IndividualDataRepositoryQuery; | |||
use Lc\PietroBundle\Repository\IndividualData\IndividualDataStore; | |||
class IndividualDataContainer | |||
{ | |||
protected IndividualDataFactory $factory; | |||
protected IndividualDataRepositoryQuery $repositoryQuery; | |||
protected IndividualDataStore $store; | |||
public function __construct( | |||
IndividualDataFactory $factory, | |||
IndividualDataRepositoryQuery $repositoryQuery, | |||
IndividualDataStore $store | |||
) { | |||
$this->factory = $factory; | |||
$this->repositoryQuery = $repositoryQuery; | |||
$this->store = $store; | |||
} | |||
public function getFactory(): IndividualDataFactory | |||
{ | |||
return $this->factory; | |||
} | |||
public function getRepositoryQuery(): IndividualDataRepositoryQuery | |||
{ | |||
return $this->repositoryQuery; | |||
} | |||
public function getStore(): IndividualDataStore | |||
{ | |||
return $this->store; | |||
} | |||
} |
@@ -0,0 +1,39 @@ | |||
<?php | |||
namespace Lc\PietroBundle\Container\ProjectBoost; | |||
use Lc\PietroBundle\Factory\ProjectBoost\ProjectBoostFactory; | |||
use Lc\PietroBundle\Repository\ProjectBoost\ProjectBoostRepositoryQuery; | |||
use Lc\PietroBundle\Repository\ProjectBoost\ProjectBoostStore; | |||
class ProjectBoostContainer | |||
{ | |||
protected ProjectBoostFactory $factory; | |||
protected ProjectBoostRepositoryQuery $repositoryQuery; | |||
protected ProjectBoostStore $store; | |||
public function __construct( | |||
ProjectBoostFactory $factory, | |||
ProjectBoostRepositoryQuery $repositoryQuery, | |||
ProjectBoostStore $store | |||
) { | |||
$this->factory = $factory; | |||
$this->repositoryQuery = $repositoryQuery; | |||
$this->store = $store; | |||
} | |||
public function getFactory(): ProjectBoostFactory | |||
{ | |||
return $this->factory; | |||
} | |||
public function getRepositoryQuery(): ProjectBoostRepositoryQuery | |||
{ | |||
return $this->repositoryQuery; | |||
} | |||
public function getStore(): ProjectBoostStore | |||
{ | |||
return $this->store; | |||
} | |||
} |
@@ -0,0 +1,39 @@ | |||
<?php | |||
namespace Lc\PietroBundle\Container\ProjectInspiring; | |||
use Lc\PietroBundle\Factory\ProjectInspiring\ProjectInspiringFactory; | |||
use Lc\PietroBundle\Repository\ProjectInspiring\ProjectInspiringRepositoryQuery; | |||
use Lc\PietroBundle\Repository\ProjectInspiring\ProjectInspiringStore; | |||
class ProjectInspiringContainer | |||
{ | |||
protected ProjectInspiringFactory $factory; | |||
protected ProjectInspiringRepositoryQuery $repositoryQuery; | |||
protected ProjectInspiringStore $store; | |||
public function __construct( | |||
ProjectInspiringFactory $factory, | |||
ProjectInspiringRepositoryQuery $repositoryQuery, | |||
ProjectInspiringStore $store | |||
) { | |||
$this->factory = $factory; | |||
$this->repositoryQuery = $repositoryQuery; | |||
$this->store = $store; | |||
} | |||
public function getFactory(): ProjectInspiringFactory | |||
{ | |||
return $this->factory; | |||
} | |||
public function getRepositoryQuery(): ProjectInspiringRepositoryQuery | |||
{ | |||
return $this->repositoryQuery; | |||
} | |||
public function getStore(): ProjectInspiringStore | |||
{ | |||
return $this->store; | |||
} | |||
} |
@@ -0,0 +1,39 @@ | |||
<?php | |||
namespace Lc\PietroBundle\Container\Revolt; | |||
use Lc\PietroBundle\Factory\Revolt\RevoltFactory; | |||
use Lc\PietroBundle\Repository\Revolt\RevoltRepositoryQuery; | |||
use Lc\PietroBundle\Repository\Revolt\RevoltStore; | |||
class RevoltContainer | |||
{ | |||
protected RevoltFactory $factory; | |||
protected RevoltRepositoryQuery $repositoryQuery; | |||
protected RevoltStore $store; | |||
public function __construct( | |||
RevoltFactory $factory, | |||
RevoltRepositoryQuery $repositoryQuery, | |||
RevoltStore $store | |||
) { | |||
$this->factory = $factory; | |||
$this->repositoryQuery = $repositoryQuery; | |||
$this->store = $store; | |||
} | |||
public function getFactory(): RevoltFactory | |||
{ | |||
return $this->factory; | |||
} | |||
public function getRepositoryQuery(): RevoltRepositoryQuery | |||
{ | |||
return $this->repositoryQuery; | |||
} | |||
public function getStore(): RevoltStore | |||
{ | |||
return $this->store; | |||
} | |||
} |
@@ -0,0 +1,39 @@ | |||
<?php | |||
namespace Lc\PietroBundle\Container\Subthematic; | |||
use Lc\PietroBundle\Factory\Subthematic\SubthematicFactory; | |||
use Lc\PietroBundle\Repository\Subthematic\SubthematicRepositoryQuery; | |||
use Lc\PietroBundle\Repository\Subthematic\SubthematicStore; | |||
class SubthematicContainer | |||
{ | |||
protected SubthematicFactory $factory; | |||
protected SubthematicRepositoryQuery $repositoryQuery; | |||
protected SubthematicStore $store; | |||
public function __construct( | |||
SubthematicFactory $factory, | |||
SubthematicRepositoryQuery $repositoryQuery, | |||
SubthematicStore $store | |||
) { | |||
$this->factory = $factory; | |||
$this->repositoryQuery = $repositoryQuery; | |||
$this->store = $store; | |||
} | |||
public function getFactory(): SubthematicFactory | |||
{ | |||
return $this->factory; | |||
} | |||
public function getRepositoryQuery(): SubthematicRepositoryQuery | |||
{ | |||
return $this->repositoryQuery; | |||
} | |||
public function getStore(): SubthematicStore | |||
{ | |||
return $this->store; | |||
} | |||
} |
@@ -0,0 +1,39 @@ | |||
<?php | |||
namespace Lc\PietroBundle\Container\Territory; | |||
use Lc\PietroBundle\Factory\Territory\TerritoryFactory; | |||
use Lc\PietroBundle\Repository\Territory\TerritoryRepositoryQuery; | |||
use Lc\PietroBundle\Repository\Territory\TerritoryStore; | |||
class TerritoryContainer | |||
{ | |||
protected TerritoryFactory $factory; | |||
protected TerritoryRepositoryQuery $repositoryQuery; | |||
protected TerritoryStore $store; | |||
public function __construct( | |||
TerritoryFactory $factory, | |||
TerritoryRepositoryQuery $repositoryQuery, | |||
TerritoryStore $store | |||
) { | |||
$this->factory = $factory; | |||
$this->repositoryQuery = $repositoryQuery; | |||
$this->store = $store; | |||
} | |||
public function getFactory(): TerritoryFactory | |||
{ | |||
return $this->factory; | |||
} | |||
public function getRepositoryQuery(): TerritoryRepositoryQuery | |||
{ | |||
return $this->repositoryQuery; | |||
} | |||
public function getStore(): TerritoryStore | |||
{ | |||
return $this->store; | |||
} | |||
} |
@@ -0,0 +1,39 @@ | |||
<?php | |||
namespace Lc\PietroBundle\Container\Thematic; | |||
use Lc\PietroBundle\Factory\Thematic\ThematicFactory; | |||
use Lc\PietroBundle\Repository\Thematic\ThematicRepositoryQuery; | |||
use Lc\PietroBundle\Repository\Thematic\ThematicStore; | |||
class ThematicContainer | |||
{ | |||
protected ThematicFactory $factory; | |||
protected ThematicRepositoryQuery $repositoryQuery; | |||
protected ThematicStore $store; | |||
public function __construct( | |||
ThematicFactory $factory, | |||
ThematicRepositoryQuery $repositoryQuery, | |||
ThematicStore $store | |||
) { | |||
$this->factory = $factory; | |||
$this->repositoryQuery = $repositoryQuery; | |||
$this->store = $store; | |||
} | |||
public function getFactory(): ThematicFactory | |||
{ | |||
return $this->factory; | |||
} | |||
public function getRepositoryQuery(): ThematicRepositoryQuery | |||
{ | |||
return $this->repositoryQuery; | |||
} | |||
public function getStore(): ThematicStore | |||
{ | |||
return $this->store; | |||
} | |||
} |
@@ -4,10 +4,11 @@ namespace Lc\PietroBundle\Controller\IndividualData; | |||
use App\Entity\Configuration; | |||
use App\Entity\IndividualData; | |||
use App\Type\DreamType; | |||
use App\Type\ProjectBoostType; | |||
use App\Type\ProjectInspiringType; | |||
use App\Type\RevoltType; | |||
use Lc\PietroBundle\Container\IndividualData\IndividualDataContainer; | |||
use Lc\PietroBundle\Form\Dream\DreamType; | |||
use Lc\PietroBundle\Form\ProjectBoost\ProjectBoostType; | |||
use Lc\PietroBundle\Form\ProjectInspiring\ProjectInspiringType; | |||
use Lc\PietroBundle\Form\Revolt\RevoltType; | |||
use Doctrine\ORM\EntityManagerInterface; | |||
use Doctrine\ORM\QueryBuilder; | |||
use EasyCorp\Bundle\EasyAdminBundle\Collection\FieldCollection; | |||
@@ -51,6 +52,13 @@ abstract class IndividualDataAdminController extends AbstractAdminController | |||
$this->projectInspiringStore = $projectInspiringStore; | |||
} | |||
public function createEntity(string $entityFqcn) | |||
{ | |||
return $this->get(IndividualDataContainer::class) | |||
->getFactory() | |||
->create(); | |||
} | |||
public static function getEntityFqcn(): string | |||
{ | |||
return IndividualData::class; |
@@ -2,8 +2,8 @@ | |||
namespace Lc\PietroBundle\Doctrine\Extension; | |||
use Lc\PietroBundle\Model\ThematicInterface; | |||
use Lc\PietroBundle\Model\SubthematicInterface; | |||
use Lc\PietroBundle\Model\Thematic\ThematicInterface; | |||
use Lc\PietroBundle\Model\Subthematic\SubthematicInterface; | |||
use Doctrine\ORM\Mapping as ORM; | |||
trait DescriptionProjectTrait | |||
@@ -12,17 +12,17 @@ trait DescriptionProjectTrait | |||
/** | |||
* @ORM\Column(type="text") | |||
*/ | |||
private $description; | |||
protected $description; | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\PietroBundle\Model\ThematicInterface") | |||
* @ORM\ManyToOne(targetEntity="Lc\PietroBundle\Model\Thematic\ThematicInterface") | |||
*/ | |||
private $thematic; | |||
protected $thematic; | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\PietroBundle\Model\SubthematicInterface") | |||
* @ORM\ManyToOne(targetEntity="Lc\PietroBundle\Model\Subthematic\SubthematicInterface") | |||
*/ | |||
private $subthematic; | |||
protected $subthematic; | |||
public function getDescription(): ?string | |||
{ |
@@ -0,0 +1,17 @@ | |||
<?php | |||
namespace Lc\PietroBundle\Factory\Dream; | |||
use App\Entity\Dream; | |||
use Lc\PietroBundle\Model\DreamInterface; | |||
class DreamFactory | |||
{ | |||
public function create(): DreamInterface | |||
{ | |||
$dream = new Dream(); | |||
return $dream; | |||
} | |||
} |
@@ -0,0 +1,17 @@ | |||
<?php | |||
namespace Lc\PietroBundle\Factory\IndividualData; | |||
use App\Entity\IndividualData; | |||
use Lc\PietroBundle\Model\IndividualDataInterface; | |||
class IndividualDataFactory | |||
{ | |||
public function create(): IndividualDataInterface | |||
{ | |||
$individualData = new IndividualData(); | |||
return $individualData; | |||
} | |||
} |
@@ -0,0 +1,17 @@ | |||
<?php | |||
namespace Lc\PietroBundle\Factory\ProjectBoost; | |||
use App\Entity\ProjectBoost; | |||
use Lc\PietroBundle\Model\ProjectBoostInterface; | |||
class ProjectBoostFactory | |||
{ | |||
public function create(): ProjectBoostInterface | |||
{ | |||
$projectBoost = new ProjectBoost(); | |||
return $projectBoost; | |||
} | |||
} |
@@ -0,0 +1,17 @@ | |||
<?php | |||
namespace Lc\PietroBundle\Factory\ProjectInspiring; | |||
use App\Entity\ProjectInspiring; | |||
use Lc\PietroBundle\Model\ProjectInspiringInterface; | |||
class ProjectInspiringFactory | |||
{ | |||
public function create(): ProjectInspiringInterface | |||
{ | |||
$projectInspiring = new ProjectInspiring(); | |||
return $projectInspiring; | |||
} | |||
} |
@@ -0,0 +1,17 @@ | |||
<?php | |||
namespace Lc\PietroBundle\Factory\Revolt; | |||
use App\Entity\Revolt; | |||
use Lc\PietroBundle\Model\RevoltInterface; | |||
class RevoltFactory | |||
{ | |||
public function create(): RevoltInterface | |||
{ | |||
$revolt = new Revolt(); | |||
return $revolt; | |||
} | |||
} |
@@ -0,0 +1,17 @@ | |||
<?php | |||
namespace Lc\PietroBundle\Factory\Subthematic; | |||
use App\Entity\Subthematic; | |||
use Lc\PietroBundle\Model\SubthematicInterface; | |||
class SubthematicFactory | |||
{ | |||
public function create(): SubthematicInterface | |||
{ | |||
$subthematic = new Subthematic(); | |||
return $subthematic; | |||
} | |||
} |
@@ -0,0 +1,17 @@ | |||
<?php | |||
namespace Lc\PietroBundle\Factory\Territory; | |||
use App\Entity\Territory; | |||
use Lc\PietroBundle\Model\TerritoryInterface; | |||
class TerritoryFactory | |||
{ | |||
public function create(): TerritoryInterface | |||
{ | |||
$territory = new Territory(); | |||
return $territory; | |||
} | |||
} |
@@ -0,0 +1,17 @@ | |||
<?php | |||
namespace Lc\PietroBundle\Factory\Thematic; | |||
use App\Entity\Thematic; | |||
use Lc\PietroBundle\Model\ThematicInterface; | |||
class ThematicFactory | |||
{ | |||
public function create(): ThematicInterface | |||
{ | |||
$thematic = new Thematic(); | |||
return $thematic; | |||
} | |||
} |
@@ -2,7 +2,7 @@ | |||
namespace Lc\PietroBundle\Form\Dream; | |||
use Lc\PietroBundle\Model\DreamModel; | |||
use Lc\PietroBundle\Model\Dream; | |||
use Lc\PietroBundle\Model\Subthematic; | |||
use Lc\PietroBundle\Model\Thematic; | |||
use Lc\SovBundle\Doctrine\EntityManager; | |||
@@ -82,7 +82,7 @@ class DreamType extends AbstractType | |||
{ | |||
$resolver->setDefaults( | |||
[ | |||
'data_class' => $this->em->getEntityName(DreamModel::class), | |||
'data_class' => $this->em->getEntityName(Dream::class), | |||
'context' => 'backend' | |||
] | |||
); |
@@ -1,22 +1,23 @@ | |||
<?php | |||
namespace Lc\PietroBundle\Model; | |||
namespace Lc\PietroBundle\Model\Dream; | |||
use Doctrine\ORM\Mapping as ORM; | |||
use Lc\PietroBundle\Doctrine\Extension\DescriptionProjectInterface; | |||
use Lc\PietroBundle\Doctrine\Extension\DescriptionProjectTrait; | |||
use Lc\PietroBundle\Model\IndividualData\IndividualDataInterface; | |||
/** | |||
* @ORM\MappedSuperclass() | |||
*/ | |||
abstract class DreamModel implements DescriptionProjectInterface, DreamInterface | |||
abstract class Dream implements DescriptionProjectInterface, DreamInterface | |||
{ | |||
use DescriptionProjectTrait; | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\PietroBundle\Model\IndividualDataInterface", inversedBy="dream") | |||
* @ORM\ManyToOne(targetEntity="Lc\PietroBundle\Model\IndividualData\IndividualDataInterface", inversedBy="dream") | |||
*/ | |||
private $individualData; | |||
protected $individualData; | |||
public function __toString() |
@@ -0,0 +1,8 @@ | |||
<?php | |||
namespace Lc\PietroBundle\Model\Dream; | |||
interface DreamInterface | |||
{ | |||
} |
@@ -1,8 +0,0 @@ | |||
<?php | |||
namespace Lc\PietroBundle\Model; | |||
interface DreamInterface | |||
{ | |||
} |
@@ -1,10 +1,16 @@ | |||
<?php | |||
namespace Lc\PietroBundle\Model; | |||
namespace Lc\PietroBundle\Model\IndividualData; | |||
use Doctrine\Common\Collections\ArrayCollection; | |||
use Doctrine\Common\Collections\Collection; | |||
use Doctrine\ORM\Mapping as ORM; | |||
use Lc\PietroBundle\Model\AbstractData; | |||
use Lc\PietroBundle\Model\Dream\DreamInterface; | |||
use Lc\PietroBundle\Model\ProjectBoost\ProjectBoostInterface; | |||
use Lc\PietroBundle\Model\ProjectInspiring\ProjectInspiringInterface; | |||
use Lc\PietroBundle\Model\Revolt\RevoltInterface; | |||
use Lc\PietroBundle\Model\Territory\TerritoryInterface; | |||
/** | |||
* @ORM\MappedSuperclass() | |||
@@ -15,50 +21,50 @@ abstract class IndividualData extends AbstractData implements IndividualDataInte | |||
/** | |||
* @ORM\Column(type="string", length=255, nullable=true) | |||
*/ | |||
private $firstname; | |||
protected $firstname; | |||
/** | |||
* @ORM\Column(type="string", length=255, nullable=true) | |||
*/ | |||
private $lastname; | |||
protected $lastname; | |||
/** | |||
* @ORM\Column(type="string", length=255, nullable=true) | |||
*/ | |||
private $email; | |||
protected $email; | |||
/** | |||
* @ORM\Column(type="string", length=255, nullable=true) | |||
*/ | |||
private $introQuestion; | |||
protected $introQuestion; | |||
/** | |||
* @ORM\Column(type="string", length=255, nullable=true) | |||
*/ | |||
private $introAnswer; | |||
protected $introAnswer; | |||
/** | |||
* @ORM\OneToMany(targetEntity="Lc\PietroBundle\Model\RevoltInterface", mappedBy="individualData", cascade={"persist", "remove"}) | |||
* @ORM\OneToMany(targetEntity="Lc\PietroBundle\Model\Revolt\RevoltInterface", mappedBy="individualData", cascade={"persist", "remove"}) | |||
*/ | |||
protected $revolt; | |||
/** | |||
* @ORM\OneToMany(targetEntity="Lc\PietroBundle\Model\DreamInterface", mappedBy="individualData", cascade={"persist", "remove"}) | |||
* @ORM\OneToMany(targetEntity="Lc\PietroBundle\Model\Dream\DreamInterface", mappedBy="individualData", cascade={"persist", "remove"}) | |||
*/ | |||
protected $dream; | |||
/** | |||
* @ORM\OneToMany(targetEntity="Lc\PietroBundle\Model\ProjectBoostInterface", mappedBy="individualData", cascade={"persist", "remove"}) | |||
* @ORM\OneToMany(targetEntity="Lc\PietroBundle\Model\ProjectBoost\ProjectBoostInterface", mappedBy="individualData", cascade={"persist", "remove"}) | |||
*/ | |||
protected $projectBoost; | |||
/** | |||
* @ORM\OneToMany(targetEntity="Lc\PietroBundle\Model\ProjectInspiringInterface", mappedBy="individualData", cascade={"persist", "remove"}) | |||
* @ORM\OneToMany(targetEntity="Lc\PietroBundle\Model\ProjectInspiring\ProjectInspiringInterface", mappedBy="individualData", cascade={"persist", "remove"}) | |||
*/ | |||
protected $projectInspiring; | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\PietroBundle\Model\TerritoryInterface", inversedBy="individualData") | |||
* @ORM\ManyToOne(targetEntity="Lc\PietroBundle\Model\Territory\TerritoryInterface", inversedBy="individualData") | |||
*/ | |||
protected $territory; | |||
@@ -0,0 +1,8 @@ | |||
<?php | |||
namespace Lc\PietroBundle\Model\IndividualData; | |||
interface IndividualDataInterface | |||
{ | |||
} |
@@ -1,8 +0,0 @@ | |||
<?php | |||
namespace Lc\PietroBundle\Model; | |||
interface IndividualDataInterface | |||
{ | |||
} |
@@ -1,10 +1,11 @@ | |||
<?php | |||
namespace Lc\PietroBundle\Model; | |||
namespace Lc\PietroBundle\Model\ProjectBoost; | |||
use Doctrine\ORM\Mapping as ORM; | |||
use Lc\PietroBundle\Doctrine\Extension\DescriptionProjectInterface; | |||
use Lc\PietroBundle\Doctrine\Extension\DescriptionProjectTrait; | |||
use Lc\PietroBundle\Model\IndividualData\IndividualData; | |||
/** | |||
* @ORM\MappedSuperclass() | |||
@@ -14,9 +15,9 @@ abstract class ProjectBoost implements DescriptionProjectInterface, ProjectBoost | |||
use DescriptionProjectTrait; | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\PietroBundle\Model\IndividualDataInterface", inversedBy="projectBoost") | |||
* @ORM\ManyToOne(targetEntity="Lc\PietroBundle\Model\IndividualData\IndividualDataInterface", inversedBy="projectBoost") | |||
*/ | |||
private $individualData; | |||
protected $individualData; | |||
public function __toString() | |||
{ |
@@ -0,0 +1,8 @@ | |||
<?php | |||
namespace Lc\PietroBundle\Model\ProjectBoost; | |||
interface ProjectBoostInterface | |||
{ | |||
} |
@@ -1,8 +0,0 @@ | |||
<?php | |||
namespace Lc\PietroBundle\Model; | |||
interface ProjectBoostInterface | |||
{ | |||
} |
@@ -1,10 +1,11 @@ | |||
<?php | |||
namespace Lc\PietroBundle\Model; | |||
namespace Lc\PietroBundle\Model\ProjectInspiring; | |||
use Doctrine\ORM\Mapping as ORM; | |||
use Lc\PietroBundle\Doctrine\Extension\DescriptionProjectInterface; | |||
use Lc\PietroBundle\Doctrine\Extension\DescriptionProjectTrait; | |||
use Lc\PietroBundle\Model\IndividualData\IndividualDataInterface; | |||
/** | |||
* @ORM\MappedSuperclass() | |||
@@ -14,9 +15,9 @@ abstract class ProjectInspiring implements DescriptionProjectInterface, ProjectI | |||
use DescriptionProjectTrait; | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\PietroBundle\Model\IndividualDataInterface", inversedBy="projectInspiring") | |||
* @ORM\ManyToOne(targetEntity="Lc\PietroBundle\Model\IndividualData\IndividualDataInterface", inversedBy="projectInspiring") | |||
*/ | |||
private $individualData; | |||
protected $individualData; | |||
public function __toString() |
@@ -0,0 +1,8 @@ | |||
<?php | |||
namespace Lc\PietroBundle\Model\ProjectInspiring; | |||
interface ProjectInspiringInterface | |||
{ | |||
} |
@@ -1,8 +0,0 @@ | |||
<?php | |||
namespace Lc\PietroBundle\Model; | |||
interface ProjectInspiringInterface | |||
{ | |||
} |
@@ -1,10 +1,11 @@ | |||
<?php | |||
namespace Lc\PietroBundle\Model; | |||
namespace Lc\PietroBundle\Model\Revolt; | |||
use Doctrine\ORM\Mapping as ORM; | |||
use Lc\PietroBundle\Doctrine\Extension\DescriptionProjectInterface; | |||
use Lc\PietroBundle\Doctrine\Extension\DescriptionProjectTrait; | |||
use Lc\PietroBundle\Model\IndividualData\IndividualDataInterface; | |||
/** | |||
* @ORM\MappedSuperclass() | |||
@@ -14,9 +15,9 @@ abstract class Revolt implements DescriptionProjectInterface, RevoltInterface | |||
use DescriptionProjectTrait; | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\PietroBundle\Model\IndividualDataInterface", inversedBy="revolt") | |||
* @ORM\ManyToOne(targetEntity="Lc\PietroBundle\Model\IndividualData\IndividualDataInterface", inversedBy="revolt") | |||
*/ | |||
private $individualData; | |||
protected $individualData; | |||
public function __toString() |
@@ -0,0 +1,8 @@ | |||
<?php | |||
namespace Lc\PietroBundle\Model\Revolt; | |||
interface RevoltInterface | |||
{ | |||
} |
@@ -1,8 +0,0 @@ | |||
<?php | |||
namespace Lc\PietroBundle\Model; | |||
interface RevoltInterface | |||
{ | |||
} |
@@ -1,8 +1,9 @@ | |||
<?php | |||
namespace Lc\PietroBundle\Model; | |||
namespace Lc\PietroBundle\Model\Subthematic; | |||
use Doctrine\ORM\Mapping as ORM; | |||
use Lc\PietroBundle\Model\Thematic\ThematicInterface; | |||
/** | |||
* @ORM\MappedSuperclass() | |||
@@ -12,12 +13,12 @@ abstract class Subthematic implements SubthematicInterface | |||
/** | |||
* @ORM\Column(type="string", length=255) | |||
*/ | |||
private $name; | |||
protected $name; | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\PietroBundle\Model\ThematicInterface", inversedBy="subthematic") | |||
* @ORM\ManyToOne(targetEntity="Lc\PietroBundle\Model\Thematic\ThematicInterface", inversedBy="subthematic") | |||
*/ | |||
private $thematic; | |||
protected $thematic; | |||
public function __toString() | |||
{ |
@@ -0,0 +1,8 @@ | |||
<?php | |||
namespace Lc\PietroBundle\Model\Subthematic; | |||
interface SubthematicInterface | |||
{ | |||
} |
@@ -1,8 +0,0 @@ | |||
<?php | |||
namespace Lc\PietroBundle\Model; | |||
interface SubthematicInterface | |||
{ | |||
} |
@@ -1,10 +1,11 @@ | |||
<?php | |||
namespace Lc\PietroBundle\Model; | |||
namespace Lc\PietroBundle\Model\Territory; | |||
use Doctrine\Common\Collections\ArrayCollection; | |||
use Doctrine\Common\Collections\Collection; | |||
use Doctrine\ORM\Mapping as ORM; | |||
use Lc\PietroBundle\Model\IndividualData\IndividualDataInterface; | |||
use Lc\SovBundle\Doctrine\Extension\DevAliasInterface; | |||
use Lc\SovBundle\Doctrine\Extension\DevAliasTrait; | |||
@@ -19,12 +20,12 @@ abstract class Territory implements TerritoryInterface, DevAliasInterface | |||
/** | |||
* @ORM\Column(type="string", length=255) | |||
*/ | |||
private $name; | |||
protected $name; | |||
/** | |||
* @ORM\OneToMany(targetEntity="Lc\PietroBundle\Model\IndividualDataInterface", mappedBy="territory") | |||
* @ORM\OneToMany(targetEntity="Lc\PietroBundle\Model\IndividualData\IndividualDataInterface", mappedBy="territory") | |||
*/ | |||
private $individualData; | |||
protected $individualData; | |||
public function __construct() | |||
{ |
@@ -0,0 +1,8 @@ | |||
<?php | |||
namespace Lc\PietroBundle\Model\Territory; | |||
interface TerritoryInterface | |||
{ | |||
} |
@@ -1,8 +0,0 @@ | |||
<?php | |||
namespace Lc\PietroBundle\Model; | |||
interface TerritoryInterface | |||
{ | |||
} |
@@ -1,10 +1,11 @@ | |||
<?php | |||
namespace Lc\PietroBundle\Model; | |||
namespace Lc\PietroBundle\Model\Thematic; | |||
use Doctrine\Common\Collections\ArrayCollection; | |||
use Doctrine\Common\Collections\Collection; | |||
use Doctrine\ORM\Mapping as ORM; | |||
use Lc\PietroBundle\Model\Subthematic\SubthematicInterface; | |||
/** | |||
* @ORM\MappedSuperclass() | |||
@@ -15,12 +16,12 @@ abstract class Thematic implements ThematicInterface | |||
/** | |||
* @ORM\Column(type="string", length=255) | |||
*/ | |||
private $name; | |||
protected $name; | |||
/** | |||
* @ORM\OneToMany(targetEntity="Lc\PietroBundle\Model\SubthematicInterface", mappedBy="thematic", cascade={"persist", "remove"}) | |||
* @ORM\OneToMany(targetEntity="Lc\PietroBundle\Model\Subthematic\SubthematicInterface", mappedBy="thematic", cascade={"persist", "remove"}) | |||
*/ | |||
private $subthematic; | |||
protected $subthematic; | |||
public function __construct() |
@@ -0,0 +1,8 @@ | |||
<?php | |||
namespace Lc\PietroBundle\Model\Thematic; | |||
interface ThematicInterface | |||
{ | |||
} |
@@ -1,8 +0,0 @@ | |||
<?php | |||
namespace Lc\PietroBundle\Model; | |||
interface ThematicInterface | |||
{ | |||
} |
@@ -2,7 +2,7 @@ | |||
namespace Lc\PietroBundle\Repository\Dream; | |||
use Lc\PietroBundle\Model\DreamModel; | |||
use App\Entity\Dream; | |||
use Lc\SovBundle\Repository\AbstractRepository; | |||
use Doctrine\Persistence\ManagerRegistry; | |||
@@ -10,6 +10,6 @@ class DreamRepository extends AbstractRepository | |||
{ | |||
public function __construct(ManagerRegistry $registry) | |||
{ | |||
parent::__construct($registry, DreamModel::class); | |||
parent::__construct($registry, Dream::class); | |||
} | |||
} |
@@ -5,7 +5,7 @@ namespace Lc\PietroBundle\Repository\Dream; | |||
use Knp\Component\Pager\PaginatorInterface; | |||
use Lc\PietroBundle\Repository\Search\SearchRepositoryQuery; | |||
class DreamRepositoryQuery extends SearchRepositoryQuery implements DreamRepositoryQueryInterface | |||
class DreamRepositoryQuery extends SearchRepositoryQuery | |||
{ | |||
public function __construct(DreamRepository $repository, PaginatorInterface $paginator) | |||
{ |
@@ -1,8 +0,0 @@ | |||
<?php | |||
namespace Lc\PietroBundle\Repository\Dream; | |||
interface DreamRepositoryQueryInterface | |||
{ | |||
} |
@@ -3,29 +3,13 @@ | |||
namespace Lc\PietroBundle\Repository\Dream; | |||
use Lc\PietroBundle\Repository\Search\SearchStore; | |||
use Lc\SovBundle\Repository\RepositoryQueryInterface; | |||
class DreamStore extends SearchStore implements DreamStoreInterface | |||
class DreamStore extends SearchStore | |||
{ | |||
protected $query; | |||
public function __construct(DreamRepositoryQueryInterface $query) | |||
public function __construct(DreamRepositoryQuery $query) | |||
{ | |||
$this->query = $query; | |||
} | |||
public function orderByDefault(RepositoryQueryInterface $query): RepositoryQueryInterface | |||
{ | |||
return $query; | |||
} | |||
public function filtersDefault(RepositoryQueryInterface $query): RepositoryQueryInterface | |||
{ | |||
return $query; | |||
} | |||
public function relationsDefault(RepositoryQueryInterface $query): RepositoryQueryInterface | |||
{ | |||
return $query; | |||
} | |||
} |
@@ -1,8 +0,0 @@ | |||
<?php | |||
namespace Lc\PietroBundle\Repository\Dream; | |||
interface DreamStoreInterface | |||
{ | |||
} |
@@ -2,7 +2,7 @@ | |||
namespace Lc\PietroBundle\Repository\IndividualData; | |||
use Lc\PietroBundle\Model\IndividualData; | |||
use App\Entity\IndividualData; | |||
use Lc\SovBundle\Repository\AbstractRepository; | |||
use Doctrine\Persistence\ManagerRegistry; | |||
@@ -2,7 +2,7 @@ | |||
namespace Lc\PietroBundle\Repository\ProjectBoost; | |||
use Lc\PietroBundle\Model\ProjectBoost; | |||
use App\Entity\ProjectBoost; | |||
use Lc\SovBundle\Repository\AbstractRepository; | |||
use Doctrine\Persistence\ManagerRegistry; | |||
@@ -2,7 +2,7 @@ | |||
namespace Lc\PietroBundle\Repository\Revolt; | |||
use Lc\PietroBundle\Model\Revolt; | |||
use App\Entity\Revolt; | |||
use Lc\SovBundle\Repository\AbstractRepository; | |||
use Doctrine\Persistence\ManagerRegistry; | |||
@@ -3,7 +3,7 @@ | |||
namespace Lc\PietroBundle\Repository\Search; | |||
use Lc\PietroBundle\Model\Thematic; | |||
use Lc\PietroBundle\Model\Thematic\ThematicInterface; | |||
use Doctrine\Common\Collections\ArrayCollection; | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
use Lc\SovBundle\Repository\RepositoryQueryInterface; | |||
@@ -55,7 +55,7 @@ class SearchStore extends AbstractStore implements StoreInterface | |||
return $query->find(); | |||
} | |||
public function getByThematic(Thematic $thematic, $query = null) | |||
public function getByThematic(ThematicInterface $thematic, $query = null) | |||
{ | |||
$query = $this->createDefaultQuery($query); | |||
$query->filterByThematic(new ArrayCollection([$thematic])); |
@@ -2,7 +2,7 @@ | |||
namespace Lc\PietroBundle\Repository\Subthematic; | |||
use Lc\PietroBundle\Model\Subthematic; | |||
use App\Entity\Subthematic; | |||
use Lc\SovBundle\Repository\AbstractRepository; | |||
use Doctrine\Persistence\ManagerRegistry; | |||
@@ -2,7 +2,7 @@ | |||
namespace Lc\PietroBundle\Repository\Territory; | |||
use Lc\PietroBundle\Model\Territory; | |||
use App\Entity\Territory; | |||
use Lc\SovBundle\Repository\AbstractRepository; | |||
use Doctrine\Persistence\ManagerRegistry; | |||
@@ -2,7 +2,7 @@ | |||
namespace Lc\PietroBundle\Repository\Thematic; | |||
use Lc\PietroBundle\Model\Thematic; | |||
use App\Entity\Thematic; | |||
use Lc\SovBundle\Repository\AbstractRepository; | |||
use Doctrine\Persistence\ManagerRegistry; | |||