您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

69 行
2.0KB

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