Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

60 linhas
1.7KB

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