예제 #1
0
 private static function loadCategoriesFromDb(DbEntry $article)
 {
     $categories = new CategoryCollection();
     foreach ($article->related("article_category") as $category) {
         $categories->addItem(CategoryService::loadFromDb($category->category));
     }
     return $categories;
 }
예제 #2
0
 private function toEntity(DbEntry $category)
 {
     return CategoryService::loadFromDb($category);
 }