public function EntityUpdateExec::submitFormClean in Entity Update 8
Same name and namespace in other branches
- 2.0.x src/Form/EntityUpdateExec.php \Drupal\entity_update\Form\EntityUpdateExec::submitFormClean()
Run backuped entities cleanup.
File
- src/
Form/ EntityUpdateExec.php, line 253
Class
- EntityUpdateExec
- Class CheckEntityUpdate.
Namespace
Drupal\entity_update\FormCode
public function submitFormClean(array &$form, FormStateInterface $form_state) {
try {
$res = EntityUpdate::cleanupEntityBackup();
$res_str = $res ? 'SUCCESS' : 'FAIL';
$status = $res ? 'status' : 'error';
drupal_set_message($this
->t("Backups cleanup @res", [
'@res' => $res_str,
]), $status);
} catch (\Exception $e) {
drupal_set_message($this
->t("Entity update Fail"), 'error');
drupal_set_message($e
->getMessage(), 'error');
}
}