You are here

protected function FeedsMapperLinkTestCase::getFormFieldsNames in Feeds 7.2

Same name and namespace in other branches
  1. 6 tests/feeds_mapper_link.test \FeedsMapperLinkTestCase::getFormFieldsNames()
  2. 7 tests/feeds_mapper_link.test \FeedsMapperLinkTestCase::getFormFieldsNames()

Override parent::getFormFieldsNames().

Overrides FeedsMapperTestCase::getFormFieldsNames

File

tests/feeds_mapper_link.test, line 365
Contains FeedsMapperLinkTestCase.

Class

FeedsMapperLinkTestCase
Test case for CCK link mapper mappers/date.inc.

Code

protected function getFormFieldsNames($field_name, $index) {
  if (in_array($field_name, array(
    'alpha',
    'beta',
    'gamma',
    'omega',
  ))) {
    $fields = array(
      "field_{$field_name}[und][{$index}][url]",
    );
    if (in_array($field_name, array(
      'alpha',
      'gamma',
    ))) {
      $fields[] = "field_{$field_name}[und][{$index}][title]";
    }
    return $fields;
  }
  else {
    return parent::getFormFieldsNames($field_name, $index);
  }
}