UseCacheBackendTrait::cacheGet

protected UseCacheBackendTrait::cacheGet($cid) Fetches from the cache backend, respecting the use caches flag. Parameters string $cid: The cache ID of the data to retrieve. Return value object|false The cache item or FALSE on failure. See also \Drupal\Core\Cache\CacheBackendInterface::get() File core/lib/Drupal/Core/Cache/UseCacheBackendTrait.php, line 35 Class UseCacheBackendTrait Provides methods to use a cache backend while respecting a 'use caches' flag. Namespace Drupal\Core\Cac

UseCacheBackendTrait::$useCaches

Flag whether caches should be used or skipped. Type: bool File core/lib/Drupal/Core/Cache/UseCacheBackendTrait.php, line 22 Class UseCacheBackendTrait Provides methods to use a cache backend while respecting a 'use caches' flag. Namespace Drupal\Core\Cache Code protected $useCaches = TRUE;

UseCacheBackendTrait::$cacheBackend

Cache backend instance. Type: \Drupal\Core\Cache\CacheBackendInterface File core/lib/Drupal/Core/Cache/UseCacheBackendTrait.php, line 15 Class UseCacheBackendTrait Provides methods to use a cache backend while respecting a 'use caches' flag. Namespace Drupal\Core\Cache Code protected $cacheBackend;

UseCacheBackendTrait

Provides methods to use a cache backend while respecting a 'use caches' flag. Hierarchy trait \Drupal\Core\Cache\UseCacheBackendTrait File core/lib/Drupal/Core/Cache/UseCacheBackendTrait.php, line 8 Namespace Drupal\Core\Cache Members Name Modifiers Type Description UseCacheBackendTrait::$cacheBackend protected property Cache backend instance. UseCacheBackendTrait::$useCaches protected property Flag whether caches should be used or skipped. UseCacheBackendTrait

UrlHelper::stripDangerousProtocols

public static UrlHelper::stripDangerousProtocols($uri) Strips dangerous protocols (for example, 'javascript:') from a URI. This function must be called for all URIs within user-entered input prior to being output to an HTML attribute value. It is often called as part of \Drupal\Component\Utility\UrlHelper::filterBadProtocol() or \Drupal\Component\Utility\Xss::filter(), but those functions return an HTML-encoded string, so this function can be called independently when the output needs to be a p

UrlHelper::setAllowedProtocols

public static UrlHelper::setAllowedProtocols(array $protocols = array()) Sets the allowed protocols. Parameters array $protocols: An array of protocols, for example http, https and irc. File core/lib/Drupal/Component/Utility/UrlHelper.php, line 297 Class UrlHelper Helper class URL based methods. Namespace Drupal\Component\Utility Code public static function setAllowedProtocols(array $protocols = array()) { static::$allowedProtocols = $protocols; }

UrlHelper::parse

public static UrlHelper::parse($url) Parses a URL string into its path, query, and fragment components. This function splits both internal paths like node?b=c#d and external URLs like https://example.com/a?b=c#d into their component parts. See RFC 3986 for an explanation of what the component parts are. Note that, unlike the RFC, when passed an external URL, this function groups the scheme, authority, and path together into the path component. Parameters string $url: The internal path or e

UrlHelper::isValid

public static UrlHelper::isValid($url, $absolute = FALSE) Verifies the syntax of the given URL. This function should only be used on actual URLs. It should not be used for Drupal menu paths, which can contain arbitrary characters. Valid values per RFC 3986. Parameters string $url: The URL to verify. bool $absolute: Whether the URL is absolute (beginning with a scheme such as "http:"). Return value bool TRUE if the URL is in a valid format, FALSE otherwise. File core/lib/Drupal/Component/Utili

UrlHelper::isExternal

public static UrlHelper::isExternal($path) Determines whether a path is external to Drupal. An example of an external path is http://example.com. If a path cannot be assessed by Drupal's menu handler, then we must treat it as potentially insecure. Parameters string $path: The internal path or external URL being linked to, such as "node/34" or "http://example.com/foo". Return value bool TRUE or FALSE, where TRUE indicates an external path. File core/lib/Drupal/Component/Utility/UrlHelper.php,

UrlHelper::getAllowedProtocols

public static UrlHelper::getAllowedProtocols() Gets the allowed protocols. Return value array An array of protocols, for example http, https and irc. File core/lib/Drupal/Component/Utility/UrlHelper.php, line 287 Class UrlHelper Helper class URL based methods. Namespace Drupal\Component\Utility Code public static function getAllowedProtocols() { return static::$allowedProtocols; }