소스 검색

premiere version: on commence fc active

develop
Charly 3 년 전
부모
커밋
8d511672b6
27개의 변경된 파일154개의 추가작업 그리고 63개의 파일을 삭제
  1. +10
    -0
      Controller/AbstractAdminController.php
  2. +10
    -0
      Controller/AbstractController.php
  3. +72
    -0
      Controller/ControllerTrait.php
  4. +2
    -9
      Controller/IndividualData/IndividualDataAdminController.php
  5. +5
    -5
      Controller/Subthematic/SubthematicAdminController.php
  6. +4
    -4
      Controller/Territory/TerritoryAdminController.php
  7. +4
    -5
      Controller/Thematic/ThematicAdminController.php
  8. +1
    -1
      Factory/Dream/DreamFactory.php
  9. +1
    -1
      Factory/IndividualData/IndividualDataFactory.php
  10. +1
    -1
      Factory/ProjectBoost/ProjectBoostFactory.php
  11. +1
    -1
      Factory/ProjectInspiring/ProjectInspiringFactory.php
  12. +1
    -1
      Factory/Revolt/RevoltFactory.php
  13. +1
    -1
      Factory/Subthematic/SubthematicFactory.php
  14. +1
    -1
      Factory/Territory/TerritoryFactory.php
  15. +1
    -1
      Factory/Thematic/ThematicFactory.php
  16. +6
    -6
      Form/Dream/DreamType.php
  17. +6
    -6
      Form/ProjectBoost/ProjectBoostType.php
  18. +6
    -6
      Form/ProjectInspiring/ProjectInspiringType.php
  19. +6
    -6
      Form/Revolt/RevoltType.php
  20. +2
    -1
      Model/Dream/Dream.php
  21. +2
    -1
      Model/ProjectBoost/ProjectBoost.php
  22. +2
    -1
      Model/ProjectInspiring/ProjectInspiring.php
  23. +2
    -1
      Model/Revolt/Revolt.php
  24. +2
    -1
      Model/Subthematic/Subthematic.php
  25. +2
    -1
      Model/Territory/Territory.php
  26. +2
    -1
      Model/Thematic/Thematic.php
  27. +1
    -1
      Repository/Subthematic/SubthematicStore.php

+ 10
- 0
Controller/AbstractAdminController.php 파일 보기

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

namespace Lc\PietroBundle\Controller;

use Lc\SovBundle\Controller\AbstractAdminController as SovAbstractAdminController;

abstract class AbstractAdminController extends SovAbstractAdminController
{
use ControllerTrait;
}

+ 10
- 0
Controller/AbstractController.php 파일 보기

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

namespace Lc\PietroBundle\Controller;

use Lc\SovBundle\Controller\AbstractController as SovAbstractController;

abstract class AbstractController extends SovAbstractController
{
use ControllerTrait;
}

+ 72
- 0
Controller/ControllerTrait.php 파일 보기

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

namespace Lc\PietroBundle\Controller;

use Lc\PietroBundle\Container\Dream\DreamContainer;
use Lc\PietroBundle\Container\IndividualData\IndividualDataContainer;
use Lc\PietroBundle\Container\ProjectBoost\ProjectBoostContainer;
use Lc\PietroBundle\Container\ProjectInspiring\ProjectInspiringContainer;
use Lc\PietroBundle\Container\Revolt\RevoltContainer;
use Lc\PietroBundle\Container\Subthematic\SubthematicContainer;
use Lc\PietroBundle\Container\Territory\TerritoryContainer;
use Lc\PietroBundle\Container\Thematic\ThematicContainer;

