function MockFileTransfer::getSettingsForm

Same name in other branches
  1. 8.9.x core/modules/system/tests/modules/system_test/src/MockFileTransfer.php \Drupal\system_test\MockFileTransfer::getSettingsForm()
  2. 10 core/modules/system/tests/modules/system_test/src/MockFileTransfer.php \Drupal\system_test\MockFileTransfer::getSettingsForm()
  3. 11.x core/modules/system/tests/modules/system_test/src/MockFileTransfer.php \Drupal\system_test\MockFileTransfer::getSettingsForm()

Returns a settings form with a text field to input a username.

File

core/modules/system/tests/modules/system_test/src/MockFileTransfer.php, line 23

Class

MockFileTransfer
Mock FileTransfer object to test the settings form functionality.

Namespace

Drupal\system_test

Code

public function getSettingsForm() {
    $form = [];
    $form['system_test_username'] = [
        '#type' => 'textfield',
        '#title' => t('System Test Username'),
    ];
    return $form;
}

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