public function getProgenitors() { $class = $this->getItemModel(); return $class::progenitors($this)->get(); }
/** * Remove category * * @param Category $category category instance * @return bool */ public function remove(Category $category) { foreach ($category->getProgenitors() as $item) { $this->removeItem($item); } return $category->delete(); }