/** Pretty print JSON values in edit
*/
class AdminerPrettyJsonColumn {
- /** @var AdminerPlugin */
- protected $adminer;
-
- public function __construct($adminer) {
- $this->adminer = $adminer;
- }
-
private function testJson($value) {
if ((substr($value, 0, 1) == '{' || substr($value, 0, 1) == '[') && ($json = json_decode($value, true))) {
return $json;
$value = json_encode($json);
}
}
- return $this->adminer->_callParent('processInput', array($field, $value, $function));
}
}