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

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

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::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::filterQueryParameters

public static UrlHelper::filterQueryParameters(array $query, array $exclude = array(), $parent = '') Filters a URL query parameter array to remove unwanted elements. Parameters array $query: An array to be processed. array $exclude: (optional) A list of $query array keys to remove. Use "parent[child]" to exclude nested items. string $parent: Internal use only. Used to build the $query array key for nested items. Return value An array containing query parameters. File core/lib/Drupal/Component

UrlHelper::externalIsLocal

public static UrlHelper::externalIsLocal($url, $base_url) Determines if an external URL points to this installation. Parameters string $url: A string containing an external URL, such as "http://example.com/foo". string $base_url: The base URL string to check against, such as "http://example.com/" Return value bool TRUE if the URL has the same domain and base path. Throws \InvalidArgumentException Exception thrown when a either $url or $bath_url are not fully qualified. File core/lib/Drupal/C