protected function ServicesClientFieldD6Formatter::formatEmptyValue in Services Client 7.2
Retrieve empty value formatting by configuration.
Return value
array|NULL Formatted empty value.
Overrides ServicesClientFieldFormatter::formatEmptyValue
File
- include/
mapping.inc, line 845
Class
- ServicesClientFieldD6Formatter
- D6 and D5 field formatter.
Code
protected function formatEmptyValue() {
if ($this->config['empty'] == 'no_field') {
return NULL;
}
elseif ($this->config['empty'] == 'null_field') {
return array(
'key' => $this->config['field'],
'value' => array(),
);
}
elseif ($this->config['empty'] == 'null_property') {
return array(
'key' => $this->config['field'],
'value' => NULL,
);
}
elseif ($this->config['empty'] == 'default_value') {
return array(
'key' => $this->config['field'],
'value' => array(
array(
$this->config['property'] => $this->config['default_value'],
),
),
);
}
}