public function MigrateFieldMapping::__construct in Migrate 7.2
Same name and namespace in other branches
- 6.2 includes/field_mapping.inc \MigrateFieldMapping::__construct()
File
- includes/
field_mapping.inc, line 168 - The MigrateFieldMapping class - tracking mappings between source and destination.
Class
- MigrateFieldMapping
- @file The MigrateFieldMapping class - tracking mappings between source and destination.
Code
public function __construct($destination_field, $source_field) {
// Must have one or the other
if (!$destination_field && !$source_field) {
throw new Exception('Field mappings must have a destination field or a source field');
}
$this->destinationField = $destination_field;
$this->sourceField = $source_field;
$this->issueGroup = t('Done');
if (count(self::$priorities) == 0) {
self::$priorities[self::ISSUE_PRIORITY_OK] = t('OK');
self::$priorities[self::ISSUE_PRIORITY_LOW] = t('Low');
self::$priorities[self::ISSUE_PRIORITY_MEDIUM] = t('Medium');
self::$priorities[self::ISSUE_PRIORITY_BLOCKER] = t('Blocker');
}
}