protected function FeedsMapperDateTestCase::getFormFieldsNames in Feeds 7.2
Same name and namespace in other branches
- 6 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 128 - Contains FeedsMapperDateTestCase.
Class
- FeedsMapperDateTestCase
- Test case for CCK date field mapper mappers/date.inc.
Code
protected function getFormFieldsNames($field_name, $index) {
if (in_array($field_name, array(
'date',
'datetime',
'datestamp',
))) {
return array(
"field_{$field_name}[und][{$index}][value][date]",
);
}
else {
return parent::getFormFieldsNames($field_name, $index);
}
}