You are here

public function MigrateDestinationEntityAPI::__construct in Migrate Extras 7.2

Basic initialization

Parameters

string $entity_type:

string $bundle:

array $options: Options (language, text_format) used for creating fields.

Overrides MigrateDestinationEntity::__construct

File

./entity_api.inc, line 106
Support for entity types implementing the Entity API.

Class

MigrateDestinationEntityAPI
Destination class implementing migration into entity types.

Code

public function __construct($entity_type, $bundle, array $options = array()) {
  parent::__construct($entity_type, $bundle, $options);
  $this->info = entity_get_info($entity_type);
  $this->id = isset($this->info['entity keys']['name']) ? $this->info['entity keys']['name'] : $this->info['entity keys']['id'];
  $this->revision = isset($this->info['entity keys']['revision']) ? $this->info['entity keys']['revision'] : NULL;
}