function _payment_status_hierarchy_level in Payment 7
Helper function for payment_status_hierarchy().
Parameters
string[] $statuses: An array with payment statuses that are part of the same hierarchy level.
array[] $children: Keys are payment statuses. Values are arrays with those statuses' child statuses.
Return value
array The return value is identical to that of payment_status_hierarchy().
1 call to _payment_status_hierarchy_level()
- payment_status_hierarchy in ./
payment.ui.inc - Returns a hierarchical representation of payment statuses.
File
- ./
payment.ui.inc, line 1102 - The Payment user interface.
Code
function _payment_status_hierarchy_level(array $statuses, array $children) {
$hierarchy = array();
foreach ($statuses as $status) {
$hierarchy[$status] = isset($children[$status]) ? _payment_status_hierarchy_level($children[$status], $children) : array();
}
return $hierarchy;
}