protected function buildChildren($children) { $structure = array(); foreach ($children as $child) { if (TRUE === (bool) $child->getEnabled()) { $name = $child->getName(); $structure[$name] = $child->build(); } } return $structure; }