Explorar el Código

path model, container

develop
Charly hace 3 años
padre
commit
cca19a8c68
Se han modificado 55 ficheros con 595 adiciones y 158 borrados
  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 Ver fichero

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

+ 39
- 0
Container/IndividualData/IndividualDataContainer.php Ver fichero

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

+ 39
- 0
Container/ProjectBoost/ProjectBoostContainer.php Ver fichero

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

+ 39
- 0
Container/ProjectInspiring/ProjectInspiringContainer.php Ver fichero

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

+ 39
- 0
Container/Revolt/RevoltContainer.php Ver fichero

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

+ 39
- 0
Container/Subthematic/SubthematicContainer.php Ver fichero

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

+ 39
- 0
Container/Territory/TerritoryContainer.php Ver fichero

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

+ 39
- 0
Container/Thematic/ThematicContainer.php Ver fichero

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

+ 12
- 4
Controller/IndividualData/IndividualDataAdminController.php Ver fichero

@@ -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;

+ 7
- 7
Doctrine/Extension/DescriptionProjectTrait.php Ver fichero

@@ -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
{

+ 17
- 0
Factory/Dream/DreamFactory.php Ver fichero

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

}

+ 17
- 0
Factory/IndividualData/IndividualDataFactory.php Ver fichero

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

}

+ 17
- 0
Factory/ProjectBoost/ProjectBoostFactory.php Ver fichero

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

}

+ 17
- 0
Factory/ProjectInspiring/ProjectInspiringFactory.php Ver fichero

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

}

+ 17
- 0
Factory/Revolt/RevoltFactory.php Ver fichero

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

}

+ 17
- 0
Factory/Subthematic/SubthematicFactory.php Ver fichero

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

}

+ 17
- 0
Factory/Territory/TerritoryFactory.php Ver fichero

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

}

+ 17
- 0
Factory/Thematic/ThematicFactory.php Ver fichero

@@ -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
- 2
Form/Dream/DreamType.php Ver fichero

@@ -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'
]
);

Model/DreamModel.php → Model/Dream/Dream.php Ver fichero

@@ -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()

+ 8
- 0
Model/Dream/DreamInterface.php Ver fichero

@@ -0,0 +1,8 @@
<?php

namespace Lc\PietroBundle\Model\Dream;

interface DreamInterface
{

}

+ 0
- 8
Model/DreamInterface.php Ver fichero

@@ -1,8 +0,0 @@
<?php

namespace Lc\PietroBundle\Model;

interface DreamInterface
{

}

Model/IndividualData.php → Model/IndividualData/IndividualData.php Ver fichero

@@ -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;


+ 8
- 0
Model/IndividualData/IndividualDataInterface.php Ver fichero

@@ -0,0 +1,8 @@
<?php

namespace Lc\PietroBundle\Model\IndividualData;

interface IndividualDataInterface
{

}

+ 0
- 8
Model/IndividualDataInterface.php Ver fichero

@@ -1,8 +0,0 @@
<?php

namespace Lc\PietroBundle\Model;

interface IndividualDataInterface
{

}

Model/ProjectBoost.php → Model/ProjectBoost/ProjectBoost.php Ver fichero

