protected function FeedsMapperContentTaxonomyTestCase::getFormFieldsValues in Feeds 6
Returns the form fields values for a given CCK field. Default implementation returns a single element array with $value casted to a string.
Parameters
$field_name: The name of the CCK field.
$value: The (raw) value expected for the CCK field.
Return value
An array of form field values.
Overrides FeedsMapperTestCase::getFormFieldsValues
File
- tests/
feeds_mapper_content_taxonomy.test, line 159
Class
- FeedsMapperContentTaxonomyTestCase
- Class for testing Feeds <em>content</em> mapper.
Code
protected function getFormFieldsValues($field_name, $value) {
switch ($field_name) {
case 'tags':
if (is_array($value)) {
// @todo sort tags by weight before joining
$value = join(', ', $value);
}
return array(
$value,
);
case 'categories':
// @todo return tid(s) from $value
default:
return parent::getFormFieldsValues($field_name, $value);
}
}