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.

101 line
3.5KB

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