mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
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:
parent
c1d59185a9
commit
f7b019bff6
@ -2175,11 +2175,11 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
|
|||||||
* @return string HTML data representing this object
|
* @return string HTML data representing this object
|
||||||
*/
|
*/
|
||||||
public function debug() {
|
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) {
|
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;
|
return $val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user