You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ProductCategoryContainer.php 2.0KB

3 yıl önce
3 yıl önce
3 yıl önce
3 yıl önce
3 yıl önce
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <?php
  2. namespace Lc\CaracoleBundle\Container\Product;
  3. use Lc\CaracoleBundle\Builder\Product\ProductCategoryBuilder;
  4. use Lc\CaracoleBundle\Definition\Field\Product\ProductCategoryFieldDefinition;
  5. use Lc\CaracoleBundle\Factory\Product\ProductCategoryFactory;
  6. use Lc\CaracoleBundle\Repository\Product\ProductCategoryRepositoryQuery;
  7. use Lc\CaracoleBundle\Repository\Product\ProductCategoryStore;
  8. use Lc\CaracoleBundle\Solver\Product\ProductCategorySolver;
  9. class ProductCategoryContainer
  10. {
  11. protected ProductCategoryFactory $factory;
  12. protected ProductCategoryBuilder $builder;
  13. protected ProductCategorySolver $solver;
  14. protected ProductCategoryRepositoryQuery $repositoryQuery;
  15. protected ProductCategoryStore $store;
  16. protected ProductCategoryFieldDefinition $fieldDefinition;
  17. public function __construct(
  18. ProductCategoryFactory $factory,
  19. ProductCategoryBuilder $builder,
  20. ProductCategorySolver $solver,
  21. ProductCategoryRepositoryQuery $repositoryQuery,
  22. ProductCategoryStore $store,
  23. ProductCategoryFieldDefinition $fieldDefinition
  24. ) {
  25. $this->factory = $factory;
  26. $this->builder = $builder;
  27. $this->solver = $solver;
  28. $this->repositoryQuery = $repositoryQuery;
  29. $this->store = $store;
  30. $this->fieldDefinition = $fieldDefinition;
  31. }
  32. public function getFactory(): ProductCategoryFactory
  33. {
  34. return $this->factory;
  35. }
  36. public function getBuilder(): ProductCategoryBuilder
  37. {
  38. return $this->builder;
  39. }
  40. public function getSolver(): ProductCategorySolver
  41. {
  42. return $this->solver;
  43. }
  44. public function getRepositoryQuery(): ProductCategoryRepositoryQuery
  45. {
  46. return $this->repositoryQuery;
  47. }
  48. public function getStore(): ProductCategoryStore
  49. {
  50. $this->store->resetContext();
  51. return $this->store;
  52. }
  53. public function getFieldDefinition(): ProductCategoryFieldDefinition
  54. {
  55. return $this->fieldDefinition;
  56. }
  57. }