Primary tabs
Introduction to classes
A lot of the PHP code in Drupal is object oriented (OO), making use of PHP classes, interfaces, and traits. See the Objected-oriented programming conventions for more information.
See also
Objected-oriented programming conventions
Name | Type | Namespace | Location | Description | Direct uses | Use statements | Strings |
---|---|---|---|---|---|---|---|
ContextCacheKeys | class |
Drupal\ |
core/ |
A value object to store generated cache keys with its cacheability metadata. | 1 | ||
CookiesCacheContext | class |
Drupal\ |
core/ |
Defines the CookiesCacheContext service, for "per cookie" caching. | 1 | 2 | |
HeadersCacheContext | class |
Drupal\ |
core/ |
Defines the HeadersCacheContext service, for "per header" caching. | 1 | 2 | |
IpCacheContext | class |
Drupal\ |
core/ |
Defines the IpCacheContext service, for "per IP address" caching. | 2 | ||
IsFrontPathCacheContext | class |
Drupal\ |
core/ |
Defines a cache context for whether the URL is the front page of the site. | 1 | 2 | |
IsSuperUserCacheContext | class |
Drupal\ |
core/ |
Defines the IsSuperUserCacheContext service, for "super user or not" caching. | 2 | ||
LanguagesCacheContext | class |
Drupal\ |
core/ |
Defines the LanguagesCacheContext service, for "per language" caching. | 2 | ||
PagersCacheContext | class |
Drupal\ |
core/ |
Defines a cache context for "per page in a pager" caching. | 2 | ||
PathCacheContext | class |
Drupal\ |
core/ |
Defines the PathCacheContext service, for "per URL path" caching. | 2 | ||
PathParentCacheContext | class |
Drupal\ |
core/ |
Defines a cache context service for path parents. | 1 | 2 | |
ProtocolVersionCacheContext | class |
Drupal\ |
core/ |
Defines the ProtocolVersionCacheContext service, for "per protocol" caching. | 1 | 2 | |
QueryArgsCacheContext | class |
Drupal\ |
core/ |
Defines the QueryArgsCacheContext service, for "per query args" caching. | 1 | 2 | |
RequestFormatCacheContext | class |
Drupal\ |
core/ |
Defines the RequestFormatCacheContext service, for "per format" caching. | 2 | ||
RequestStackCacheContextBase | abstract class |
Drupal\ |
core/ |
Defines a base class for cache contexts depending only on the request stack. | 11 | ||
RouteCacheContext | class |
Drupal\ |
core/ |
Defines the RouteCacheContext service, for "per route" caching. | 1 | 2 | |
RouteNameCacheContext | class |
Drupal\ |
core/ |
Defines the RouteCacheContext service, for "per route name" caching. | 1 | 1 | 2 |
SessionCacheContext | class |
Drupal\ |
core/ |
Defines the SessionCacheContext service, for "per session" caching. | 1 | 2 | |
SessionExistsCacheContext | class |
Drupal\ |
core/ |
Defines the SessionExistsCacheContext service, for "session or not" caching. | 2 | ||
SiteCacheContext | class |
Drupal\ |
core/ |
Defines the SiteCacheContext service, for "per site" caching. | 2 | ||
ThemeCacheContext | class |
Drupal\ |
core/ |
Defines the ThemeCacheContext service, for "per theme" caching. | 2 | ||
TimeZoneCacheContext | class |
Drupal\ |
core/ |
Defines the TimeZoneCacheContext service, for "per time zone" caching. | 2 | ||
UrlCacheContext | class |
Drupal\ |
core/ |
Defines the UrlCacheContext service, for "per page" caching. | 2 | ||
UserCacheContext | class |
Drupal\ |
core/ |
Defines the UserCacheContext service, for "per user" caching. | 2 | ||
UserCacheContextBase | abstract class |
Drupal\ |
core/ |
Base class for user-based cache contexts. | 5 | 1 | |
UserRolesCacheContext | class |
Drupal\ |
core/ |
Defines the UserRolesCacheContext service, for "per role" caching. | 1 | 2 | |
DatabaseCacheTagsChecksum | class |
Drupal\ |
core/ |
Cache tags invalidations checksum implementation that uses the database. | 2 | ||
ListCacheBinsPass | class |
Drupal\ |
core/ |
Adds cache_bins parameter to the container. | 1 | ||
MemoryCache | class |
Drupal\ |
core/ |
Defines a memory cache implementation. | 3 | 4 | |
MemoryCacheInterface | interface |
Drupal\ |
core/ |
Defines an interface for memory cache implementations. | 1 | 10 | 4 |
MemoryCounterBackend | class |
Drupal\ |
core/ |
Defines a memory cache implementation that counts set and get calls. | 1 | ||
NullBackend | class |
Drupal\ |
core/ |
Defines a stub cache implementation. | 1 | 13 | |
NullBackendFactory | class |
Drupal\ |
core/ |
1 | 4 | ||
RefinableCacheableDependencyInterface | interface |
Drupal\ |
core/ |
Allows to add cacheability metadata to an object for the current runtime. | 8 | 18 | |
RefinableCacheableDependencyTrait | trait |
Drupal\ |
core/ |
Trait for \Drupal\Core\Cache\RefinableCacheableDependencyInterface. | 7 | ||
UncacheableDependencyTrait | trait |
Drupal\ |
core/ |
Trait to implement CacheableDependencyInterface for uncacheable objects. | 2 | ||
UnchangingCacheableDependencyTrait | trait |
Drupal\ |
core/ |
Trait to implement CacheableDependencyInterface for unchanging objects. | 4 | ||
UseCacheBackendTrait | trait |
Drupal\ |
core/ |
Provides methods to use a cache backend while respecting a 'use caches' flag. | 2 | ||
VariationCacheFactoryInterface | interface |
Drupal\ |
core/ |
An interface defining variation cache factory classes. | |||
VariationCacheInterface | interface |
Drupal\ |
core/ |
Defines an interface for variation cache implementations. | 3 | 7 | |
CacheDecoratorInterface Deprecated | interface |
Drupal\ |
core/ |
Defines an interface for cache decorator implementations. | |||
DbCommandBase | class |
Drupal\ |
core/ |
Base command that abstracts handling of database connection arguments. | 3 | 1 | |
DbDumpApplication | class |
Drupal\ |
core/ |
Provides a command to dump a database generation script. | 2 | ||
DbDumpCommand | class |
Drupal\ |
core/ |
Provides a command to dump the current database to a script. | 1 | ||
DbImportCommand | class |
Drupal\ |
core/ |
Provides a command to import the current database from a script. | 1 | ||
DbToolsApplication | class |
Drupal\ |
core/ |
Provides a command to import a database generation script. | 2 | ||
GenerateProxyClassApplication | class |
Drupal\ |
core/ |
Provides a console command to generate proxy classes. | 1 | ||
GenerateProxyClassCommand | class |
Drupal\ |
core/ |
Provides a console command to generate proxy classes. | |||
InstallCommand | class |
Drupal\ |
core/ |
Installs a Drupal site for local testing/development. | |||
QuickStartCommand | class |
Drupal\ |
core/ |
Installs a Drupal site and starts a webserver for local testing/development. | |||
ServerCommand | class |
Drupal\ |
core/ |
Runs the PHP webserver for a Drupal site for local testing/development. |