class TestFileTransferWithSettingsForm
Same name in other branches
- 8.9.x core/modules/update/tests/modules/update_test/src/TestFileTransferWithSettingsForm.php \Drupal\update_test\TestFileTransferWithSettingsForm
- 10 core/modules/update/tests/modules/update_test/src/TestFileTransferWithSettingsForm.php \Drupal\update_test\TestFileTransferWithSettingsForm
- 11.x 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 extends \Drupal\Core\FileTransfer\FileTransfer implements \Drupal\Core\FileTransfer\ChmodInterface uses \Drupal\Core\DependencyInjection\DependencySerializationTrait
- class \Drupal\update_test\TestFileTransferWithSettingsForm extends \Drupal\Core\FileTransfer\Local
- class \Drupal\Core\FileTransfer\Local extends \Drupal\Core\FileTransfer\FileTransfer implements \Drupal\Core\FileTransfer\ChmodInterface uses \Drupal\Core\DependencyInjection\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
Title Sort descending | Modifiers | Object type | Summary | Overriden Title | Overrides |
---|---|---|---|---|---|
DependencySerializationTrait::$_entityStorages | protected | property | |||
DependencySerializationTrait::$_serviceIds | protected | property | |||
DependencySerializationTrait::__sleep | public | function | 1 | ||
DependencySerializationTrait::__wakeup | public | function | 2 | ||
FileTransfer::$chrootPath | private | property | Path to connection chroot. | ||
FileTransfer::$connectionHandle | private | property | The instantiated connection object. | ||
FileTransfer::$hostname | protected | property | The hostname for this file transfer. | ||
FileTransfer::$jail | protected | property | Full path to directory where file-transfer is restricted to. | ||
FileTransfer::$password | protected | property | The password for this file transfer. | 1 | |
FileTransfer::$port | protected | property | The port for this file transfer. | 1 | |
FileTransfer::$username | protected | property | The username for this file transfer. | 1 | |
FileTransfer::checkPath | final protected | function | Checks that the path is inside the jail and throws an exception if not. | ||
FileTransfer::chmod | final public | function | Changes the permissions of the specified $path (file or directory). | ||
FileTransfer::copyDirectory | final public | function | Copies a directory. | ||
FileTransfer::copyDirectoryJailed | protected | function | Copies a directory. | 1 | |
FileTransfer::copyFile | final public | function | Copies a file. | ||
FileTransfer::createDirectory | final public | function | Creates a directory. | ||
FileTransfer::findChroot | public | function | Returns the chroot property for this connection. | ||
FileTransfer::fixRemotePath | final protected | function | Returns a modified path suitable for passing to the server. | ||
FileTransfer::removeDirectory | final public | function | Removes a directory. | ||
FileTransfer::removeFile | final public | function | Removes a file. | ||
FileTransfer::sanitizePath | public | function | Changes backslashes to slashes, also removes a trailing slash. | ||
FileTransfer::setChroot | public | function | Sets the chroot and changes the jail to match the correct path scheme. | ||
FileTransfer::__get | public | function | Implements the magic __get() method. | ||
FileTransfer::__isset | public | function | |||
FileTransfer::__set | public | function | |||
FileTransfer::__unset | public | function | |||
Local::$fileSystem | protected | property | The file system service. | ||
Local::chmodJailed | public | function | Overrides ChmodInterface::chmodJailed | ||
Local::connect | public | function | Overrides FileTransfer::connect | ||
Local::copyFileJailed | protected | function | Overrides FileTransfer::copyFileJailed | ||
Local::createDirectoryJailed | protected | function | Overrides FileTransfer::createDirectoryJailed | ||
Local::isDirectory | public | function | Overrides FileTransfer::isDirectory | ||
Local::isFile | public | function | Overrides FileTransfer::isFile | ||
Local::removeDirectoryJailed | protected | function | Overrides FileTransfer::removeDirectoryJailed | ||
Local::removeFileJailed | protected | function | Overrides FileTransfer::removeFileJailed | ||
Local::__construct | public | function | Overrides FileTransfer::__construct | ||
TestFileTransferWithSettingsForm::factory | public static | function | Returns a Drupal\update_test\TestFileTransferWithSettingsForm object. | Overrides Local::factory | |
TestFileTransferWithSettingsForm::getSettingsForm | public | function | Returns a settings form with a text field to input a username. | Overrides FileTransfer::getSettingsForm |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.