getTaxRateModule(), $this->getUserUserGroupModule(), $this->getUserGroupModule(), $this->getPaymentModule(), $this->getProducerPriceRangeModule(), $this->getUserProducerModule(), $this->getUserPointSaleModule(), $this->getUserModule(), $this->getPointSaleDistributionModule(), $this->getProductDistributionModule(), $this->getProductCategoryModule(), $this->getProductPointSaleModule(), $this->getProductOrderModule(), $this->getProductPriceModule(), $this->getProductSubscriptionModule(), $this->getTicketUserModule(), $this->getTicketMessageModule(), $this->getTicketModule(), $this->getQuotationModule(), $this->getInvoiceModule(), $this->getDeliveryNoteModule(), $this->getDocumentModule(), $this->getPointSaleModule(), $this->getProductModule(), $this->getSubscriptionModule(), $this->getDistributionModule(), $this->getProducerModule(), $this->getOrderModule(), ]; } public function setProducerContext(Producer $producer) { foreach($this->getModules() as $module) { foreach($module->getServices() as $serviceClass) { $instanceService = $serviceClass::getInstance(); $instanceService->setProducerContext($producer); } } } /* * HiƩrarchie des apps */ public function getModuleLevelHierarchyByService($serviceClass): int { $modulesArray = $this->getModules(); $entityFqcnService = $this->getEntityFqcnByService($serviceClass); foreach($modulesArray as $key => $module) { if($module->getEntityFqcn() == $entityFqcnService) { return $key; } } } public function getEntityFqcnByService(string $serviceClass): string { $modulesArray = $this->getModules(); foreach($modulesArray as $module) { if(in_array($serviceClass, $module->getServices())) { return $module->getEntityFqcn(); } } throw new ErrorException('Service '.$serviceClass.' introuvable dans les modules.'); } }