trait ControllerTrait
{
public static function getSubscribedServices()
{
return array_merge(
parent::getSubscribedServices(),
[
DreamContainer::class => DreamContainer::class,
IndividualDataContainer::class => IndividualDataContainer::class,
ProjectBoostContainer::class => ProjectBoostContainer::class,
ProjectInspiringContainer::class => ProjectInspiringContainer::class,
RevoltContainer::class => RevoltContainer::class,
SubthematicContainer::class => SubthematicContainer::class,
TerritoryContainer::class => TerritoryContainer::class,
ThematicContainer::class => ThematicContainer::class,
]
);
}

public function getDreamContainer(): DreamContainer
{
return $this->get(DreamContainer::class);
}

public function getIndividualDataContainer(): IndividualDataContainer
{
return $this->get(IndividualDataContainer::class);
}

public function getProjectBoostContainer(): ProjectBoostContainer
{
return $this->get(ProjectBoostContainer::class);
}

public function getProjectInspiringContainer(): ProjectInspiringContainer
{
return $this->get(ProjectInspiringContainer::class);
}

public function getRevoltContainer(): RevoltContainer
{
return $this->get(RevoltContainer::class);
}

public function getSubthematicContainer(): SubthematicContainer
{
return $this->get(SubthematicContainer::class);
}

public function getTerritoryContainer(): TerritoryContainer
{
return $this->get(TerritoryContainer::class);
}

public function getThematicContainer(): ThematicContainer
{
return $this->get(ThematicContainer::class);
}
}

+ 2
- 9
Controller/IndividualData/IndividualDataAdminController.php 파일 보기

@@ -25,8 +25,8 @@ use Lc\PietroBundle\Repository\Dream\DreamStore;
use Lc\PietroBundle\Repository\ProjectBoost\ProjectBoostStore;
use Lc\PietroBundle\Repository\ProjectInspiring\ProjectInspiringStore;
use Lc\PietroBundle\Repository\Revolt\RevoltStore;
use Lc\PietroBundle\Controller\AbstractAdminController;
use Symfony\Component\HttpFoundation\Request;
use Lc\SovBundle\Controller\AbstractAdminController;
use EasyCorp\Bundle\EasyAdminBundle\Field\EmailField;
use EasyCorp\Bundle\EasyAdminBundle\Field\TextField;
use Lc\SovBundle\Field\CollectionField;
@@ -54,14 +54,7 @@ abstract class IndividualDataAdminController extends AbstractAdminController

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

public static function getEntityFqcn(): string
{
return IndividualData::class;
return $this->getIndividualDataContainer()->getFactory()->create();
}

public function configureFields(string $pageName): iterable

+ 5
- 5
Controller/Subthematic/SubthematicAdminController.php 파일 보기

@@ -2,16 +2,16 @@

namespace Lc\PietroBundle\Controller\Subthematic;

use Lc\PietroBundle\Model\Subthematic;
use Lc\PietroBundle\Container\Subthematic\SubthematicContainer;
use EasyCorp\Bundle\EasyAdminBundle\Field\AssociationField;
use EasyCorp\Bundle\EasyAdminBundle\Field\TextField;
use Lc\SovBundle\Controller\AbstractAdminController;
use Lc\PietroBundle\Controller\AbstractAdminController;

