function Entity::rollback
Same name in other branches
- 8.9.x core/modules/migrate/src/Plugin/migrate/destination/Entity.php \Drupal\migrate\Plugin\migrate\destination\Entity::rollback()
- 10 core/modules/migrate/src/Plugin/migrate/destination/Entity.php \Drupal\migrate\Plugin\migrate\destination\Entity::rollback()
- 11.x core/modules/migrate/src/Plugin/migrate/destination/Entity.php \Drupal\migrate\Plugin\migrate\destination\Entity::rollback()
Overrides DestinationBase::rollback
3 calls to Entity::rollback()
- EntityConfigBase::rollback in core/
modules/ migrate/ src/ Plugin/ migrate/ destination/ EntityConfigBase.php - Delete the specified destination object from the target Drupal.
- EntityContentBase::rollback in core/
modules/ migrate/ src/ Plugin/ migrate/ destination/ EntityContentBase.php - Delete the specified destination object from the target Drupal.
- EntityContentComplete::rollback in core/
modules/ migrate/ src/ Plugin/ migrate/ destination/ EntityContentComplete.php - Delete the specified destination object from the target Drupal.
2 methods override Entity::rollback()
- EntityConfigBase::rollback in core/
modules/ migrate/ src/ Plugin/ migrate/ destination/ EntityConfigBase.php - Delete the specified destination object from the target Drupal.
- EntityContentBase::rollback in core/
modules/ migrate/ src/ Plugin/ migrate/ destination/ EntityContentBase.php - Delete the specified destination object from the target Drupal.
File
-
core/
modules/ migrate/ src/ Plugin/ migrate/ destination/ Entity.php, line 213
Class
- Entity
- Provides a generic destination to import entities.
Namespace
Drupal\migrate\Plugin\migrate\destinationCode
public function rollback(array $destination_identifier) {
// Delete the specified entity from Drupal if it exists.
$entity = $this->storage
->load(reset($destination_identifier));
if ($entity) {
$entity->delete();
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.