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.

108 linhas
3.7KB

  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. use Lc\PietroBundle\Container\Workshop\EntryContainer;
  12. use Lc\PietroBundle\Container\Workshop\SolutionContainer;
  13. use Lc\PietroBundle\Container\Workshop\TypeContainer;
  14. use Lc\PietroBundle\Container\Workshop\WorkshopContainer;
  15. use Lc\PietroBundle\Container\Workshop\WorkshopThematicContainer;
  16. trait ControllerTrait
  17. {
  18. public static function getSubscribedServices(): array
  19. {
  20. return array_merge(
  21. parent::getSubscribedServices(),
  22. [
  23. DreamContainer::class => DreamContainer::class,
  24. IndividualDataContainer::class => IndividualDataContainer::class,
  25. ProjectBoostContainer::class => ProjectBoostContainer::class,
  26. ProjectInspiringContainer::class => ProjectInspiringContainer::class,
  27. RevoltContainer::class => RevoltContainer::class,
  28. SubthematicContainer::class => SubthematicContainer::class,
  29. TerritoryContainer::class => TerritoryContainer::class,
  30. ThematicContainer::class => ThematicContainer::class,
  31. WorkshopContainer::class => WorkshopContainer::class,
  32. WorkshopThematicContainer::class => WorkshopThematicContainer::class,
  33. EntryContainer::class => EntryContainer::class,
  34. TypeContainer::class => TypeContainer::class,
  35. SolutionContainer::class => SolutionContainer::class
  36. ]
  37. );
  38. }
  39. public function getDreamContainer(): DreamContainer
  40. {
  41. return $this->get(DreamContainer::class);
  42. }
  43. public function getIndividualDataContainer(): IndividualDataContainer
  44. {
  45. return $this->get(IndividualDataContainer::class);
  46. }
  47. public function getProjectBoostContainer(): ProjectBoostContainer
  48. {
  49. return $this->get(ProjectBoostContainer::class);
  50. }
  51. public function getProjectInspiringContainer(): ProjectInspiringContainer
  52. {
  53. return $this->get(ProjectInspiringContainer::class);
  54. }
  55. public function getRevoltContainer(): RevoltContainer
  56. {
  57. return $this->get(RevoltContainer::class);
  58. }
  59. public function getSubthematicContainer(): SubthematicContainer
  60. {
  61. return $this->get(SubthematicContainer::class);
  62. }
  63. public function getTerritoryContainer(): TerritoryContainer
  64. {
  65. return $this->get(TerritoryContainer::class);
  66. }
  67. public function getThematicContainer(): ThematicContainer
  68. {
  69. return $this->get(ThematicContainer::class);
  70. }
  71. public function getWorkshopContainer(): WorkshopContainer
  72. {
  73. return $this->get(WorkshopContainer::class);
  74. }
  75. public function getWorkshopThematicContainer(): WorkshopThematicContainer
  76. {
  77. return $this->get(WorkshopThematicContainer::class);
  78. }
  79. public function getEntryContainer(): EntryContainer
  80. {
  81. return $this->get(EntryContainer::class);
  82. }
  83. public function getTypeContainer(): TypeContainer
  84. {
  85. return $this->get(TypeContainer::class);
  86. }
  87. public function getSolutionContainer(): SolutionContainer
  88. {
  89. return $this->get(SolutionContainer::class);
  90. }
  91. }