protected function FeedsMapperDateTestCase::getFormFieldsNames in Feeds 6
Same name and namespace in other branches
- 7.2 tests/feeds_mapper_date.test \FeedsMapperDateTestCase::getFormFieldsNames()
- 7 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 86 - Test case for CCK date field mapper mappers/date.inc.
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);
}
}