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.

55 line
1.3KB

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