Example #1
0
 public function indexAction()
 {
     /** @var string|null $id */
     $id = $this->params('id');
     $resume = $this->repository->find($id);
     if (!$resume) {
         $this->getResponse()->setStatusCode(Response::STATUS_CODE_404);
         return ['message' => sprintf($this->translator->translate('Resume with id "%s" not found'), $id)];
     }
     /* @todo REMOVE THIS
      * @codeCoverageIgnoreStart */
     if (!$resume->getDateCreated()) {
         $resume->setDateCreated();
     }
     /* @codeCoverageIgnoreEnd */
     $this->acl($resume, 'view');
     return ['resume' => $resume];
 }