/** * Callback method that will be called if an environment.remove.finished * event has been triggered. * * @param \commpress\Cli\Event\DefaultEnvironmentEvent $event * The event with environment data. */ public function onRemoveEnvironmentFinished(DefaultEnvironmentEvent $event) { // Get the output instance. $output = new ConsoleOutput(); $output->writeln(sprintf('<info>Finished</info> to remove environment of project <info>%s (%s)</info> at branch <info>%s</info>', $event->getProject()->getFullName(), $event->getProject()->getShortName(), $event->getGitBranch())); }
/** * Triggers the create environment finished event. * * @param VirtualHost[] $vhosts * The virtual hosts. */ private function triggerCreateEnvironmentFinishedEvent(array $vhosts) { $event = new DefaultEnvironmentEvent(); $event->setProject($this->project); $event->setGitBranch($this->gitBranch); $event->setVhosts($vhosts); $this->dispatcher->dispatch(EnvironmentEvents::ENVIRONMENT_CREATE_FINISHED, $event); }