You are here

protected function FeedsMapperContentTaxonomyTestCase::getFormFieldsNames in Feeds 6

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_content_taxonomy.test, line 148

Class

FeedsMapperContentTaxonomyTestCase
Class for testing Feeds <em>content</em> mapper.

Code

protected function getFormFieldsNames($field_name, $index) {
  switch ($field_name) {
    case 'tags':
      return array(
        "field_{$field_name}[value]",
      );
    case 'categories':
      return array(
        "field_{$field_name}[value][]",
      );
    default:
      return parent::getFormFieldsNames($field_name, $index);
  }
}