public function WebformDevelCommands::drush_webform_devel_reset in Webform 8.5
Same name and namespace in other branches
- 6.x modules/webform_devel/src/Commands/WebformDevelCommands.php \Drupal\webform_devel\Commands\WebformDevelCommands::drush_webform_devel_reset()
Executes webform devel reset.
@command webform:devel:reset @aliases wfdr
See also
File
- modules/
webform_devel/ src/ Commands/ WebformDevelCommands.php, line 105
Class
- WebformDevelCommands
- Webform devel commandfile.
Namespace
Drupal\webform_devel\CommandsCode
public function drush_webform_devel_reset() {
if (!$this
->io()
->confirm(dt("Are you sure you want repair the Webform module's admin settings and webforms?"))) {
throw new UserAbortException();
}
$this
->output()
->writeln(dt('Resetting message closed via State API…'));
$this->state
->delete('webform.element.message');
$this
->output()
->writeln(dt('Resetting message closed via User Data…'));
$this->userData
->delete('webform', NULL, 'webform.element.message');
}