You are here

class MigrateDestinationCommerceLicense in Commerce Migrate 7

Destination class implementing migration into commerce products.

Hierarchy

Expanded class hierarchy of MigrateDestinationCommerceLicense

File

plugins/destinations/commerce_license.inc, line 11
Support for commerce products.

View source
class MigrateDestinationCommerceLicense 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);
    unset($fields['type']);
    $fields['granted'] = t('The date when the license was granted.');
    $fields['expires'] = t('The date when the license expires. 0 for never.');
    return $fields;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
MigrateDestination::$numCreated protected property Maintain stats on the number of destination objects created or updated.
MigrateDestination::$numUpdated protected property
MigrateDestination::getCreated public function
MigrateDestination::getUpdated public function
MigrateDestination::resetStats public function Reset numCreated and numUpdated back to 0.
MigrateDestinationCommerceLicense::fields public function Returns a list of fields available to be mapped. Overrides MigrateDestinationEntityAPI::fields
MigrateDestinationEntity::$bundle protected property The bundle (node type, vocabulary, etc.) of the destination.
MigrateDestinationEntity::$entityType protected property The entity type (node, user, taxonomy_term, etc.) of the destination.
MigrateDestinationEntity::$language protected property Default language for text fields in this destination.
MigrateDestinationEntity::$textFormat protected property Default input format for text fields in this destination.
MigrateDestinationEntity::array_flatten public static function Flattens an array of allowed values.
MigrateDestinationEntity::complete public function Give handlers a shot at modifying the object (or taking additional action) after saving it.
MigrateDestinationEntity::completeRollback public function Give handlers a shot at cleaning up after an entity has been rolled back.
MigrateDestinationEntity::fieldAttachValidate 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::getBundle public function
MigrateDestinationEntity::getEntityType public function
MigrateDestinationEntity::getLanguage public function
MigrateDestinationEntity::getTextFormat public function
MigrateDestinationEntity::prepare public function Give handlers a shot at modifying the object before saving it.
MigrateDestinationEntity::prepareRollback public function Give handlers a shot at cleaning up before an entity has been rolled back.
MigrateDestinationEntity::__toString public function Derived classes must implement __toString(). Overrides MigrateDestination::__toString
MigrateDestinationEntityAPI::$id protected property Name of the entity id key (for example, nid for nodes).
MigrateDestinationEntityAPI::$info protected property Info about the current entity type.
MigrateDestinationEntityAPI::$revision protected property Name of the entity revision key (for example, vid for nodes).
MigrateDestinationEntityAPI::bulkRollback public function Deletes multiple entities.
MigrateDestinationEntityAPI::getKeySchema public function Gets the schema for the base key(s) of an entity type.
MigrateDestinationEntityAPI::import public function Imports a single entity. Overrides MigrateDestination::import
MigrateDestinationEntityAPI::options public static function Return an options array (language, text_format), used for creating fields.
MigrateDestinationEntityAPI::postImport public function Clear the field cache after an import or rollback.
MigrateDestinationEntityAPI::postRollback public function
MigrateDestinationEntityAPI::__construct public function Basic initialization Overrides MigrateDestinationEntity::__construct