class MigrateDestinationCommerceProduct in Commerce Migrate 7
Destination class implementing migration into commerce products.
Hierarchy
- class \MigrateDestination
- class \MigrateDestinationEntity
Expanded class hierarchy of MigrateDestinationCommerceProduct
File
- plugins/
destinations/ commerce_product.inc, line 11 - Support for commerce products.
View source
class MigrateDestinationCommerceProduct extends MigrateDestinationEntityAPI {
/**
* Returns a list of fields available to be mapped.
*
* @param Migration $migration
* Optionally, the migration containing this destination.
*
* @return array
* Keys: machine names of the fields (to be passed to addFieldMapping)
* Values: Human-friendly descriptions of the fields.
*/
public function fields($migration = NULL) {
$fields = parent::fields($migration);
// Commerce Product module declares various properties that either are
// irrelevant to migrations or are pseudoproperties that don't exist in the
// database. Hence we remove them as potential destinations here.
// @see commerce_product_entity_property_info()
unset($fields['type']);
unset($fields['creator']);
return $fields;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
MigrateDestination:: |
protected | property | Maintain stats on the number of destination objects created or updated. | |
MigrateDestination:: |
protected | property | ||
MigrateDestination:: |
public | function | ||
MigrateDestination:: |
public | function | ||
MigrateDestination:: |
public | function | Reset numCreated and numUpdated back to 0. | |
MigrateDestinationCommerceProduct:: |
public | function |
Returns a list of fields available to be mapped. Overrides MigrateDestinationEntityAPI:: |
|
MigrateDestinationEntity:: |
protected | property | The bundle (node type, vocabulary, etc.) of the destination. | |
MigrateDestinationEntity:: |
protected | property | The entity type (node, user, taxonomy_term, etc.) of the destination. | |
MigrateDestinationEntity:: |
protected | property | Default language for text fields in this destination. | |
MigrateDestinationEntity:: |
protected | property | Default input format for text fields in this destination. | |
MigrateDestinationEntity:: |
public static | function | Flattens an array of allowed values. | |
MigrateDestinationEntity:: |
public | function | Give handlers a shot at modifying the object (or taking additional action) after saving it. | |
MigrateDestinationEntity:: |
public | function | Give handlers a shot at cleaning up after an entity has been rolled back. | |
MigrateDestinationEntity:: |
public static | function | Perform field validation against the field data in an entity. Wraps field_attach_validate to handle exceptions cleanly and provide maximum information for identifying the cause of validation errors. | |
MigrateDestinationEntity:: |
public | function | ||
MigrateDestinationEntity:: |
public | function | ||
MigrateDestinationEntity:: |
public | function | ||
MigrateDestinationEntity:: |
public | function | ||
MigrateDestinationEntity:: |
public | function | Give handlers a shot at modifying the object before saving it. | |
MigrateDestinationEntity:: |
public | function | Give handlers a shot at cleaning up before an entity has been rolled back. | |
MigrateDestinationEntity:: |
public | function |
Derived classes must implement __toString(). Overrides MigrateDestination:: |
|
MigrateDestinationEntityAPI:: |
protected | property | Name of the entity id key (for example, nid for nodes). | |
MigrateDestinationEntityAPI:: |
protected | property | Info about the current entity type. | |
MigrateDestinationEntityAPI:: |
protected | property | Name of the entity revision key (for example, vid for nodes). | |
MigrateDestinationEntityAPI:: |
public | function | Deletes multiple entities. | |
MigrateDestinationEntityAPI:: |
public | function | Gets the schema for the base key(s) of an entity type. | |
MigrateDestinationEntityAPI:: |
public | function |
Imports a single entity. Overrides MigrateDestination:: |
|
MigrateDestinationEntityAPI:: |
public static | function | Return an options array (language, text_format), used for creating fields. | |
MigrateDestinationEntityAPI:: |
public | function | Clear the field cache after an import or rollback. | |
MigrateDestinationEntityAPI:: |
public | function | ||
MigrateDestinationEntityAPI:: |
public | function |
Basic initialization Overrides MigrateDestinationEntity:: |