Example #1
0
 public function getEmptyArticleAction()
 {
     $article = new Article();
     $article->setAuthor($this->app->entityManager->getRepository(EntityNames::USER)->find($_SESSION['user_id']));
     $now = new DateTime('now', new DateTimeZone('UTC'));
     $article->setCreationDate($now);
     $article->setLastEditDate($now);
     ResponseFactory::createJsonResponse($this->app, $article);
 }