public function getName() { if ($this->__isInitialized__ === false) { return $this->_identifier["name"]; } $this->__load(); return parent::getName(); }
public function findFields(ArticleType $type) { $qb = $this->getEntityManager()->createQueryBuilder(); $qb->select(self::ALIAS)->from('\\Newscoop\\Entity\\ArticleTypeField', self::ALIAS)->where(self::ALIAS . '.typeHack = ?1' . ' AND ' . self::ALIAS . ".name IS NOT NULL" . ' AND ' . self::ALIAS . ".name <> 'NULL'")->setParameter(1, $type->getName()); /** * @todo at refactor @see hack from \Newscoop\Entity\ArticleTypeField */ foreach ($results = $qb->getQuery()->getResult() as $atf) { $atf->setArticleType($type); } return $results; }