Browse Source

path model, container

develop
Charly 3 years ago
parent
commit
cca19a8c68
55 changed files with 595 additions and 158 deletions
  1. +39
    -0
      Container/Dream/DreamContainer.php
  2. +39
    -0
      Container/IndividualData/IndividualDataContainer.php
  3. +39
    -0
      Container/ProjectBoost/ProjectBoostContainer.php
  4. +39
    -0
      Container/ProjectInspiring/ProjectInspiringContainer.php
  5. +39
    -0
      Container/Revolt/RevoltContainer.php
  6. +39
    -0
      Container/Subthematic/SubthematicContainer.php
  7. +39
    -0
      Container/Territory/TerritoryContainer.php
  8. +39
    -0
      Container/Thematic/ThematicContainer.php
  9. +12
    -4
      Controller/IndividualData/IndividualDataAdminController.php
  10. +7
    -7
      Doctrine/Extension/DescriptionProjectTrait.php
  11. +17
    -0
      Factory/Dream/DreamFactory.php
  12. +17
    -0
      Factory/IndividualData/IndividualDataFactory.php
  13. +17
    -0
      Factory/ProjectBoost/ProjectBoostFactory.php
  14. +17
    -0
      Factory/ProjectInspiring/ProjectInspiringFactory.php
  15. +17
    -0
      Factory/Revolt/RevoltFactory.php
  16. +17
    -0
      Factory/Subthematic/SubthematicFactory.php
  17. +17
    -0
      Factory/Territory/TerritoryFactory.php
  18. +17
    -0
      Factory/Thematic/ThematicFactory.php
  19. +2
    -2
      Form/Dream/DreamType.php
  20. +5
    -4
      Model/Dream/Dream.php
  21. +8
    -0
      Model/Dream/DreamInterface.php
  22. +0
    -8
      Model/DreamInterface.php
  23. +17
    -11
      Model/IndividualData/IndividualData.php
  24. +8
    -0
      Model/IndividualData/IndividualDataInterface.php
  25. +0
    -8
      Model/IndividualDataInterface.php
  26. +4
    -3
      Model/ProjectBoost/ProjectBoost.php
  27. +8
    -0
      Model/ProjectBoost/ProjectBoostInterface.php
  28. +0
    -8
      Model/ProjectBoostInterface.php
  29. +4
    -3
      Model/ProjectInspiring/ProjectInspiring.php
  30. +8
    -0
      Model/ProjectInspiring/ProjectInspiringInterface.php
  31. +0
    -8
      Model/ProjectInspiringInterface.php
  32. +4
    -3
      Model/Revolt/Revolt.php
  33. +8
    -0
      Model/Revolt/RevoltInterface.php
  34. +0
    -8
      Model/RevoltInterface.php
  35. +5
    -4
      Model/Subthematic/Subthematic.php
  36. +8
    -0
      Model/Subthematic/SubthematicInterface.php
  37. +0
    -8
      Model/SubthematicInterface.php
  38. +5
    -4
      Model/Territory/Territory.php
  39. +8
    -0
      Model/Territory/TerritoryInterface.php
  40. +0
    -8
      Model/TerritoryInterface.php
  41. +5
    -4
      Model/Thematic/Thematic.php
  42. +8
    -0
      Model/Thematic/ThematicInterface.php
  43. +0
    -8
      Model/ThematicInterface.php
  44. +2
    -2
      Repository/Dream/DreamRepository.php
  45. +1
    -1
      Repository/Dream/DreamRepositoryQuery.php
  46. +0
    -8
      Repository/Dream/DreamRepositoryQueryInterface.php
  47. +2
    -18
      Repository/Dream/DreamStore.php
  48. +0
    -8
      Repository/Dream/DreamStoreInterface.php
  49. +1
    -1
      Repository/IndividualData/IndividualDataRepository.php
  50. +1
    -1
      Repository/ProjectBoost/ProjectBoostRepository.php
  51. +1
    -1
      Repository/Revolt/RevoltRepository.php
  52. +2
    -2
      Repository/Search/SearchStore.php
  53. +1
    -1
      Repository/Subthematic/SubthematicRepository.php
  54. +1
    -1
      Repository/Territory/TerritoryRepository.php
  55. +1
    -1
      Repository/Thematic/ThematicRepository.php

+ 39
- 0
Container/Dream/DreamContainer.php View File

<?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;
}
}

+ 39
- 0
Container/IndividualData/IndividualDataContainer.php View File

<?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;
}
}

+ 39
- 0
Container/ProjectBoost/ProjectBoostContainer.php View File

<?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;
}
}

