Esempio n. 1
0
 protected function addCategory(CategoryInterface $category)
 {
     $key = $category->getKey();
     if (isset($this->categories[$key])) {
         // combine categories
         $data = Category::toArray($this->categories[$key]);
         $data = array_merge($data, Category::toArray($category));
         $category = $this->createCategory($data);
     }
     $this->categories[$key] = $category;
 }