Same name and namespace in other branches
  1. 8.9.x core/modules/system/tests/modules/system_test/src/MockFileTransfer.php \Drupal\system_test\MockFileTransfer::getSettingsForm()
  2. 9 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;
}