Exemplo n.º 1
0
 public function execute(\Magento\Framework\Event\Observer $observer)
 {
     foreach ($observer->getModuleCollection() as $module) {
         $component = $this->loader->getItemById($module->getCode());
         if (!$component) {
             $this->moduleFactory->create()->load($module->getCode())->delete();
             continue;
         }
         $module->addData($component);
     }
 }