protected function FeedsMapperDateTestCase::getFormFieldsNames in Feeds 7
Same name and namespace in other branches
- 6 tests/feeds_mapper_date.test \FeedsMapperDateTestCase::getFormFieldsNames()
- 7.2 tests/feeds_mapper_date.test \FeedsMapperDateTestCase::getFormFieldsNames()
Returns the form fields names for a given CCK field. Default implementation provides support for a single form field with the following name pattern <code>"field_{$field_name}[{$index}][value]"</code>
Parameters
$field_name: The name of the CCK field.
$index: The index of the field (for q multi-valued field).
Return value
An array of form field names.
Overrides FeedsMapperTestCase::getFormFieldsNames
File
- tests/
feeds_mapper_date.test, line 100
Class
- FeedsMapperDateTestCase
- Class for testing Feeds <em>content</em> mapper.
Code
protected function getFormFieldsNames($field_name, $index) {
if (in_array($field_name, array(
'date',
'datetime',
'datestamp',
))) {
return array(
"field_{$field_name}[{$index}][value][date]",
);
}
else {
return parent::getFormFieldsNames($field_name, $index);
}
}