class ModuleFileWriterDummyLocation in Module Builder 8.3
Test file writer which puts module files in the test site folder.
This ensures that they are cleaned up, and do not interfere with site code.
Hierarchy
- class \Drupal\module_builder\ModuleFileWriter
- class \Drupal\test_dummy_module_write_location\ModuleFileWriterDummyLocation
Expanded class hierarchy of ModuleFileWriterDummyLocation
1 string reference to 'ModuleFileWriterDummyLocation'
- test_dummy_module_write_location.services.yml in tests/
modules/ test_dummy_module_write_location/ test_dummy_module_write_location.services.yml - tests/modules/test_dummy_module_write_location/test_dummy_module_write_location.services.yml
1 service uses ModuleFileWriterDummyLocation
- test_dummy_module_write_location.module_file_writer_dummy_location in tests/
modules/ test_dummy_module_write_location/ test_dummy_module_write_location.services.yml - Drupal\test_dummy_module_write_location\ModuleFileWriterDummyLocation
File
- tests/
modules/ test_dummy_module_write_location/ src/ ModuleFileWriterDummyLocation.php, line 13
Namespace
Drupal\test_dummy_module_write_locationView source
class ModuleFileWriterDummyLocation extends ModuleFileWriter {
/**
* Put modules in the site folder, as that gets cleaned up.
*/
public function getRelativeModuleFolder($module_name) {
$site_path = \Drupal::service('site.path');
return $site_path . '/' . $module_name;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ModuleFileWriter:: |
protected | property | The File system service. | |
ModuleFileWriter:: |
protected | property | The Module extension list service. | |
ModuleFileWriter:: |
public | function | Writes a single file. | |
ModuleFileWriter:: |
public | function | Creates a ModuleFileWriter instance. | |
ModuleFileWriterDummyLocation:: |
public | function |
Put modules in the site folder, as that gets cleaned up. Overrides ModuleFileWriter:: |