/**
* Provides a form removing module content entities data before uninstallation.
+ *
+ * @internal
*/
class PrepareModulesEntityUninstallForm extends ConfirmFormBase {
'@entity_type_singular' => $entity_type->getSingularLabel(),
'@entity_type_plural' => $entity_type->getPluralLabel(),
]
- )
+ ),
];
}
$storage->delete($entities);
}
// Sometimes deletes cause secondary deletes. For example, deleting a
- // taxonomy term can cause it's children to be be deleted too.
+ // taxonomy term can cause its children to be be deleted too.
$context['sandbox']['progress'] = $context['sandbox']['max'] - $storage->getQuery()->count()->execute();
// Inform the batch engine that we are not finished and provide an
*/
public static function moduleBatchFinished($success, $results, $operations) {
$entity_type_plural = \Drupal::entityTypeManager()->getDefinition($results['entity_type_id'])->getPluralLabel();
- drupal_set_message(t('All @entity_type_plural have been deleted.', ['@entity_type_plural' => $entity_type_plural]));
+ \Drupal::messenger()->addStatus(t('All @entity_type_plural have been deleted.', ['@entity_type_plural' => $entity_type_plural]));
return new RedirectResponse(Url::fromRoute('system.modules_uninstall')->setAbsolute()->toString());
}