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.

73 linhas
2.4KB

  1. <?php
  2. namespace Lc\PietroBundle\Controller;
  3. use Lc\PietroBundle\Container\Dream\DreamContainer;
  4. use Lc\PietroBundle\Container\IndividualData\IndividualDataContainer;
  5. use Lc\PietroBundle\Container\ProjectBoost\ProjectBoostContainer;
  6. use Lc\PietroBundle\Container\ProjectInspiring\ProjectInspiringContainer;
  7. use Lc\PietroBundle\Container\Revolt\RevoltContainer;
  8. use Lc\PietroBundle\Container\Subthematic\SubthematicContainer;
  9. use Lc\PietroBundle\Container\Territory\TerritoryContainer;
  10. use Lc\PietroBundle\Container\Thematic\ThematicContainer;
  11. trait ControllerTrait
  12. {
  13. public static function getSubscribedServices()
  14. {
  15. return array_merge(
  16. parent::getSubscribedServices(),
  17. [
  18. DreamContainer::class => DreamContainer::class,
  19. IndividualDataContainer::class => IndividualDataContainer::class,
  20. ProjectBoostContainer::class => ProjectBoostContainer::class,
  21. ProjectInspiringContainer::class => ProjectInspiringContainer::class,
  22. RevoltContainer::class => RevoltContainer::class,
  23. SubthematicContainer::class => SubthematicContainer::class,
  24. TerritoryContainer::class => TerritoryContainer::class,
  25. ThematicContainer::class => ThematicContainer::class,
  26. ]
  27. );
  28. }
  29. public function getDreamContainer(): DreamContainer
  30. {
  31. return $this->get(DreamContainer::class);
  32. }
  33. public function getIndividualDataContainer(): IndividualDataContainer
  34. {
  35. return $this->get(IndividualDataContainer::class);
  36. }
  37. public function getProjectBoostContainer(): ProjectBoostContainer
  38. {
  39. return $this->get(ProjectBoostContainer::class);
  40. }
  41. public function getProjectInspiringContainer(): ProjectInspiringContainer
  42. {
  43. return $this->get(ProjectInspiringContainer::class);
  44. }
  45. public function getRevoltContainer(): RevoltContainer
  46. {
  47. return $this->get(RevoltContainer::class);
  48. }
  49. public function getSubthematicContainer(): SubthematicContainer
  50. {
  51. return $this->get(SubthematicContainer::class);
  52. }
  53. public function getTerritoryContainer(): TerritoryContainer
  54. {
  55. return $this->get(TerritoryContainer::class);
  56. }
  57. public function getThematicContainer(): ThematicContainer
  58. {
  59. return $this->get(ThematicContainer::class);
  60. }
  61. }