mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
FIX #5363 Add .JSON option for templates
This commit is contained in:
parent
4f14175022
commit
ae268ae4df
@ -244,6 +244,14 @@ abstract class DBField extends ViewableData {
|
||||
return Convert::raw2js($this->value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return JSON encoded value
|
||||
* @return string
|
||||
*/
|
||||
public function JSON() {
|
||||
return Convert::raw2json($this->value);
|
||||
}
|
||||
|
||||
public function HTML(){
|
||||
return Convert::raw2xml($this->value);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user