getSettingModule(), $this->getFeatureModule(), $this->getFeatureProducerModule(), $this->getUnitModule(), $this->getTaxRateModule(), $this->getUserUserGroupModule(), $this->getUserGroupModule(), $this->getPaymentModule(), $this->getProducerPriceRangeModule(), $this->getUserProducerModule(), $this->getUserPointSaleModule(), $this->getUserModule(), $this->getAutomaticEmailModule(), $this->getUserMessageModule(), $this->getPointSaleDistributionModule(), $this->getProductAccessoryModule(), $this->getAccessoryModule(), $this->getProductDistributionModule(), $this->getProductCategoryModule(), $this->getProductPointSaleModule(), $this->getProductPriceModule(), $this->getProductSubscriptionModule(), $this->getTicketUserModule(), $this->getTicketMessageModule(), $this->getTicketModule(), $this->getPointSaleModule(), $this->getSharedPointSaleModule(), $this->getProductModule(), $this->getProductOrderModule(), $this->getOrderStatusModule(), $this->getOrderStatusHistoryModule(), $this->getQuotationModule(), $this->getInvoiceModule(), $this->getDeliveryNoteModule(), $this->getDocumentModule(), $this->getSubscriptionModule(), $this->getDistributionModule(), $this->getProducerModule(), $this->getOrderModule(), ]; } public function getProducerContext(): ?Producer { return $this->producerContext; } public function setProducerContext(Producer $producer = null) { $this->producerContext = $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.'); } }