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.

BusinessLogicTrait.php 5.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. <?php
  2. namespace common\components;
  3. use domain\Config\TaxRate\TaxRateModule;
  4. use domain\Config\Unit\UnitModule;
  5. use domain\Distribution\Distribution\DistributionModule;
  6. use domain\Distribution\PointSaleDistribution\PointSaleDistributionModule;
  7. use domain\Distribution\ProductDistribution\ProductDistributionModule;
  8. use domain\Document\DeliveryNote\DeliveryNoteModule;
  9. use domain\Document\Document\DocumentModule;
  10. use domain\Document\Invoice\InvoiceModule;
  11. use domain\Document\Quotation\QuotationModule;
  12. use domain\Feature\Feature\FeatureModule;
  13. use domain\Feature\FeatureProducer\FeatureProducerModule;
  14. use domain\Opinion\OpinionModule;
  15. use domain\Order\Order\OrderModule;
  16. use domain\Order\ProductOrder\ProductOrderModule;
  17. use domain\Payment\PaymentModule;
  18. use domain\PointSale\PointSale\PointSaleModule;
  19. use domain\PointSale\UserPointSale\UserPointSaleModule;
  20. use domain\Producer\Producer\ProducerModule;
  21. use domain\Producer\ProducerPriceRange\ProducerPriceRangeModule;
  22. use domain\Product\Product\ProductModule;
  23. use domain\Product\ProductCategory\ProductCategoryModule;
  24. use domain\Product\ProductPointSale\ProductPointSaleModule;
  25. use domain\Product\ProductPrice\Module\ProductPriceModule;
  26. use domain\Setting\SettingModule;
  27. use domain\Subscription\ProductSubscription\ProductSubscriptionModule;
  28. use domain\Subscription\Subscription\SubscriptionModule;
  29. use domain\Ticket\Ticket\TicketModule;
  30. use domain\Ticket\TicketMessage\TicketMessageModule;
  31. use domain\Ticket\TicketUser\TicketUserModule;
  32. use domain\User\User\UserModule;
  33. use domain\User\UserGroup\UserGroupModule;
  34. use domain\User\UserProducer\UserProducerModule;
  35. use domain\User\UserUserGroup\UserUserGroupModule;
  36. trait BusinessLogicTrait
  37. {
  38. public function getUnitModule(): UnitModule
  39. {
  40. return UnitModule::getInstance();
  41. }
  42. public function getOpinionModule(): OpinionModule
  43. {
  44. return OpinionModule::getInstance();
  45. }
  46. public function getUserProducerModule(): UserProducerModule
  47. {
  48. return UserProducerModule::getInstance();
  49. }
  50. public function getOrderModule(): OrderModule
  51. {
  52. return OrderModule::getInstance();
  53. }
  54. public function getTaxRateModule(): TaxRateModule
  55. {
  56. return TaxRateModule::getInstance();
  57. }
  58. public function getDistributionModule(): DistributionModule
  59. {
  60. return DistributionModule::getInstance();
  61. }
  62. public function getPointSaleDistributionModule(): PointSaleDistributionModule
  63. {
  64. return PointSaleDistributionModule::getInstance();
  65. }
  66. public function getProductDistributionModule(): ProductDistributionModule
  67. {
  68. return ProductDistributionModule::getInstance();
  69. }
  70. public function getDeliveryNoteModule(): DeliveryNoteModule
  71. {
  72. return DeliveryNoteModule::getInstance();
  73. }
  74. public function getDocumentModule(): DocumentModule
  75. {
  76. return DocumentModule::getInstance();
  77. }
  78. public function getInvoiceModule(): InvoiceModule
  79. {
  80. return InvoiceModule::getInstance();
  81. }
  82. public function getQuotationModule(): QuotationModule
  83. {
  84. return QuotationModule::getInstance();
  85. }
  86. public function getProductOrderModule(): ProductOrderModule
  87. {
  88. return ProductOrderModule::getInstance();
  89. }
  90. public function getPointSaleModule(): PointSaleModule
  91. {
  92. return PointSaleModule::getInstance();
  93. }
  94. public function getUserPointSaleModule(): UserPointSaleModule
  95. {
  96. return UserPointSaleModule::getInstance();
  97. }
  98. public function getProducerModule(): ProducerModule
  99. {
  100. return ProducerModule::getInstance();
  101. }
  102. public function getProducerPriceRangeModule(): ProducerPriceRangeModule
  103. {
  104. return ProducerPriceRangeModule::getInstance();
  105. }
  106. public function getProductModule(): ProductModule
  107. {
  108. return ProductModule::getInstance();
  109. }
  110. public function getProductCategoryModule(): ProductCategoryModule
  111. {
  112. return ProductCategoryModule::getInstance();
  113. }
  114. public function getProductPointSaleModule(): ProductPointSaleModule
  115. {
  116. return ProductPointSaleModule::getInstance();
  117. }
  118. public function getProductPriceModule(): ProductPriceModule
  119. {
  120. return ProductPriceModule::getInstance();
  121. }
  122. public function getProductSubscriptionModule(): ProductSubscriptionModule
  123. {
  124. return ProductSubscriptionModule::getInstance();
  125. }
  126. public function getSubscriptionModule(): SubscriptionModule
  127. {
  128. return SubscriptionModule::getInstance();
  129. }
  130. public function getPaymentModule(): PaymentModule
  131. {
  132. return PaymentModule::getInstance();
  133. }
  134. public function getUserModule(): UserModule
  135. {
  136. return UserModule::getInstance();
  137. }
  138. public function getUserGroupModule(): UserGroupModule
  139. {
  140. return UserGroupModule::getInstance();
  141. }
  142. public function getUserUserGroupModule(): UserUserGroupModule
  143. {
  144. return UserUserGroupModule::getInstance();
  145. }
  146. public function getTicketModule(): TicketModule
  147. {
  148. return TicketModule::getInstance();
  149. }
  150. public function getTicketMessageModule(): TicketMessageModule
  151. {
  152. return TicketMessageModule::getInstance();
  153. }
  154. public function getTicketUserModule(): TicketUserModule
  155. {
  156. return TicketUserModule::getInstance();
  157. }
  158. public function getFeatureModule(): FeatureModule
  159. {
  160. return FeatureModule::getInstance();
  161. }
  162. public function getFeatureProducerModule(): FeatureProducerModule
  163. {
  164. return FeatureProducerModule::getInstance();
  165. }
  166. public function getSettingModule(): SettingModule
  167. {
  168. return SettingModule::getInstance();
  169. }
  170. }