UseCacheBackendTrait::cacheSet

protected UseCacheBackendTrait::cacheSet($cid, $data, $expire = Cache::PERMANENT, array $tags = []) Stores data in the persistent cache, respecting the use caches flag. Parameters string $cid: The cache ID of the data to store. mixed $data: The data to store in the cache. Some storage engines only allow objects up to a maximum of 1MB in size to be stored by default. When caching large arrays or similar, take care to ensure $data does not exceed this size. int $expire: One of the following valu

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::$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;

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::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; }

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::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::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; }

UrlHelper::filterBadProtocol

public static UrlHelper::filterBadProtocol($string) Processes an HTML attribute value and strips dangerous protocols from URLs. Parameters string $string: The string with the attribute value. Return value string Cleaned up and HTML-escaped version of $string. File core/lib/Drupal/Component/Utility/UrlHelper.php, line 274 Class UrlHelper Helper class URL based methods. Namespace Drupal\Component\Utility Code public static function filterBadProtocol($string) { // Get the plain text r