Classes, traits, and interfaces - 11.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 1519
Name | Deprecated | Object type | Namespace | File name | Summary | Direct uses | Use statements | Strings |
---|---|---|---|---|---|---|---|---|
CacheableDependencyTrait | trait | Drupal\Core\Cache | core/ |
Trait for \Drupal\Core\Cache\CacheableDependencyInterface. | 23 | |||
CacheableEmbeddedDataSource | class | Drupal\migrate_cache_counts_test\Plugin\migrate\source | core/ |
A copy of embedded_data which allows caching the count. | ||||
CacheableExceptionTest | class | Drupal\Tests\Core\Http | core/ |
@group Http | ||||
CacheableGoneHttpException | class | Drupal\Core\Http\Exception | core/ |
A cacheable GoneHttpException. | 1 | |||
CacheableHttpException | class | Drupal\Core\Http\Exception | core/ |
A cacheable HttpException. | 2 | |||
CacheableJsonResponse | class | Drupal\Core\Cache | core/ |
A JsonResponse that contains and can expose cacheability metadata. | 6 | |||
CacheableLengthRequiredHttpException | class | Drupal\Core\Http\Exception | core/ |
A cacheable LengthRequiredHttpException. | 1 | |||
CacheableMetadata | class | Drupal\Core\Cache | core/ |
Defines a generic class for passing cacheability metadata. | 2 | 196 | ||
CacheableMetadataCalculationTest | class | Drupal\Tests\views\Kernel | core/ |
Tests that cacheability metadata is only calculated when needed. | ||||
CacheableMetadataCalculationTest | class | Drupal\views_test_cacheable_metadata_calculation\Plugin\views\access | core/ |
Tests plugin that reports when cacheable metadata is being calculated. | ||||
CacheableMetadataTest | class | Drupal\Tests\Core\Cache | core/ |
@coversDefaultClass \Drupal\Core\Cache\CacheableMetadata[[api-linebreak]] @group Cache | ||||
CacheableMethodNotAllowedHttpException | class | Drupal\Core\Http\Exception | core/ |
A cacheable MethodNotAllowedHttpException. | 2 | |||
CacheableNormalization | class | Drupal\jsonapi\Normalizer\Value | core/ |
Use to store normalized data and its cacheability. | 2 | 19 | ||
CacheableNormalizerInterface | interface | Drupal\serialization\Normalizer | core/ |
Defines the interface for normalizers producing cacheable normalizations. | 1 | 3 | ||
CacheableNotAcceptableHttpException | class | Drupal\Core\Http\Exception | core/ |
A cacheable NotAcceptableHttpException. | 1 | |||
CacheableNotFoundHttpException | class | Drupal\Core\Http\Exception | core/ |
A cacheable NotFoundHttpException. | 3 | |||
CacheableOmission | final class | Drupal\jsonapi\Normalizer\Value | core/ |
Represents the cacheability associated with the omission of a value. | 3 | |||
CacheablePreconditionFailedHttpException | class | Drupal\Core\Http\Exception | core/ |
A cacheable PreconditionFailedHttpException. | 1 | |||
CacheablePreconditionRequiredHttpException | class | Drupal\Core\Http\Exception | core/ |
A cacheable PreconditionRequiredHttpException. | 1 | |||
CacheableRedirectResponse | class | Drupal\Core\Cache | core/ |
A RedirectResponse that contains and can expose cacheability metadata. | 3 | |||
CacheableResourceResponse | class | Drupal\jsonapi | core/ |
Extends ResourceResponse with cacheability. | 6 | |||
CacheableResponse | class | Drupal\Core\Cache | core/ |
A response that contains and can expose cacheability metadata. | 1 | 12 | ||
CacheableResponseInterface | interface | Drupal\Core\Cache | core/ |
Defines an interface for responses that can expose cacheability metadata. | 9 | 25 | ||
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. | 1 | |||
CacheableTestDomainObject | class | Drupal\early_rendering_controller_test | core/ |
Test domain class with implemented CacheableDependencyInterface. | ||||
CacheableTestResponse | class | Drupal\early_rendering_controller_test | core/ |
Cacheable response used for testing. | ||||
CacheableTooManyRequestsHttpException | class | Drupal\Core\Http\Exception | core/ |
A cacheable TooManyRequestsHttpException. | 1 | |||
CacheableUnauthorizedHttpException | class | Drupal\Core\Http\Exception | core/ |
A cacheable UnauthorizedHttpException. | 2 | |||
CacheableUnprocessableEntityHttpException | class | Drupal\Core\Http\Exception | core/ |
A cacheable UnprocessableEntityHttpException. | 1 | |||
CacheableUnsupportedMediaTypeHttpException | class | Drupal\Core\Http\Exception | core/ |
A cacheable UnsupportedMediaTypeHttpException. | 1 | |||
CacheBackendDecorator | class | Drupal\performance_test\Cache | core/ |
Wraps an existing cache backend to track calls to the cache backend. | ||||
CacheBackendInterface | interface | Drupal\Core\Cache | core/ |
Defines an interface for cache implementations. | 10 | 133 | 27 | |
CacheCollector | abstract class | Drupal\Core\Cache | core/ |
Default implementation for CacheCollectorInterface. | 9 | 9 | ||
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. | 3 | 2 | ||
CacheCollectorTest | class | Drupal\Tests\Core\Cache | core/ |
@coversDefaultClass \Drupal\Core\Cache\CacheCollector[[api-linebreak]] @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. | 22 | 7 | ||
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. | 40 | 2 | ||
CacheContextsManagerTest | class | Drupal\Tests\Core\Cache\Context | core/ |
@coversDefaultClass \Drupal\Core\Cache\Context\CacheContextsManager[[api-linebreak]] @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\ProxyClass\Plugin | core/ |
Provides a proxy class for \Drupal\Core\Plugin\CachedDiscoveryClearer. | ||||
CachedDiscoveryClearer | class | Drupal\Core\Plugin | core/ |
Defines a class which is capable of clearing the cache on plugin managers. | 2 | |||
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. | 4 | 7 |
Pagination
- Previous page
- Page 20
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.