Classes, traits, and interfaces - 8.9.x - drupal
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
File
-
core/
core.api.php, line 1511
Name | Deprecated | Object type | Namespace | File name | Summary | Direct uses | Use statements | Strings |
---|---|---|---|---|---|---|---|---|
CacheablePreconditionFailedHttpException | class | Drupal\Core\Http\Exception | core/ |
A cacheable PreconditionFailedHttpException. | ||||
CacheablePreconditionRequiredHttpException | class | Drupal\Core\Http\Exception | core/ |
A cacheable PreconditionRequiredHttpException. | ||||
CacheableRedirectResponse | class | Drupal\Core\Cache | core/ |
A RedirectResponse that contains and can expose cacheability metadata. | 2 | |||
CacheableResponse | class | Drupal\Core\Cache | core/ |
A response that contains and can expose cacheability metadata. | 1 | 11 | ||
CacheableResponseInterface | interface | Drupal\Core\Cache | core/ |
Defines an interface for responses that can expose cacheability metadata. | 8 | 23 | ||
CacheableResponseTrait | trait | Drupal\Core\Cache | core/ |
Provides an implementation of CacheableResponseInterface. | 6 | |||
CacheableRouteProviderInterface | interface | Drupal\Core\Routing | core/ |
Extends the router provider interface to provide caching support. | 1 | 2 | ||
CacheableSecuredRedirectResponse | abstract class | Drupal\Core\Routing | core/ |
Provides a common base class for cacheable safe redirects. | 2 | |||
CacheableServiceUnavailableHttpException | class | Drupal\Core\Http\Exception | core/ |
A cacheable ServiceUnavailableHttpException. | ||||
CacheableTestDomainObject | class | Drupal\early_rendering_controller_test | core/ |
|||||
CacheableTestResponse | class | Drupal\early_rendering_controller_test | core/ |
|||||
CacheableTooManyRequestsHttpException | class | Drupal\Core\Http\Exception | core/ |
A cacheable TooManyRequestsHttpException. | ||||
CacheableUnauthorizedHttpException | class | Drupal\Core\Http\Exception | core/ |
A cacheable UnauthorizedHttpException. | 1 | |||
CacheableUnprocessableEntityHttpException | class | Drupal\Core\Http\Exception | core/ |
A cacheable UnprocessableEntityHttpException. | ||||
CacheableUnsupportedMediaTypeHttpException | class | Drupal\Core\Http\Exception | core/ |
A cacheable UnsupportedMediaTypeHttpException. | ||||
CacheBackendInterface | interface | Drupal\Core\Cache | core/ |
Defines an interface for cache implementations. | 8 | 115 | 25 | |
CacheCollector | abstract class | Drupal\Core\Cache | core/ |
Default implementation for CacheCollectorInterface. | 7 | 7 | ||
CacheCollectorHelper | class | Drupal\Tests\Core\Cache | core/ |
Helper class to test the cache collector. | 1 | |||
CacheCollectorInterface | interface | Drupal\Core\Cache | core/ |
Provides a caching wrapper to be used in place of large structures. | 2 | 2 | ||
CacheCollectorTest | class | Drupal\Tests\Core\Cache | core/ |
@coversDefaultClass \Drupal\Core\Cache\CacheCollector @group Cache | ||||
CacheCollectorTest | class | Drupal\KernelTests\Core\Cache | core/ |
Tests DatabaseBackend cache tag implementation. | ||||
CacheContextInterface | interface | Drupal\Core\Cache\Context | core/ |
Provides an interface for defining a cache context service. | 23 | 8 | ||
CacheContextOptimizationTest | class | Drupal\KernelTests\Core\Cache | core/ |
Tests the cache context optimization. | ||||
CacheContextsManager | class | Drupal\Core\Cache\Context | core/ |
Converts cache context tokens into cache keys. | 28 | 2 | ||
CacheContextsManagerTest | class | Drupal\Tests\Core\Cache\Context | core/ |
@coversDefaultClass \Drupal\Core\Cache\Context\CacheContextsManager @group Cache | ||||
CacheContextsPass | class | Drupal\Core\Cache\Context | core/ |
Adds cache_contexts parameter to the container. | 1 | |||
CachedDataUITest | class | Drupal\Tests\views_ui\Functional | core/ |
Tests the shared tempstore cache in the UI. | ||||
CachedDiscoveryClearer | class | Drupal\Core\Plugin | core/ |
Defines a class which is capable of clearing the cache on plugin managers. | 2 | |||
CachedDiscoveryClearer | class | Drupal\Core\ProxyClass\Plugin | core/ |
Provides a proxy class for \Drupal\Core\Plugin\CachedDiscoveryClearer. | ||||
CachedDiscoveryClearerInterface | interface | Drupal\Core\Plugin | core/ |
Provides a way to clear static caches of all plugin managers. | 2 | |||
CachedDiscoveryInterface | interface | Drupal\Component\Plugin\Discovery | core/ |
Interface for discovery components holding a cache of plugin definitions. | 3 | 6 | ||
CacheDecoratorInterface | interface | Drupal\Core\CacheDecorator | core/ |
Defines an interface for cache decorator implementations. | 1 | 1 | ||
CachedStorage | class | Drupal\Core\Config | core/ |
Defines the cached storage. | 2 | 2 | ||
CachedStorageTest | class | Drupal\Tests\Core\Config | core/ |
Tests the interaction of cache and file storage in CachedStorage. | ||||
CachedStorageTest | class | Drupal\KernelTests\Core\Config\Storage | core/ |
Tests CachedStorage operations. | ||||
CacheFactory | class | Drupal\Core\Cache | core/ |
1 | 2 | |||
CacheFactoryInterface | interface | Drupal\Core\Cache | core/ |
An interface defining cache factory classes. | 8 | 3 | ||
CacheFactoryTest | class | Drupal\Tests\Core\Cache | core/ |
@coversDefaultClass \Drupal\Core\Cache\CacheFactory @group Cache | ||||
CachePluginBase | abstract class | Drupal\views\Plugin\views\cache | core/ |
The base plugin to handle caching. | 3 | 7 | ||
CacheRouterRebuildSubscriber | class | Drupal\Core\EventSubscriber | core/ |
Clear cache tags when the router is rebuilt. | 2 | |||
CacheTagsChecksumInterface | interface | Drupal\Core\Cache | core/ |
Provides checksums for cache tag invalidations. | 1 | 1 | ||
CacheTagsChecksumTrait | trait | Drupal\Core\Cache | core/ |
A trait for cache tag checksum implementations. | ||||
CacheTagsInvalidator | class | Drupal\Core\Cache | core/ |
Passes cache tag events to classes that wish to respond to them. | 1 | 2 | ||
CacheTagsInvalidatorInterface | interface | Drupal\Core\Cache | core/ |
Defines required methods for classes wanting to handle cache tag changes. | 6 | 16 | ||
CacheTagsInvalidatorTest | class | Drupal\Tests\Core\Cache | core/ |
@coversDefaultClass \Drupal\Core\Cache\CacheTagsInvalidator @group Cache | ||||
CacheTagTest | class | Drupal\Tests\views\Functional\Plugin | core/ |
Tests tag cache plugin. | ||||
CacheTest | class | Drupal\Tests\views\Kernel\Plugin | core/ |
Tests pluggable caching for views. | ||||
CacheTest | class | Drupal\Tests\Core\Cache | core/ |
@coversDefaultClass \Drupal\Core\Cache\Cache @group Cache | ||||
CacheTestBase | in drupal:8.?.? and is removed from drupal:9.0.0. Use \Drupal\Tests\system\Functional\Cache\CacheTestBase instead. |
abstract class | Drupal\system\Tests\Cache | core/ |
Provides helper methods for cache tests. | |||
CacheTestBase | abstract class | Drupal\Tests\system\Functional\Cache | core/ |
Provides helper methods for cache tests. | 1 |
Pagination
- Previous page
- Page 18
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.