class UserFormTestHooks

Hook implementations for user_form_test.

Hierarchy

Expanded class hierarchy of UserFormTestHooks

File

core/modules/user/tests/modules/user_form_test/src/Hook/UserFormTestHooks.php, line 12

Namespace

Drupal\user_form_test\Hook
View source
class UserFormTestHooks {
    
    /**
     * Implements hook_form_FORM_ID_alter() for user_cancel_form().
     */
    public function formUserCancelFormAlter(&$form, &$form_state) : void {
        $form['user_cancel_confirm']['#default_value'] = FALSE;
        $form['access']['#value'] = \Drupal::currentUser()->hasPermission('cancel other accounts');
    }

}

Members

Title Sort descending Modifiers Object type Summary
UserFormTestHooks::formUserCancelFormAlter public function Implements hook_form_FORM_ID_alter() for user_cancel_form().

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.