SilverCart\Model\Pages\ProductGroupHolderController::getRecursiveProductGroupsForGroupedDropdownAsArray
Builds an associative array of ProductGroups to use in GroupedDropDownFields.
Signature
public function getRecursiveProductGroupsForGroupedDropdownAsArray([SiteTree
$parent = NULL,
[boolean
$allChildren = false,
[boolean
$withParent = false]]] )
Parameters
$parent
—
object
- Expects a ProductGroupHolder or a ProductGroupPage
$allChildren
—
boolean
- Indicate wether all children or only the visible ones should be included
$withParent
—
boolean
- Indicate wether the parent should be included
Returns
- array