protected function execute(InputInterface $input, OutputInterface $output) { try { $key = $input->getArgument('key'); $service = new ModuloService($this->em); $service->uninstall($key); $output->writeln("<info>Módulo desinstalado com sucesso</info>"); } catch (Exception $e) { $output->writeln("<error>{$e->getMessage()}</error>"); } }
public function delete(Context $context, $id) { $modulo = $this->find($id); $service = new ModuloService($this->em()); $service->uninstall($modulo->getChave()); $this->app()->redirect("{$context->request()->getRootUri()}/modules/sga.modulos"); }