Newscoop\Service\Implementation\ArticleTypeServiceDoctrine::findFields PHP Method

findFields() public method

public findFields ( ArticleType $type )
$type Newscoop\Entity\ArticleType
    public function findFields(ArticleType $type)
    {
        $query = $this->getManager()->getRepository('Newscoop\\Entity\\ArticleTypeField')->getFieldsForType($type);
        /**
         * @todo at refactor @see hack from \Newscoop\Entity\ArticleTypeField
         */
        foreach ($results = $query->getResult() as $atf) {
            $atf->setArticleType($type);
        }
        return $results;
    }