public function MigrateDestinationFieldCollection::rollback

cis7 field_collection.migrate.inc public MigrateDestinationFieldCollection::rollback(array $key)
cle7 field_collection.migrate.inc public MigrateDestinationFieldCollection::rollback(array $key)
elmsmedia7 field_collection.migrate.inc public MigrateDestinationFieldCollection::rollback(array $key)
icor7 field_collection.migrate.inc public MigrateDestinationFieldCollection::rollback(array $key)
meedjum_blog7 field_collection.migrate.inc public MigrateDestinationFieldCollection::rollback(array $key)
mooc7 field_collection.migrate.inc public MigrateDestinationFieldCollection::rollback(array $key)

Delete a migrated collection.

Parameters

$key: Array of fields representing the key.

File

sites/all/modules/ulmus/field_collection/field_collection.migrate.inc, line 156
Support for the Migrate API.

Class

MigrateDestinationFieldCollection
Destination class implementing migration into field_collection.

Code

public function rollback(array $key) {
  $item_id = reset($key);

  $this->prepareRollback($item_id);
  $field_collection_item = field_collection_item_load($item_id);
  // If the collection wasn't imported then we can't roll it back, so check if
  // the loaded object is an instance of the FieldCollectionItemEntity class.
  if ($field_collection_item instanceof FieldCollectionItemEntity) {
    $field_collection_item->delete();
  }

  $this->completeRollback($item_id);
  return TRUE;
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.