You are here

protected function FeedsMapperLinkTest::getFormFieldsNames in Feeds 8.2

Override parent::getFormFieldsNames().

Overrides FeedsMapperTestBase::getFormFieldsNames

File

lib/Drupal/feeds/Tests/FeedsMapperLinkTest.php, line 136
Test case for CCK link mapper mappers/date.inc.

Class

FeedsMapperLinkTest
Class for testing Feeds <em>link</em> mapper.

Namespace

Drupal\feeds\Tests

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);
  }
}