Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

ReductionCatalogContainer.php 1.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. namespace Lc\CaracoleBundle\Container\Reduction;
  3. use App\Entity\Reduction\ReductionCatalog;
  4. use Lc\CaracoleBundle\Definition\Field\Reduction\ReductionCatalogFieldDefinition;
  5. use Lc\CaracoleBundle\Factory\Reduction\ReductionCatalogFactory;
  6. use Lc\CaracoleBundle\Repository\Reduction\ReductionCatalogRepositoryQuery;
  7. use Lc\CaracoleBundle\Repository\Reduction\ReductionCatalogStore;
  8. class ReductionCatalogContainer
  9. {
  10. protected ReductionCatalogFactory $factory;
  11. protected ReductionCatalogRepositoryQuery $repositoryQuery;
  12. protected ReductionCatalogStore $store;
  13. protected ReductionCatalogFieldDefinition $fieldDefinition;
  14. public function __construct(
  15. ReductionCatalogFactory $factory,
  16. ReductionCatalogRepositoryQuery $repositoryQuery,
  17. ReductionCatalogStore $store,
  18. ReductionCatalogFieldDefinition $fieldDefinition
  19. ) {
  20. $this->factory = $factory;
  21. $this->repositoryQuery = $repositoryQuery;
  22. $this->store = $store;
  23. $this->fieldDefinition = $fieldDefinition;
  24. }
  25. public static function getEntityFqcn()
  26. {
  27. return ReductionCatalog::class;
  28. }
  29. public function getFactory(): ReductionCatalogFactory
  30. {
  31. return $this->factory;
  32. }
  33. public function getRepositoryQuery(): ReductionCatalogRepositoryQuery
  34. {
  35. return $this->repositoryQuery;
  36. }
  37. public function getStore(): ReductionCatalogStore
  38. {
  39. $this->store->resetContext();
  40. return $this->store;
  41. }
  42. public function getFieldDefinition(): ReductionCatalogFieldDefinition
  43. {
  44. return $this->fieldDefinition;
  45. }
  46. }