You are here

protected function FeedsMapperDateTest::getFormFieldsNames in Feeds 8.2

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 FeedsMapperTestBase::getFormFieldsNames

File

lib/Drupal/feeds/Tests/FeedsMapperDateTest.php, line 131
Test case for date field mapper mappers/date.inc.

Class

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

Namespace

Drupal\feeds\Tests

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