You are here

public function RangeMigrateFieldHandler::getRangeFieldLanguage in Range 7

Determines field language.

Parameters

object $entity: Entity being processed.

array $field_info: Field info.

array $arguments: Arguments passed to the field migration handler.

int $delta: Field values delta.

Return value

string Language code.

See also

MigrateFieldHandler::getFieldLanguage()

1 call to RangeMigrateFieldHandler::getRangeFieldLanguage()
RangeMigrateFieldHandler::prepare in migrate/destinations/range.inc

File

migrate/destinations/range.inc, line 112
Contains range field migration handler.

Class

RangeMigrateFieldHandler
Range field migration handler class.

Code

public function getRangeFieldLanguage($entity, array $field_info, array $arguments, $delta = 0) {
  static $language = NULL;
  if (is_null($language)) {
    $language = $this
      ->getFieldLanguage($entity, $field_info, $arguments);
  }
  if (!is_array($language)) {
    return $language;
  }
  else {
    if (!empty($language[$delta])) {
      return $language[$delta];
    }
    else {
      return LANGUAGE_NONE;
    }
  }
}