You are here

function role_expire_user_admin_role_submit_delete in Role Expire 2.x

Same name and namespace in other branches
  1. 8 role_expire.module \role_expire_user_admin_role_submit_delete()

Form delete handler invoked by role_expire_form_user_admin_role_alter.

Removes default duration in database.

1 string reference to 'role_expire_user_admin_role_submit_delete'
role_expire_form_user_role_form_alter in ./role_expire.module
Implements hook_form_FORM_ID_alter().

File

./role_expire.module, line 125
Role Expire module.

Code

function role_expire_user_admin_role_submit_delete($form, FormStateInterface &$form_state) {
  $values = $form_state
    ->getValues();
  \Drupal::service('role_expire.api')
    ->deleteDefaultDuration($values['id']);
}