om = $om; } /** * {@inheritdoc} * * @return Task */ public function convert($id) { if (null === $task = $this->om->find('Phraseanet:Task', (int) $id)) { throw new NotFoundHttpException(sprintf('Task %s not found.', $id)); } return $task; } }