public function createBlog($title, \Section $section) { $article = new \Article($section->getLanguageId()); $article->create($this->config['article_type'], $title, $section->getPublicationId(), $section->getIssueNumber(), $section->getSectionNumber()); $qb = $this->em->createQueryBuilder(); $qb->select('atf')->from('\\Newscoop\\Entity\\ArticleTypeField', 'atf')->where("atf.typeHack = ?1 AND atf.name IS NOT NULL AND atf.name = 'NULL'")->setParameter(1, $this->config['article_type']); $articleTypeField = $qb->getQuery()->getOneOrNullResult(); $article->setCommentsEnabled($articleTypeField->getCommentsEnabled()); return $article; }