public function FieldGroup::rollback in Field Group 8
Same name and namespace in other branches
- 8.3 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 62 - Contains \Drupal\field_group_migrate\Plugin\migrate\destination\d7\FieldGroup.
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();
}
}