protected function FeedsMapperLinkTestCase::getFormFieldsValues in Feeds 6
Same name and namespace in other branches
- 7.2 tests/feeds_mapper_link.test \FeedsMapperLinkTestCase::getFormFieldsValues()
- 7 tests/feeds_mapper_link.test \FeedsMapperLinkTestCase::getFormFieldsValues()
Override parent::getFormFieldsValues().
Overrides FeedsMapperTestCase::getFormFieldsValues
File
- tests/
feeds_mapper_link.test, line 147 - Test case for CCK link mapper mappers/date.inc.
Class
- FeedsMapperLinkTestCase
- Class for testing Feeds <em>link</em> mapper.
Code
protected function getFormFieldsValues($field_name, $value) {
$field = content_fields($field_name);
if (in_array($field_name, array(
'alpha',
'beta',
'gamma',
'omega',
))) {
if (!is_array($value)) {
$value = array(
'url' => $value,
);
}
$values = array(
$value['url'],
);
if (in_array($field_name, array(
'alpha',
'gamma',
))) {
$values[] = isset($value['title']) ? $value['title'] : '';
}
return $values;
}
else {
return parent::getFormFieldsValues($field_name, $index);
}
}