public static function WebformManagedFileBase::getVisibleStreamWrappers in Webform 6.x
Same name and namespace in other branches
- 8.5 src/Plugin/WebformElement/WebformManagedFileBase.php \Drupal\webform\Plugin\WebformElement\WebformManagedFileBase::getVisibleStreamWrappers()
Get visible stream wrappers.
Return value
array An associative array of visible stream wrappers keyed by type.
5 calls to WebformManagedFileBase::getVisibleStreamWrappers()
- WebformManagedFileBase::displayDisabledWarning in src/
Plugin/ WebformElement/ WebformManagedFileBase.php - Display element disabled warning.
- WebformManagedFileBase::form in src/
Plugin/ WebformElement/ WebformManagedFileBase.php - Gets the actual configuration webform array to be built.
- WebformManagedFileBase::getUriScheme in src/
Plugin/ WebformElement/ WebformManagedFileBase.php - Get file upload URI scheme.
- WebformManagedFileBase::isEnabled in src/
Plugin/ WebformElement/ WebformManagedFileBase.php - Checks if the element is enabled.
- WebformManagedFileBase::prepare in src/
Plugin/ WebformElement/ WebformManagedFileBase.php - Prepare an element to be rendered within a webform.
File
- src/
Plugin/ WebformElement/ WebformManagedFileBase.php, line 1398
Class
- WebformManagedFileBase
- Provides a base class webform 'managed_file' elements.
Namespace
Drupal\webform\Plugin\WebformElementCode
public static function getVisibleStreamWrappers() {
$stream_wrappers = \Drupal::service('stream_wrapper_manager')
->getNames(StreamWrapperInterface::WRITE_VISIBLE);
if (!\Drupal::config('webform.settings')
->get('file.file_public')) {
unset($stream_wrappers['public']);
}
return $stream_wrappers;
}