public function handle(Event $event) { $this->output->writeln('<options=bold>' . $event->getDevice() . '</> reports the following:'); $this->output->writeln('<error>'); $this->output->writeln(explode(chr(10), $event->getDetails())); $this->output->writeln('</>'); }
public function handle(Event $event) { $postList = $this->em->getRepository('Contents:PostList')->find($event->getId()); if (!$postList) { $postList = new PostList($event->getId(), $event->getTitle()); $this->em->persist($postList); } else { $postList->setTitle($event->getTitle()); } $this->em->flush(); }
public function handle(Event $event) { $io = new SymfonyStyle(new StringInput(''), $this->output); $io->section('Payroll sending report'); $io->table(array('Month', $event->getMonth()), array(array('Employees', $event->getProgress()->getTotal()), array('Sent emails', $event->getProgress()->getSent()), array('Payrolls not found', $event->getProgress()->getNotFound()), array('Emails Failed', $event->getProgress()->getFailed()))); }
protected function prepareTemplateParameters(Event $event) { return array('month' => $event->getMonth(), 'sent' => $event->getProgress()->getCurrent(), 'total' => $event->getProgress()->getTotal(), 'employees' => $event->getProgress()->getTotal(), 'ok' => $event->getProgress()->getSent(), 'not_found' => $event->getProgress()->getNotFound(), 'failed' => $event->getProgress()->getFailed()); }
public function handle(Event $event) { $message = sprintf('%s. <options=bold>%s.</> No payroll document found for this employee.', $event->getProgress(), $event->getEmployee()); $this->output->writeln($message); }
protected function prepareTemplateParameters(Event $event) { return array('id' => $event->getId(), 'title' => $event->getTitle(), 'author' => $event->getAuthor()); }
protected function prepareTemplateParameters(Event $event) { return array('device' => $event->getDevice(), 'details' => $event->getDetails()); }
public function applyModificationEvent(Event $event) { $this->value = $event->getValue(); }
public function handle(Event $event) { $message = sprintf('%s. <options=bold>%s.</> <error>could not be sent</>. Error: %s', $event->getProgress(), $event->getEmployee(), $event->getError()); $this->output->writeln($message); }
public function handle(Event $event) { file_put_contents($this->file, $event->getProgress()->asJson()); }
public function handle(Event $event) { $message = sprintf('%s. <options=bold>%s.</> was sent', $event->getProgress(), $event->getEmployee()); $this->output->writeln($message); }