foreach ($articles as $key => $article) : $articles[$key]->type = $this->getArticleTypeLabel($articles[$key]->type); $articles[$key]->category = $this->getArticleCategoryLabel($articles[$key]->category); endforeach;