Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

59 lines
1.6KB

  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. }