class SubthematicAdminController extends AbstractAdminController
abstract class SubthematicAdminController extends AbstractAdminController
{
public static function getEntityFqcn(): string
public function createEntity(string $entityFqcn)
{
return Subthematic::class;
return $this->getSubthematicContainer()->getFactory()->create();
}

public function configureFields(string $pageName): iterable

+ 4
- 4
Controller/Territory/TerritoryAdminController.php 파일 보기

@@ -2,15 +2,15 @@

namespace Lc\PietroBundle\Controller\Territory;

use Lc\PietroBundle\Model\Territory;
use Lc\PietroBundle\Container\Territory\TerritoryContainer;
use EasyCorp\Bundle\EasyAdminBundle\Field\TextField;
use Lc\SovBundle\Controller\AbstractAdminController;
use Lc\PietroBundle\Controller\AbstractAdminController;

abstract class TerritoryAdminController extends AbstractAdminController
{
public static function getEntityFqcn(): string
public function createEntity(string $entityFqcn)
{
return Territory::class;
return $this->getTerritoryContainer()->getFactory()->create();
}

public function configureFields(string $pageName): iterable

+ 4
- 5
Controller/Thematic/ThematicAdminController.php 파일 보기

@@ -2,15 +2,14 @@

namespace Lc\PietroBundle\Controller\Thematic;

use Lc\PietroBundle\Model\Thematic;
use EasyCorp\Bundle\EasyAdminBundle\Field\TextField;
use Lc\SovBundle\Controller\AbstractAdminController as AbstractCrudController;
use Lc\PietroBundle\Controller\AbstractAdminController;

abstract class ThematicAdminController extends AbstractCrudController
abstract class ThematicAdminController extends AbstractAdminController
{
public static function getEntityFqcn(): string
public function createEntity(string $entityFqcn)
{
return Thematic::class;
return $this->getThematicContainer()->getFactory()->create();
}

public function configureFields(string $pageName): iterable

+ 1
- 1
Factory/Dream/DreamFactory.php 파일 보기

@@ -3,7 +3,7 @@
namespace Lc\PietroBundle\Factory\Dream;

use App\Entity\Dream;
use Lc\PietroBundle\Model\DreamInterface;
use Lc\PietroBundle\Model\Dream\DreamInterface;

class DreamFactory
{

+ 1
- 1
Factory/IndividualData/IndividualDataFactory.php 파일 보기

@@ -3,7 +3,7 @@
namespace Lc\PietroBundle\Factory\IndividualData;

use App\Entity\IndividualData;
use Lc\PietroBundle\Model\IndividualDataInterface;
use Lc\PietroBundle\Model\IndividualData\IndividualDataInterface;

class IndividualDataFactory
{

+ 1
- 1
Factory/ProjectBoost/ProjectBoostFactory.php 파일 보기

@@ -3,7 +3,7 @@
namespace Lc\PietroBundle\Factory\ProjectBoost;

use App\Entity\ProjectBoost;
use Lc\PietroBundle\Model\ProjectBoostInterface;
use Lc\PietroBundle\Model\ProjectBoost\ProjectBoostInterface;

class ProjectBoostFactory
{

+ 1
- 1
Factory/ProjectInspiring/ProjectInspiringFactory.php 파일 보기

@@ -3,7 +3,7 @@
namespace Lc\PietroBundle\Factory\ProjectInspiring;

use App\Entity\ProjectInspiring;
use Lc\PietroBundle\Model\ProjectInspiringInterface;
use Lc\PietroBundle\Model\ProjectInspiring\ProjectInspiringInterface;

class ProjectInspiringFactory
{

+ 1
- 1
Factory/Revolt/RevoltFactory.php 파일 보기

@@ -3,7 +3,7 @@
namespace Lc\PietroBundle\Factory\Revolt;

use App\Entity\Revolt;
use Lc\PietroBundle\Model\RevoltInterface;
use Lc\PietroBundle\Model\Revolt\RevoltInterface;

class RevoltFactory
{

+ 1
- 1
Factory/Subthematic/SubthematicFactory.php 파일 보기

@@ -3,7 +3,7 @@
namespace Lc\PietroBundle\Factory\Subthematic;

use App\Entity\Subthematic;
use Lc\PietroBundle\Model\SubthematicInterface;
use Lc\PietroBundle\Model\Subthematic\SubthematicInterface;

class SubthematicFactory
{

+ 1
- 1
Factory/Territory/TerritoryFactory.php 파일 보기

@@ -3,7 +3,7 @@
namespace Lc\PietroBundle\Factory\Territory;

use App\Entity\Territory;
use Lc\PietroBundle\Model\TerritoryInterface;
use Lc\PietroBundle\Model\Territory\TerritoryInterface;

class TerritoryFactory
{

+ 1
- 1
Factory/Thematic/ThematicFactory.php 파일 보기

@@ -3,7 +3,7 @@
namespace Lc\PietroBundle\Factory\Thematic;

use App\Entity\Thematic;
use Lc\PietroBundle\Model\ThematicInterface;
use Lc\PietroBundle\Model\Thematic\ThematicInterface;

class ThematicFactory
{

+ 6
- 6
Form/Dream/DreamType.php 파일 보기

@@ -2,9 +2,9 @@

namespace Lc\PietroBundle\Form\Dream;

use Lc\PietroBundle\Model\Dream;
use Lc\PietroBundle\Model\Subthematic;
use Lc\PietroBundle\Model\Thematic;
use Lc\PietroBundle\Model\Dream\DreamInterface;
use Lc\PietroBundle\Model\Subthematic\SubthematicInterface;
use Lc\PietroBundle\Model\Thematic\ThematicInterface;
use Lc\SovBundle\Doctrine\EntityManager;
use Lc\SovBundle\Translation\TranslatorAdmin;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
@@ -46,7 +46,7 @@ class DreamType extends AbstractType
EntityType::class,
[
'label' => 'form.field.dream.thematic',
'class' => Thematic::class,
'class' => $this->em->getEntityName(ThematicInterface::class),
'required' => false,
'choice_attr' => function ($choice, $key, $value) {
return ['data-class' => 'theme' . strtolower($value)];
@@ -62,7 +62,7 @@ class DreamType extends AbstractType
EntityType::class,
[
'label' => 'form.field.dream.subthematic',
'class' => Subthematic::class,
'class' => $this->em->getEntityName(SubthematicInterface::class),
'required' => false,
'choice_attr' => function ($choice, $key, $value) {
return ['data-class' => 'theme' . strtolower($choice->getThematic()->getId())];
@@ -82,7 +82,7 @@ class DreamType extends AbstractType
{
$resolver->setDefaults(
[
'data_class' => $this->em->getEntityName(Dream::class),
'data_class' => $this->em->getEntityName(DreamInterface::class),
'context' => 'backend'
]
);

+ 6
- 6
Form/ProjectBoost/ProjectBoostType.php 파일 보기

@@ -2,9 +2,9 @@

namespace Lc\PietroBundle\Form\ProjectBoost;

use Lc\PietroBundle\Model\ProjectBoost;
use Lc\PietroBundle\Model\Subthematic;
use Lc\PietroBundle\Model\Thematic;
use Lc\PietroBundle\Model\ProjectBoost\ProjectBoostInterface;
use Lc\PietroBundle\Model\Subthematic\SubthematicInterface;
use Lc\PietroBundle\Model\Thematic\ThematicInterface;
use Lc\SovBundle\Doctrine\EntityManager;
use Lc\SovBundle\Translation\TranslatorAdmin;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
@@ -46,7 +46,7 @@ class ProjectBoostType extends AbstractType
EntityType::class,
[
'label' => 'form.field.projectBoost.thematic',
'class' => Thematic::class,
'class' => $this->em->getEntityName(ThematicInterface::class),
'required' => false,
'choice_attr' => function ($choice, $key, $value) {
return ['data-class' => 'theme' . strtolower($value)];
@@ -63,7 +63,7 @@ class ProjectBoostType extends AbstractType
EntityType::class,
[
'label' => 'form.field.projectBoost.subthematic',
'class' => Subthematic::class,
'class' => $this->em->getEntityName(SubthematicInterface::class),
'required' => false,
'choice_attr' => function ($choice, $key, $value) {
return ['data-class' => 'theme' . strtolower($choice->getThematic()->getId())];
@@ -83,7 +83,7 @@ class ProjectBoostType extends AbstractType
{
$resolver->setDefaults(
[
'data_class' => $this->em->getEntityName(ProjectBoost::class),
'data_class' => $this->em->getEntityName(ProjectBoostInterface::class),
'context' => 'backend'
]
);

+ 6
- 6
Form/ProjectInspiring/ProjectInspiringType.php 파일 보기

@@ -2,9 +2,9 @@

namespace Lc\PietroBundle\Form\ProjectInspiring;

use Lc\PietroBundle\Model\ProjectInspiring;
use Lc\PietroBundle\Model\Subthematic;
use Lc\PietroBundle\Model\Thematic;
use Lc\PietroBundle\Model\ProjectInspiring\ProjectInspiringInterface;
use Lc\PietroBundle\Model\Subthematic\SubthematicInterface;
use Lc\PietroBundle\Model\Thematic\ThematicInterface;
use Lc\SovBundle\Doctrine\EntityManager;
use Lc\SovBundle\Translation\TranslatorAdmin;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
@@ -46,7 +46,7 @@ class ProjectInspiringType extends AbstractType
EntityType::class,
[
'label' => 'form.field.projectinspiring.thematic',
'class' => Thematic::class,
'class' => $this->em->getEntityName(ThematicInterface::class),
'required' => false,
'choice_attr' => function ($choice, $key, $value) {
return ['data-class' => 'theme' . strtolower($value)];
@@ -62,7 +62,7 @@ class ProjectInspiringType extends AbstractType
EntityType::class,
[
'label' => 'form.field.projectinspiring.subthematic',
'class' => Subthematic::class,
'class' => $this->em->getEntityName(SubthematicInterface::class),
'required' => false,
'choice_attr' => function ($choice, $key, $value) {
return ['data-class' => 'theme' . strtolower($choice->getThematic()->getId())];
@@ -82,7 +82,7 @@ class ProjectInspiringType extends AbstractType
{
$resolver->setDefaults(
[
'data_class' => $this->em->getEntityName(ProjectInspiring::class),
'data_class' => $this->em->getEntityName(ProjectInspiringInterface::class),
'context' => 'backend'
]
);

+ 6
- 6
Form/Revolt/RevoltType.php 파일 보기

@@ -2,9 +2,9 @@

namespace Lc\PietroBundle\Form\Revolt;

use Lc\PietroBundle\Model\Revolt;
use Lc\PietroBundle\Model\Subthematic;
use Lc\PietroBundle\Model\Thematic;
use Lc\PietroBundle\Model\Revolt\RevoltInterface;
use Lc\PietroBundle\Model\Subthematic\SubthematicInterface;
use Lc\PietroBundle\Model\Thematic\ThematicInterface;
use Lc\SovBundle\Doctrine\EntityManager;
use Lc\SovBundle\Translation\TranslatorAdmin;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
@@ -46,7 +46,7 @@ class RevoltType extends AbstractType
EntityType::class,
[
'label' => 'form.field.revolt.thematic',
'class' => Thematic::class,
'class' => $this->em->getEntityName(ThematicInterface::class),
'required' => false,
'choice_attr' => function ($choice, $key, $value) {
return ['data-class' => 'theme' . strtolower($value)];
@@ -62,7 +62,7 @@ class RevoltType extends AbstractType
EntityType::class,
[
'label' => 'form.field.revolt.subthematic',
'class' => Subthematic::class,
'class' => $this->em->getEntityName(SubthematicInterface::class),
'required' => false,
'choice_attr' => function ($choice, $key, $value) {
return ['data-class' => 'theme' . strtolower($choice->getThematic()->getId())];
@@ -83,7 +83,7 @@ class RevoltType extends AbstractType
) {
$resolver->setDefaults(
[
'data_class' => $this->em->getEntityName(Revolt::class),
'data_class' => $this->em->getEntityName(RevoltInterface::class),
'context' => 'backend'
]
);

+ 2
- 1
Model/Dream/Dream.php 파일 보기

@@ -6,11 +6,12 @@ use Doctrine\ORM\Mapping as ORM;
use Lc\PietroBundle\Doctrine\Extension\DescriptionProjectInterface;
use Lc\PietroBundle\Doctrine\Extension\DescriptionProjectTrait;
use Lc\PietroBundle\Model\IndividualData\IndividualDataInterface;
use Lc\SovBundle\Doctrine\EntityInterface;

/**
* @ORM\MappedSuperclass()
*/
abstract class Dream implements DescriptionProjectInterface, DreamInterface
abstract class Dream implements DescriptionProjectInterface, DreamInterface, EntityInterface
{
use DescriptionProjectTrait;


+ 2
- 1
Model/ProjectBoost/ProjectBoost.php 파일 보기

@@ -6,11 +6,12 @@ use Doctrine\ORM\Mapping as ORM;
use Lc\PietroBundle\Doctrine\Extension\DescriptionProjectInterface;
use Lc\PietroBundle\Doctrine\Extension\DescriptionProjectTrait;
use Lc\PietroBundle\Model\IndividualData\IndividualData;
use Lc\SovBundle\Doctrine\EntityInterface;

/**
* @ORM\MappedSuperclass()
*/
abstract class ProjectBoost implements DescriptionProjectInterface, ProjectBoostInterface
abstract class ProjectBoost implements DescriptionProjectInterface, ProjectBoostInterface, EntityInterface
{
use DescriptionProjectTrait;


+ 2
- 1
Model/ProjectInspiring/ProjectInspiring.php 파일 보기

@@ -6,11 +6,12 @@ use Doctrine\ORM\Mapping as ORM;
use Lc\PietroBundle\Doctrine\Extension\DescriptionProjectInterface;
use Lc\PietroBundle\Doctrine\Extension\DescriptionProjectTrait;
use Lc\PietroBundle\Model\IndividualData\IndividualDataInterface;
use Lc\SovBundle\Doctrine\EntityInterface;

/**
* @ORM\MappedSuperclass()
*/
abstract class ProjectInspiring implements DescriptionProjectInterface, ProjectInspiringInterface
abstract class ProjectInspiring implements DescriptionProjectInterface, ProjectInspiringInterface, EntityInterface
{
use DescriptionProjectTrait;


+ 2
- 1
Model/Revolt/Revolt.php 파일 보기

@@ -6,11 +6,12 @@ use Doctrine\ORM\Mapping as ORM;
use Lc\PietroBundle\Doctrine\Extension\DescriptionProjectInterface;
use Lc\PietroBundle\Doctrine\Extension\DescriptionProjectTrait;
use Lc\PietroBundle\Model\IndividualData\IndividualDataInterface;
use Lc\SovBundle\Doctrine\EntityInterface;

/**
* @ORM\MappedSuperclass()
*/
abstract class Revolt implements DescriptionProjectInterface, RevoltInterface
abstract class Revolt implements DescriptionProjectInterface, RevoltInterface, EntityInterface
{
use DescriptionProjectTrait;


+ 2
- 1
Model/Subthematic/Subthematic.php 파일 보기

@@ -4,11 +4,12 @@ namespace Lc\PietroBundle\Model\Subthematic;

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

/**
* @ORM\MappedSuperclass()
*/
abstract class Subthematic implements SubthematicInterface
abstract class Subthematic implements SubthematicInterface, EntityInterface
{
/**
* @ORM\Column(type="string", length=255)

+ 2
- 1
Model/Territory/Territory.php 파일 보기

@@ -6,13 +6,14 @@ 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\EntityInterface;
use Lc\SovBundle\Doctrine\Extension\DevAliasInterface;
use Lc\SovBundle\Doctrine\Extension\DevAliasTrait;

/**
* @ORM\MappedSuperclass()
*/
abstract class Territory implements TerritoryInterface, DevAliasInterface
abstract class Territory implements TerritoryInterface, DevAliasInterface, EntityInterface
{
use DevAliasTrait;


+ 2
- 1
Model/Thematic/Thematic.php 파일 보기

@@ -6,11 +6,12 @@ use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Lc\PietroBundle\Model\Subthematic\SubthematicInterface;
use Lc\SovBundle\Doctrine\EntityInterface;

/**
* @ORM\MappedSuperclass()
*/
abstract class Thematic implements ThematicInterface
abstract class Thematic implements ThematicInterface, EntityInterface
{

/**

+ 1
- 1
Repository/Subthematic/SubthematicStore.php 파일 보기

@@ -10,7 +10,7 @@ use Lc\SovBundle\Repository\StoreInterface;
class SubthematicStore extends AbstractStore implements StoreInterface
{

public function __construct(IndividualDataRepositoryQuery $query)
public function __construct(SubthematicRepositoryQuery $query)
{
$this->query = $query;
}

Loading…
취소
저장