You are here

function _blockgroup_branch_flatten in Block Group 7.2

Same name and namespace in other branches
  1. 7 blockgroup.module \_blockgroup_branch_flatten()

Return an array of block ids which are descentants to the given bid.

1 call to _blockgroup_branch_flatten()
blockgroup_block_list_alter in ./blockgroup.module
Implements hook_block_list_alter().

File

./blockgroup.module, line 214
Add block groups to block configuration page

Code

function _blockgroup_branch_flatten($bid, $branches) {
  $result = array();
  $result[] = $bid;
  if (isset($branches[$bid])) {
    foreach ($branches[$bid] as $branch) {
      $result = array_merge($result, _blockgroup_branch_flatten($branch, $branches));
    }
  }
  return $result;
}