選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

ReductionCartContainer.php 1.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. namespace Lc\CaracoleBundle\Container\Reduction;
  3. use App\Entity\Reduction\ReductionCart;
  4. use Lc\CaracoleBundle\Definition\Field\Reduction\ReductionCartFieldDefinition;
  5. use Lc\CaracoleBundle\Factory\Reduction\ReductionCartFactory;
  6. use Lc\CaracoleBundle\Repository\Reduction\ReductionCartRepositoryQuery;
  7. use Lc\CaracoleBundle\Repository\Reduction\ReductionCartStore;
  8. class ReductionCartContainer
  9. {
  10. protected ReductionCartFactory $factory;
  11. protected ReductionCartRepositoryQuery $repositoryQuery;
  12. protected ReductionCartStore $store;
  13. protected ReductionCartFieldDefinition $fieldDefinition;
  14. public function __construct(
  15. ReductionCartFactory $factory,
  16. ReductionCartRepositoryQuery $repositoryQuery,
  17. ReductionCartStore $store,
  18. ReductionCartFieldDefinition $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 ReductionCart::class;
  28. }
  29. public function getFactory(): ReductionCartFactory
  30. {
  31. return $this->factory;
  32. }
  33. public function getRepositoryQuery(): ReductionCartRepositoryQuery
  34. {
  35. return $this->repositoryQuery;
  36. }
  37. public function getStore(): ReductionCartStore
  38. {
  39. $this->store->resetContext();
  40. return $this->store;
  41. }
  42. public function getFieldDefinition(): ReductionCartFieldDefinition
  43. {
  44. return $this->fieldDefinition;
  45. }
  46. }