public function FieldGroup::rollback in Field Group 8.3
Same name and namespace in other branches
- 8 contrib/field_group_migrate/src/Plugin/migrate/destination/d7/FieldGroup.php \Drupal\field_group_migrate\Plugin\migrate\destination\d7\FieldGroup::rollback()
Delete the specified destination object from the target Drupal.
Parameters
array $destination_identifier: The ID of the destination object to delete.
Overrides DestinationBase::rollback
File
- contrib/
field_group_migrate/ src/ Plugin/ migrate/ destination/ d7/ FieldGroup.php, line 58
Class
- FieldGroup
- This class imports one field_group of an entity form display.
Namespace
Drupal\field_group_migrate\Plugin\migrate\destination\d7Code
public function rollback(array $destination_identifier) {
$entity = $this
->getEntity($destination_identifier['entity_type'], $destination_identifier['bundle'], $destination_identifier['mode'], $destination_identifier['type']);
if (!$entity
->isNew()) {
$entity
->unsetThirdPartySetting('field_group', $destination_identifier['group_name']);
$entity
->save();
}
}