public static PublicStream::baseUrl()
Finds and returns the base URL for public://.
Defaults to the current site's base URL plus directory path.
Note that this static method is used by \Drupal\system\Form\FileSystemForm so you should alter that form or substitute a different form if you change the class providing the stream_wrapper.public service.
Return value
string The external base URL for public://
File
- core/lib/Drupal/Core/StreamWrapper/PublicStream.php, line 66
Class
- PublicStream
- Defines a Drupal public (public://) stream wrapper class.
Namespace
Drupal\Core\StreamWrapper
Code
1 2 3 4 5 6 7 8 9 | public static function baseUrl() { $settings_base_url = Settings::get( 'file_public_base_url' , '' ); if ( $settings_base_url ) { return (string) $settings_base_url ; } else { return $GLOBALS [ 'base_url' ] . '/' . static ::basePath(); } } |
Please login to continue.