class TestFileTransferWithSettingsForm in Drupal 9
Same name and namespace in other branches
- 8 core/modules/update/tests/modules/update_test/src/TestFileTransferWithSettingsForm.php \Drupal\update_test\TestFileTransferWithSettingsForm
Provides an object to test the settings form functionality.
This class extends \Drupal\Core\FileTransfer\Local to make module install testing via \Drupal\Core\FileTransfer\Form\FileTransferAuthorizeForm and authorize.php possible.
Hierarchy
- class \Drupal\Core\FileTransfer\FileTransfer
- class \Drupal\Core\FileTransfer\Local implements ChmodInterface uses DependencySerializationTrait
- class \Drupal\update_test\TestFileTransferWithSettingsForm
- class \Drupal\Core\FileTransfer\Local implements ChmodInterface uses DependencySerializationTrait
Expanded class hierarchy of TestFileTransferWithSettingsForm
See also
\Drupal\update\Tests\FileTransferAuthorizeFormTest
File
- core/
modules/ update/ tests/ modules/ update_test/ src/ TestFileTransferWithSettingsForm.php, line 16
Namespace
Drupal\update_testView source
class TestFileTransferWithSettingsForm extends Local {
/**
* Returns a Drupal\update_test\TestFileTransferWithSettingsForm object.
*
* @return static
* A new Drupal\update_test\TestFileTransferWithSettingsForm object.
*/
public static function factory($jail, $settings) {
return new static($jail, \Drupal::service('file_system'));
}
/**
* Returns a settings form with a text field to input a username.
*/
public function getSettingsForm() {
$form = [];
$form['update_test_username'] = [
'#type' => 'textfield',
'#title' => t('Update Test Username'),
];
return $form;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DependencySerializationTrait:: |
protected | property | ||
DependencySerializationTrait:: |
protected | property | ||
DependencySerializationTrait:: |
public | function | 2 | |
DependencySerializationTrait:: |
public | function | 2 | |
FileTransfer:: |
protected | property | The hostname for this file transfer. | |
FileTransfer:: |
protected | property | The password for this file transfer. | 1 |
FileTransfer:: |
protected | property | The port for this file transfer. | 1 |
FileTransfer:: |
protected | property | The username for this file transfer. | 1 |
FileTransfer:: |
final protected | function | Checks that the path is inside the jail and throws an exception if not. | |
FileTransfer:: |
final public | function | Changes the permissions of the specified $path (file or directory). | |
FileTransfer:: |
final public | function | Copies a directory. | |
FileTransfer:: |
protected | function | Copies a directory. | 1 |
FileTransfer:: |
final public | function | Copies a file. | |
FileTransfer:: |
final public | function | Creates a directory. | |
FileTransfer:: |
public | function | Returns the chroot property for this connection. | |
FileTransfer:: |
final protected | function | Returns a modified path suitable for passing to the server. | |
FileTransfer:: |
final public | function | Removes a directory. | |
FileTransfer:: |
final public | function | Removes a file. | |
FileTransfer:: |
public | function | Changes backslashes to slashes, also removes a trailing slash. | |
FileTransfer:: |
public | function | Sets the chroot and changes the jail to match the correct path scheme. | |
FileTransfer:: |
public | function | Implements the magic __get() method. | |
Local:: |
protected | property | The file system service. | |
Local:: |
public | function |
Changes the permissions of the file / directory specified in $path. Overrides ChmodInterface:: |
|
Local:: |
public | function |
Connects to the server. Overrides FileTransfer:: |
|
Local:: |
protected | function |
Copies a file. Overrides FileTransfer:: |
|
Local:: |
protected | function |
Creates a directory. Overrides FileTransfer:: |
|
Local:: |
public | function |
Checks if a particular path is a directory. Overrides FileTransfer:: |
|
Local:: |
public | function |
Checks if a particular path is a file (not a directory). Overrides FileTransfer:: |
|
Local:: |
protected | function |
Removes a directory. Overrides FileTransfer:: |
|
Local:: |
protected | function |
Removes a file. Overrides FileTransfer:: |
|
Local:: |
public | function |
Constructs a Drupal\Core\FileTransfer\FileTransfer object. Overrides FileTransfer:: |
|
TestFileTransferWithSettingsForm:: |
public static | function |
Returns a Drupal\update_test\TestFileTransferWithSettingsForm object. Overrides Local:: |
|
TestFileTransferWithSettingsForm:: |
public | function |
Returns a settings form with a text field to input a username. Overrides FileTransfer:: |