function UrlHelper::encodePath
Encodes a Drupal path for use in a URL.
For aesthetic reasons slashes are not escaped.
Parameters
string $path: The Drupal path to encode.
Return value
string The encoded path.
4 calls to UrlHelper::encodePath()
- ContextualLinks::render in core/
modules/ contextual/ src/ Plugin/ views/ field/ ContextualLinks.php - Overrides \Drupal\views\Plugin\views\field\FieldPluginBase::render().
- FileUrlGenerator::generate in core/
lib/ Drupal/ Core/ File/ FileUrlGenerator.php - Creates a root-relative web-accessible URL object.
- FileUrlGenerator::generatePath in core/
lib/ Drupal/ Core/ File/ FileUrlGenerator.php - Generate a URL path.
- PublicStream::getExternalUrl in core/
lib/ Drupal/ Core/ StreamWrapper/ PublicStream.php - Returns a web accessible URL for the resource.
File
-
core/
lib/ Drupal/ Component/ Utility/ UrlHelper.php, line 245
Class
- UrlHelper
- Helper class URL based methods.
Namespace
Drupal\Component\UtilityCode
public static function encodePath($path) {
return str_replace('%2F', '/', rawurlencode($path));
}