@@ -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()
{

+ 8
- 0
Model/ProjectBoost/ProjectBoostInterface.php Ver fichero

@@ -0,0 +1,8 @@
<?php

namespace Lc\PietroBundle\Model\ProjectBoost;

interface ProjectBoostInterface
{

}

+ 0
- 8
Model/ProjectBoostInterface.php Ver fichero

@@ -1,8 +0,0 @@
<?php

namespace Lc\PietroBundle\Model;

interface ProjectBoostInterface
{

}

Model/ProjectInspiring.php → Model/ProjectInspiring/ProjectInspiring.php Ver fichero

@@ -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()

+ 8
- 0
Model/ProjectInspiring/ProjectInspiringInterface.php Ver fichero

@@ -0,0 +1,8 @@
<?php

namespace Lc\PietroBundle\Model\ProjectInspiring;

interface ProjectInspiringInterface
{

}

+ 0
- 8
Model/ProjectInspiringInterface.php Ver fichero

@@ -1,8 +0,0 @@
<?php

namespace Lc\PietroBundle\Model;

interface ProjectInspiringInterface
{

}

Model/Revolt.php → Model/Revolt/Revolt.php Ver fichero

@@ -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()

+ 8
- 0
Model/Revolt/RevoltInterface.php Ver fichero

@@ -0,0 +1,8 @@
<?php

namespace Lc\PietroBundle\Model\Revolt;

interface RevoltInterface
{

}

+ 0
- 8
Model/RevoltInterface.php Ver fichero

@@ -1,8 +0,0 @@
<?php

namespace Lc\PietroBundle\Model;

interface RevoltInterface
{

}

Model/Subthematic.php → Model/Subthematic/Subthematic.php Ver fichero

@@ -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()
{

+ 8
- 0
Model/Subthematic/SubthematicInterface.php Ver fichero

@@ -0,0 +1,8 @@
<?php

namespace Lc\PietroBundle\Model\Subthematic;

interface SubthematicInterface
{

}

+ 0
- 8
Model/SubthematicInterface.php Ver fichero

@@ -1,8 +0,0 @@
<?php

namespace Lc\PietroBundle\Model;

interface SubthematicInterface
{

}

Model/Territory.php → Model/Territory/Territory.php Ver fichero

@@ -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()
{

+ 8
- 0
Model/Territory/TerritoryInterface.php Ver fichero

@@ -0,0 +1,8 @@
<?php

namespace Lc\PietroBundle\Model\Territory;

interface TerritoryInterface
{

}

+ 0
- 8
Model/TerritoryInterface.php Ver fichero

@@ -1,8 +0,0 @@
<?php

namespace Lc\PietroBundle\Model;

interface TerritoryInterface
{

}

Model/Thematic.php → Model/Thematic/Thematic.php Ver fichero

@@ -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()

+ 8
- 0
Model/Thematic/ThematicInterface.php Ver fichero

@@ -0,0 +1,8 @@
<?php

namespace Lc\PietroBundle\Model\Thematic;

interface ThematicInterface
{

}

+ 0
- 8
Model/ThematicInterface.php Ver fichero

@@ -1,8 +0,0 @@
<?php

namespace Lc\PietroBundle\Model;

interface ThematicInterface
{

}

+ 2
- 2
Repository/Dream/DreamRepository.php Ver fichero

@@ -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);
}
}

+ 1
- 1
Repository/Dream/DreamRepositoryQuery.php Ver fichero

@@ -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)
{

+ 0
- 8
Repository/Dream/DreamRepositoryQueryInterface.php Ver fichero

@@ -1,8 +0,0 @@
<?php

namespace Lc\PietroBundle\Repository\Dream;

interface DreamRepositoryQueryInterface
{

}

+ 2
- 18
Repository/Dream/DreamStore.php Ver fichero

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

+ 0
- 8
Repository/Dream/DreamStoreInterface.php Ver fichero

@@ -1,8 +0,0 @@
<?php

namespace Lc\PietroBundle\Repository\Dream;

interface DreamStoreInterface
{

}

+ 1
- 1
Repository/IndividualData/IndividualDataRepository.php Ver fichero

@@ -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;


+ 1
- 1
Repository/ProjectBoost/ProjectBoostRepository.php Ver fichero

@@ -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;


+ 1
- 1
Repository/Revolt/RevoltRepository.php Ver fichero

@@ -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;


+ 2
- 2
Repository/Search/SearchStore.php Ver fichero

@@ -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]));

+ 1
- 1
Repository/Subthematic/SubthematicRepository.php Ver fichero

@@ -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;


+ 1
- 1
Repository/Territory/TerritoryRepository.php Ver fichero

@@ -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;


+ 1
- 1
Repository/Thematic/ThematicRepository.php Ver fichero

@@ -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;


Cargando…
Cancelar
Guardar