ProductCategory::GroupsMenu PHP Method

GroupsMenu() public method

Recursively generate a product menu, starting from the topmost category.
public GroupsMenu ( ) : DataList
return DataList
    public function GroupsMenu()
    {
        if ($this->Parent() instanceof ProductCategory) {
            return $this->Parent()->GroupsMenu();
        }
        return ProductCategory::get()->filter("ParentID", $this->ID);
    }