function Drupali18nTestCase::formatTable in Internationalization 7
Same name and namespace in other branches
- 6 tests/drupal_i18n_test_case.php \Drupali18nTestCase::formatTable()
Format object as table, recursive
1 call to Drupali18nTestCase::formatTable()
- Drupali18nTestCase::printObject in ./
i18n.test - Debug dump object with some formatting
File
- ./
i18n.test, line 426 - Base class for Internationalization tests
Class
- Drupali18nTestCase
- @file Base class for Internationalization tests
Code
function formatTable($object) {
foreach ($object as $key => $value) {
$rows[] = array(
$key,
is_array($value) || is_object($value) ? $this
->formatTable($value) : $value,
);
}
if (!empty($rows)) {
return theme('table', array(
'rows' => $rows,
));
}
else {
return 'No properties';
}
}