Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

NewsContainer.php 1.3KB

pirms 3 gadiem
pirms 3 gadiem
pirms 3 gadiem
pirms 3 gadiem
pirms 3 gadiem
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. }