Eccube\Entity\Category::getDescendants PHP Method

getDescendants() public method

public getDescendants ( )
    public function getDescendants()
    {
        $DescendantCategories = array();
        $max = 10;
        $ChildCategories = $this->getChildren();
        foreach ($ChildCategories as $ChildCategory) {
            $DescendantCategories[$ChildCategory->getId()] = $ChildCategory;
            $DescendantCategories2 = $ChildCategory->getDescendants();
            foreach ($DescendantCategories2 as $DescendantCategory) {
                $DescendantCategories[$DescendantCategory->getId()] = $DescendantCategory;
            }
        }
        return $DescendantCategories;
    }