class DummyReadOnlyStreamWrapper
Same name in other branches
- 9 core/modules/file/tests/file_test/src/StreamWrapper/DummyReadOnlyStreamWrapper.php \Drupal\file_test\StreamWrapper\DummyReadOnlyStreamWrapper
- 8.9.x core/modules/file/tests/file_test/src/StreamWrapper/DummyReadOnlyStreamWrapper.php \Drupal\file_test\StreamWrapper\DummyReadOnlyStreamWrapper
- 10 core/modules/file/tests/file_test/src/StreamWrapper/DummyReadOnlyStreamWrapper.php \Drupal\file_test\StreamWrapper\DummyReadOnlyStreamWrapper
Helper class for testing the stream wrapper registry.
Dummy stream wrapper implementation (dummy-readonly://).
Hierarchy
- class \Drupal\Core\StreamWrapper\LocalStream implements \Drupal\Core\StreamWrapper\StreamWrapperInterface
- class \Drupal\Core\StreamWrapper\LocalReadOnlyStream extends \Drupal\Core\StreamWrapper\LocalStream
- class \Drupal\file_test\StreamWrapper\DummyReadOnlyStreamWrapper extends \Drupal\Core\StreamWrapper\LocalReadOnlyStream
- class \Drupal\Core\StreamWrapper\LocalReadOnlyStream extends \Drupal\Core\StreamWrapper\LocalStream
Expanded class hierarchy of DummyReadOnlyStreamWrapper
2 files declare their use of DummyReadOnlyStreamWrapper
- ImageStyleCustomStreamWrappersTest.php in core/
modules/ image/ tests/ src/ Kernel/ ImageStyleCustomStreamWrappersTest.php - ReadOnlyStreamWrapperTest.php in core/
tests/ Drupal/ KernelTests/ Core/ File/ ReadOnlyStreamWrapperTest.php
1 string reference to 'DummyReadOnlyStreamWrapper'
- file_test.services.yml in core/
modules/ file/ tests/ file_test/ file_test.services.yml - core/modules/file/tests/file_test/file_test.services.yml
1 service uses DummyReadOnlyStreamWrapper
- stream_wrapper.dummy_readonly in core/
modules/ file/ tests/ file_test/ file_test.services.yml - Drupal\file_test\StreamWrapper\DummyReadOnlyStreamWrapper
File
-
core/
modules/ file/ tests/ file_test/ src/ StreamWrapper/ DummyReadOnlyStreamWrapper.php, line 14
Namespace
Drupal\file_test\StreamWrapperView source
class DummyReadOnlyStreamWrapper extends LocalReadOnlyStream {
/**
* {@inheritdoc}
*/
public function getName() {
return t('Dummy files (readonly)');
}
/**
* {@inheritdoc}
*/
public function getDescription() {
return t('Dummy wrapper for testing (readonly).');
}
public function getDirectoryPath() {
return \Drupal::getContainer()->getParameter('site.path') . '/files';
}
/**
* Override getInternalUri().
*
* Return a dummy path for testing.
*/
public function getInternalUri() {
return '/dummy/example.txt';
}
/**
* Override getExternalUrl().
*
* Return the HTML URI of a public file.
*/
public function getExternalUrl() {
return '/dummy/example.txt';
}
}
Members
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.