function _domain_block_print_array in Domain Access 7.3
Same name and namespace in other branches
- 6.2 domain.module \_domain_block_print_array()
- 7.2 domain.blocks.inc \_domain_block_print_array()
Prints array data for the server block.
Parameters
$array: An array of data. Note that we support two levels of nesting.
Return value
A suitable output string.
1 call to _domain_block_print_array()
- domain_block_view_server in ./
domain.blocks.inc - Prints information about the current HTTP request.
File
- ./
domain.blocks.inc, line 143 - Block view functions for Domain Access.
Code
function _domain_block_print_array($array) {
$items = array();
foreach ($array as $key => $val) {
$value = 'array';
if (!is_array($val)) {
$value = check_plain($val);
}
else {
$list = array();
foreach ($val as $k => $v) {
$list[] = t('@key : @value', array(
'@key' => $k,
'@value' => $v,
));
}
$value = implode('<br />', $list);
}
$items[] = t('@key : !value', array(
'@key' => $key,
'!value' => $value,
));
}
return theme('item_list', array(
'items' => $items,
));
}