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