MINOR Improved DataObject->debug() formatting

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77923 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2009-05-27 03:22:52 +00:00
parent c1d59185a9
commit f7b019bff6

View File

@ -2175,11 +2175,11 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
* @return string HTML data representing this object
*/
public function debug() {
$val = "<h3>Database record: $this->class</h3><ul>";
$val = "<h3>Database record: $this->class</h3>\n<ul>\n";
if($this->record) foreach($this->record as $fieldName => $fieldVal) {
$val .= "<li style=\"list-style-type: disc; margin-left: 20px\">$fieldName : " . Debug::text($fieldVal) . "</li>";
$val .= "\t<li>$fieldName: " . Debug::text($fieldVal) . "</li>\n";
}
$val .= "</ul>";
$val .= "</ul>\n";
return $val;
}