protected function ServicesClientFieldD6Formatter::formatArray in Services Client 7.2
Format source value array to field.
Parameters
array $values: Source values that should be formatted.
Return value
array Formatted value in format
Overrides ServicesClientFieldFormatter::formatArray
File
- include/
mapping.inc, line 878
Class
- ServicesClientFieldD6Formatter
- D6 and D5 field formatter.
Code
protected function formatArray($values) {
// Make handy shortcuts
$field = $this->config['field'];
$property = $this->config['property'];
// Build final value
$out = array();
foreach ($values as $value) {
$out[][$property] = $value;
}
// Return resulting value.
return array(
'key' => $this->config['field'],
'value' => $out,
);
}