FIX #5363 Add .JSON option for templates

This commit is contained in:
Robbie Averill 2016-04-21 16:59:11 +12:00
parent 4f14175022
commit ae268ae4df

View File

@ -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);
}