+ 39
- 0
Container/ProjectInspiring/ProjectInspiringContainer.php View File

<?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;
}
}

+ 39
- 0
Container/Revolt/RevoltContainer.php View File

<?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;
}
}

+ 39
- 0
Container/Subthematic/SubthematicContainer.php View File

<?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;
}
}

+ 39
- 0
Container/Territory/TerritoryContainer.php View File

<?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;
}
}

+ 39
- 0
Container/Thematic/ThematicContainer.php View File

<?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;
}
}

+ 12
- 4
Controller/IndividualData/IndividualDataAdminController.php View File



use App\Entity\Configuration; use App\Entity\Configuration;
use App\Entity\IndividualData; 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\EntityManagerInterface;
use Doctrine\ORM\QueryBuilder; use Doctrine\ORM\QueryBuilder;
use EasyCorp\Bundle\EasyAdminBundle\Collection\FieldCollection; use EasyCorp\Bundle\EasyAdminBundle\Collection\FieldCollection;
$this->projectInspiringStore = $projectInspiringStore; $this->projectInspiringStore = $projectInspiringStore;
} }


public function createEntity(string $entityFqcn)
{
return $this->get(IndividualDataContainer::class)
->getFactory()
->create();
}

public static function getEntityFqcn(): string public static function getEntityFqcn(): string
{ {
return IndividualData::class; return IndividualData::class;

+ 7
- 7
Doctrine/Extension/DescriptionProjectTrait.php View File



namespace Lc\PietroBundle\Doctrine\Extension; 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; use Doctrine\ORM\Mapping as ORM;


trait DescriptionProjectTrait trait DescriptionProjectTrait
/** /**
* @ORM\Column(type="text") * @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 public function getDescription(): ?string
{ {

+ 17
- 0
Factory/Dream/DreamFactory.php View File

<?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;
}

}

+ 17
- 0
Factory/IndividualData/IndividualDataFactory.php View File

<?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;
}

}

+ 17
- 0
Factory/ProjectBoost/ProjectBoostFactory.php View File

<?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;
}

}

+ 17
- 0
Factory/ProjectInspiring/ProjectInspiringFactory.php View File

<?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;
}

}

+ 17
- 0
Factory/Revolt/RevoltFactory.php View File

<?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;
}

}

+ 17
- 0
Factory/Subthematic/SubthematicFactory.php View File

<?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;
}

}

+ 17
- 0
Factory/Territory/TerritoryFactory.php View File

<?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;
}

}

+ 17
- 0
Factory/Thematic/ThematicFactory.php View File

<?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
- 2
Form/Dream/DreamType.php View File



namespace Lc\PietroBundle\Form\Dream; namespace Lc\PietroBundle\Form\Dream;


use Lc\PietroBundle\Model\DreamModel;
use Lc\PietroBundle\Model\Dream;
use Lc\PietroBundle\Model\Subthematic; use Lc\PietroBundle\Model\Subthematic;
use Lc\PietroBundle\Model\Thematic; use Lc\PietroBundle\Model\Thematic;
use Lc\SovBundle\Doctrine\EntityManager; use Lc\SovBundle\Doctrine\EntityManager;
{ {
$resolver->setDefaults( $resolver->setDefaults(
[ [
'data_class' => $this->em->getEntityName(DreamModel::class),
'data_class' => $this->em->getEntityName(Dream::class),
'context' => 'backend' 'context' => 'backend'
] ]
); );

Model/DreamModel.php → Model/Dream/Dream.php View File

<?php <?php


namespace Lc\PietroBundle\Model;
namespace Lc\PietroBundle\Model\Dream;


use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Lc\PietroBundle\Doctrine\Extension\DescriptionProjectInterface; use Lc\PietroBundle\Doctrine\Extension\DescriptionProjectInterface;
use Lc\PietroBundle\Doctrine\Extension\DescriptionProjectTrait; use Lc\PietroBundle\Doctrine\Extension\DescriptionProjectTrait;
use Lc\PietroBundle\Model\IndividualData\IndividualDataInterface;


/** /**
* @ORM\MappedSuperclass() * @ORM\MappedSuperclass()
*/ */
abstract class DreamModel implements DescriptionProjectInterface, DreamInterface
abstract class Dream implements DescriptionProjectInterface, DreamInterface
{ {
use DescriptionProjectTrait; 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() public function __toString()

+ 8
- 0
Model/Dream/DreamInterface.php View File

<?php

namespace Lc\PietroBundle\Model\Dream;

interface DreamInterface
{

}

+ 0
- 8
Model/DreamInterface.php View File

<?php

namespace Lc\PietroBundle\Model;

interface DreamInterface
{

}

Model/IndividualData.php → Model/IndividualData/IndividualData.php View File

<?php <?php


namespace Lc\PietroBundle\Model;
namespace Lc\PietroBundle\Model\IndividualData;


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\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() * @ORM\MappedSuperclass()
/** /**
* @ORM\Column(type="string", length=255, nullable=true) * @ORM\Column(type="string", length=255, nullable=true)
*/ */
private $firstname;
protected $firstname;


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


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


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


/** /**
* @ORM\Column(type="string", length=255, nullable=true) * @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; 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; 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; 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; protected $projectInspiring;


/** /**
* @ORM\ManyToOne(targetEntity="Lc\PietroBundle\Model\TerritoryInterface", inversedBy="individualData")
* @ORM\ManyToOne(targetEntity="Lc\PietroBundle\Model\Territory\TerritoryInterface", inversedBy="individualData")
*/ */
protected $territory; protected $territory;



+ 8
- 0
Model/IndividualData/IndividualDataInterface.php View File

<?php

namespace Lc\PietroBundle\Model\IndividualData;

interface IndividualDataInterface
{

}

+ 0
- 8
Model/IndividualDataInterface.php View File

<?php

namespace Lc\PietroBundle\Model;

interface IndividualDataInterface
{

}

Model/ProjectBoost.php → Model/ProjectBoost/ProjectBoost.php View File

<?php <?php


namespace Lc\PietroBundle\Model;
namespace Lc\PietroBundle\Model\ProjectBoost;


use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Lc\PietroBundle\Doctrine\Extension\DescriptionProjectInterface; use Lc\PietroBundle\Doctrine\Extension\DescriptionProjectInterface;
use Lc\PietroBundle\Doctrine\Extension\DescriptionProjectTrait; use Lc\PietroBundle\Doctrine\Extension\DescriptionProjectTrait;
use Lc\PietroBundle\Model\IndividualData\IndividualData;


/** /**
* @ORM\MappedSuperclass() * @ORM\MappedSuperclass()
use DescriptionProjectTrait; 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() public function __toString()
{ {

+ 8
- 0
Model/ProjectBoost/ProjectBoostInterface.php View File

<?php

namespace Lc\PietroBundle\Model\ProjectBoost;

interface ProjectBoostInterface
{

}

+ 0
- 8
Model/ProjectBoostInterface.php View File

<?php

namespace Lc\PietroBundle\Model;

interface ProjectBoostInterface
{

}

Model/ProjectInspiring.php → Model/ProjectInspiring/ProjectInspiring.php View File

<?php <?php


namespace Lc\PietroBundle\Model;
namespace Lc\PietroBundle\Model\ProjectInspiring;


use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Lc\PietroBundle\Doctrine\Extension\DescriptionProjectInterface; use Lc\PietroBundle\Doctrine\Extension\DescriptionProjectInterface;
use Lc\PietroBundle\Doctrine\Extension\DescriptionProjectTrait; use Lc\PietroBundle\Doctrine\Extension\DescriptionProjectTrait;
use Lc\PietroBundle\Model\IndividualData\IndividualDataInterface;


/** /**
* @ORM\MappedSuperclass() * @ORM\MappedSuperclass()
use DescriptionProjectTrait; 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() public function __toString()

+ 8
- 0
Model/ProjectInspiring/ProjectInspiringInterface.php View File

<?php

namespace Lc\PietroBundle\Model\ProjectInspiring;

interface ProjectInspiringInterface
{

}

+ 0
- 8
Model/ProjectInspiringInterface.php View File

<?php

namespace Lc\PietroBundle\Model;

interface ProjectInspiringInterface
{

}

Model/Revolt.php → Model/Revolt/Revolt.php View File

<?php <?php


namespace Lc\PietroBundle\Model;
namespace Lc\PietroBundle\Model\Revolt;


use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Lc\PietroBundle\Doctrine\Extension\DescriptionProjectInterface; use Lc\PietroBundle\Doctrine\Extension\DescriptionProjectInterface;
use Lc\PietroBundle\Doctrine\Extension\DescriptionProjectTrait; use Lc\PietroBundle\Doctrine\Extension\DescriptionProjectTrait;
use Lc\PietroBundle\Model\IndividualData\IndividualDataInterface;


/** /**
* @ORM\MappedSuperclass() * @ORM\MappedSuperclass()
use DescriptionProjectTrait; 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() public function __toString()

+ 8
- 0
Model/Revolt/RevoltInterface.php View File

<?php

namespace Lc\PietroBundle\Model\Revolt;

interface RevoltInterface
{

}

+ 0
- 8
Model/RevoltInterface.php View File

<?php

namespace Lc\PietroBundle\Model;

interface RevoltInterface
{

}

Model/Subthematic.php → Model/Subthematic/Subthematic.php View File

<?php <?php


namespace Lc\PietroBundle\Model;
namespace Lc\PietroBundle\Model\Subthematic;


use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Lc\PietroBundle\Model\Thematic\ThematicInterface;


/** /**
* @ORM\MappedSuperclass() * @ORM\MappedSuperclass()
/** /**
* @ORM\Column(type="string", length=255) * @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() public function __toString()
{ {

+ 8
- 0
Model/Subthematic/SubthematicInterface.php View File

<?php

namespace Lc\PietroBundle\Model\Subthematic;

interface SubthematicInterface
{

}

+ 0
- 8
Model/SubthematicInterface.php View File

<?php

namespace Lc\PietroBundle\Model;

interface SubthematicInterface
{

}

Model/Territory.php → Model/Territory/Territory.php View File

<?php <?php


namespace Lc\PietroBundle\Model;
namespace Lc\PietroBundle\Model\Territory;


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\PietroBundle\Model\IndividualData\IndividualDataInterface;
use Lc\SovBundle\Doctrine\Extension\DevAliasInterface; use Lc\SovBundle\Doctrine\Extension\DevAliasInterface;
use Lc\SovBundle\Doctrine\Extension\DevAliasTrait; use Lc\SovBundle\Doctrine\Extension\DevAliasTrait;


/** /**
* @ORM\Column(type="string", length=255) * @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() public function __construct()
{ {

+ 8
- 0
Model/Territory/TerritoryInterface.php View File

<?php

namespace Lc\PietroBundle\Model\Territory;

interface TerritoryInterface
{

}

+ 0
- 8
Model/TerritoryInterface.php View File

<?php

namespace Lc\PietroBundle\Model;

interface TerritoryInterface
{

}

Model/Thematic.php → Model/Thematic/Thematic.php View File

<?php <?php


namespace Lc\PietroBundle\Model;
namespace Lc\PietroBundle\Model\Thematic;


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\PietroBundle\Model\Subthematic\SubthematicInterface;


/** /**
* @ORM\MappedSuperclass() * @ORM\MappedSuperclass()
/** /**
* @ORM\Column(type="string", length=255) * @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() public function __construct()

+ 8
- 0
Model/Thematic/ThematicInterface.php View File

<?php

namespace Lc\PietroBundle\Model\Thematic;

interface ThematicInterface
{

}

+ 0
- 8
Model/ThematicInterface.php View File

<?php

namespace Lc\PietroBundle\Model;

interface ThematicInterface
{

}

+ 2
- 2
Repository/Dream/DreamRepository.php View File



namespace Lc\PietroBundle\Repository\Dream; namespace Lc\PietroBundle\Repository\Dream;


use Lc\PietroBundle\Model\DreamModel;
use App\Entity\Dream;
use Lc\SovBundle\Repository\AbstractRepository; use Lc\SovBundle\Repository\AbstractRepository;
use Doctrine\Persistence\ManagerRegistry; use Doctrine\Persistence\ManagerRegistry;


{ {
public function __construct(ManagerRegistry $registry) public function __construct(ManagerRegistry $registry)
{ {
parent::__construct($registry, DreamModel::class);
parent::__construct($registry, Dream::class);
} }
} }

+ 1
- 1
Repository/Dream/DreamRepositoryQuery.php View File

use Knp\Component\Pager\PaginatorInterface; use Knp\Component\Pager\PaginatorInterface;
use Lc\PietroBundle\Repository\Search\SearchRepositoryQuery; use Lc\PietroBundle\Repository\Search\SearchRepositoryQuery;


class DreamRepositoryQuery extends SearchRepositoryQuery implements DreamRepositoryQueryInterface
class DreamRepositoryQuery extends SearchRepositoryQuery
{ {
public function __construct(DreamRepository $repository, PaginatorInterface $paginator) public function __construct(DreamRepository $repository, PaginatorInterface $paginator)
{ {

+ 0
- 8
Repository/Dream/DreamRepositoryQueryInterface.php View File

<?php

namespace Lc\PietroBundle\Repository\Dream;

interface DreamRepositoryQueryInterface
{

}

+ 2
- 18
Repository/Dream/DreamStore.php View File

namespace Lc\PietroBundle\Repository\Dream; namespace Lc\PietroBundle\Repository\Dream;


use Lc\PietroBundle\Repository\Search\SearchStore; use Lc\PietroBundle\Repository\Search\SearchStore;
use Lc\SovBundle\Repository\RepositoryQueryInterface;


class DreamStore extends SearchStore implements DreamStoreInterface
class DreamStore extends SearchStore
{ {
protected $query; protected $query;


public function __construct(DreamRepositoryQueryInterface $query)
public function __construct(DreamRepositoryQuery $query)
{ {
$this->query = $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;
}
} }

+ 0
- 8
Repository/Dream/DreamStoreInterface.php View File

<?php

namespace Lc\PietroBundle\Repository\Dream;

interface DreamStoreInterface
{

}

+ 1
- 1
Repository/IndividualData/IndividualDataRepository.php View File



namespace Lc\PietroBundle\Repository\IndividualData; namespace Lc\PietroBundle\Repository\IndividualData;


use Lc\PietroBundle\Model\IndividualData;
use App\Entity\IndividualData;
use Lc\SovBundle\Repository\AbstractRepository; use Lc\SovBundle\Repository\AbstractRepository;
use Doctrine\Persistence\ManagerRegistry; use Doctrine\Persistence\ManagerRegistry;



+ 1
- 1
Repository/ProjectBoost/ProjectBoostRepository.php View File



namespace Lc\PietroBundle\Repository\ProjectBoost; namespace Lc\PietroBundle\Repository\ProjectBoost;


use Lc\PietroBundle\Model\ProjectBoost;
use App\Entity\ProjectBoost;
use Lc\SovBundle\Repository\AbstractRepository; use Lc\SovBundle\Repository\AbstractRepository;
use Doctrine\Persistence\ManagerRegistry; use Doctrine\Persistence\ManagerRegistry;



+ 1
- 1
Repository/Revolt/RevoltRepository.php View File



namespace Lc\PietroBundle\Repository\Revolt; namespace Lc\PietroBundle\Repository\Revolt;


use Lc\PietroBundle\Model\Revolt;
use App\Entity\Revolt;
use Lc\SovBundle\Repository\AbstractRepository; use Lc\SovBundle\Repository\AbstractRepository;
use Doctrine\Persistence\ManagerRegistry; use Doctrine\Persistence\ManagerRegistry;



+ 2
- 2
Repository/Search/SearchStore.php View File

namespace Lc\PietroBundle\Repository\Search; namespace Lc\PietroBundle\Repository\Search;




use Lc\PietroBundle\Model\Thematic;
use Lc\PietroBundle\Model\Thematic\ThematicInterface;
use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\ArrayCollection;
use Lc\SovBundle\Repository\AbstractStore; use Lc\SovBundle\Repository\AbstractStore;
use Lc\SovBundle\Repository\RepositoryQueryInterface; use Lc\SovBundle\Repository\RepositoryQueryInterface;
return $query->find(); return $query->find();
} }


public function getByThematic(Thematic $thematic, $query = null)
public function getByThematic(ThematicInterface $thematic, $query = null)
{ {
$query = $this->createDefaultQuery($query); $query = $this->createDefaultQuery($query);
$query->filterByThematic(new ArrayCollection([$thematic])); $query->filterByThematic(new ArrayCollection([$thematic]));

+ 1
- 1
Repository/Subthematic/SubthematicRepository.php View File



namespace Lc\PietroBundle\Repository\Subthematic; namespace Lc\PietroBundle\Repository\Subthematic;


use Lc\PietroBundle\Model\Subthematic;
use App\Entity\Subthematic;
use Lc\SovBundle\Repository\AbstractRepository; use Lc\SovBundle\Repository\AbstractRepository;
use Doctrine\Persistence\ManagerRegistry; use Doctrine\Persistence\ManagerRegistry;



+ 1
- 1
Repository/Territory/TerritoryRepository.php View File



namespace Lc\PietroBundle\Repository\Territory; namespace Lc\PietroBundle\Repository\Territory;


use Lc\PietroBundle\Model\Territory;
use App\Entity\Territory;
use Lc\SovBundle\Repository\AbstractRepository; use Lc\SovBundle\Repository\AbstractRepository;
use Doctrine\Persistence\ManagerRegistry; use Doctrine\Persistence\ManagerRegistry;



+ 1
- 1
Repository/Thematic/ThematicRepository.php View File



namespace Lc\PietroBundle\Repository\Thematic; namespace Lc\PietroBundle\Repository\Thematic;


use Lc\PietroBundle\Model\Thematic;
use App\Entity\Thematic;
use Lc\SovBundle\Repository\AbstractRepository; use Lc\SovBundle\Repository\AbstractRepository;
use Doctrine\Persistence\ManagerRegistry; use Doctrine\Persistence\ManagerRegistry;



Loading…
Cancel
Save