Skip to content
This repository was archived by the owner on Apr 17, 2024. It is now read-only.

Commit 27ae0f4

Browse files
authored
fix: remove default content on uninstall (#321)
Closes #319.
1 parent a8cd75b commit 27ae0f4

2 files changed

Lines changed: 12 additions & 2 deletions

File tree

modules/contenta_enhancements/src/Form/RevertForm.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,19 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
6868
* {@inheritdoc}
6969
*/
7070
public function getQuestion() {
71+
return $this->t('Revert to clean state?');
72+
}
73+
74+
/**
75+
* {@inheritdoc}
76+
*/
77+
public function getDescription() {
7178
return $this->t('This action will remove all the default content and the front-end theme. Are you sure you want to proceed?');
7279
}
7380

81+
/**
82+
* {@inheritdoc}
83+
*/
7484
public function getCancelUrl() {
7585
return new Url('<front>');
7686
}

modules/recipes_magazin/recipes_magazin.install

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ function recipes_magazin_modules_installed($modules) {
1515
}
1616

1717
/**
18-
* Implements hook_modules_uninstalled().
18+
* Implements hook_uninstall().
1919
*/
20-
function recipes_magazin_modules_uninstalled($modules) {
20+
function recipes_magazin_uninstall() {
2121
$migrations = _recipes_magazin_migration_names();
2222
\Drupal::service('recipes.migration_runner')->remove($migrations);
2323
\Drupal::messenger()->addMessage(t('The rollback of the demo content was successful.'));

0 commit comments

Comments
 (0)