Classes, traits, and interfaces - Drupal 11.1.x - Drupal Core
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
File
-
core/
core.api.php, line 1518
Name | Deprecated | Object type | Namespace | File name | Summary | Direct uses | Use statements | Strings |
---|---|---|---|---|---|---|---|---|
BundleExtension | class | Symfony\Component\HttpKernel\Bundle | vendor/ |
@author Yonel Ceruto <yonelceruto@gmail.com> | ||||
BundleInterface | interface | Symfony\Component\HttpKernel\Bundle | vendor/ |
BundleInterface. | 1 | 2 | ||
BundlePermissionHandlerTrait | trait | Drupal\Core\Entity | core/ |
Provides a method to simplify generating bundle level permissions. | 4 | |||
BundlesElement | class | PharIo\Manifest | vendor/ |
|||||
BundleTranslationSettingsInterface | interface | Drupal\content_translation | core/ |
Interface providing support for content translation bundle settings. | 1 | 2 | ||
Button | class | Drupal\Core\Render\Element | core/ |
Provides an action button form element. | 1 | |||
Buzz | class | OpenTelemetry\SDK\Common\Http\Psr\Client\Discovery | vendor/ |
1 | ||||
ByteOrderMarkSniff | class | PHP_CodeSniffer\Standards\Generic\Sniffs\Files | vendor/ |
|||||
Bytes | class | Drupal\Component\Utility | core/ |
Provides helper methods for byte conversions. | 8 | 1 | ||
ByteSizeMarkup | final class | Drupal\Core\StringTranslation | core/ |
A class to generate translatable markup for the given byte count. | 14 | |||
ByteString | class | Symfony\Component\String | vendor/ |
Represents a binary-safe string of bytes. | ||||
BytesValue | class | Google\Protobuf | vendor/ |
Wrapper message for `bytes`. The JSON representation for `BytesValue` is JSON string. | ||||
CaBundle | class | Composer\CaBundle | vendor/ |
@author Chris Smith <chris@cs278.org> @author Jordi Boggiano <j.boggiano@seld.be> | 3 | |||
Cache | final class | Symfony\Component\HttpKernel\Attribute | vendor/ |
Describes the default HTTP cache headers on controllers. Headers defined in the Cache attribute are ignored if they are already set by the controller. | 1 | |||
Cache | class | PHP_CodeSniffer\Util | vendor/ |
2 | ||||
Cache | class | Composer | vendor/ |
Reads/writes to a filesystem cache | 13 | |||
Cache | class | Drupal\Core\Cache | core/ |
Helper methods for cache. | 93 | |||
CacheableAccessDeniedHttpException | class | Drupal\Core\Http\Exception | core/ |
A cacheable AccessDeniedHttpException. | 1 | 3 | ||
CacheableAjaxResponse | class | Drupal\Core\Cache | core/ |
A AjaxResponse that contains and can expose cacheability metadata. | ||||
CacheableBadRequestHttpException | class | Drupal\Core\Http\Exception | core/ |
A cacheable BadRequestHttpException. | 8 | |||
CacheableConflictHttpException | class | Drupal\Core\Http\Exception | core/ |
A cacheable ConflictHttpException. | ||||
CacheableDependencyInterface | interface | Drupal\Core\Cache | core/ |
Defines an interface for objects which may be used by other cached objects. | 63 | 79 | ||
CacheableDependencyTrait | trait | Drupal\Core\Cache | core/ |
Trait for \Drupal\Core\Cache\CacheableDependencyInterface. | 22 | |||
CacheableGoneHttpException | class | Drupal\Core\Http\Exception | core/ |
A cacheable GoneHttpException. | ||||
CacheableHttpException | class | Drupal\Core\Http\Exception | core/ |
A cacheable HttpException. | 1 | |||
CacheableJsonResponse | class | Drupal\Core\Cache | core/ |
A JsonResponse that contains and can expose cacheability metadata. | 2 | |||
CacheableLengthRequiredHttpException | class | Drupal\Core\Http\Exception | core/ |
A cacheable LengthRequiredHttpException. | ||||
CacheableMetadata | class | Drupal\Core\Cache | core/ |
Defines a generic class for passing cacheability metadata. | 2 | 124 | ||
CacheableMethodNotAllowedHttpException | class | Drupal\Core\Http\Exception | core/ |
A cacheable MethodNotAllowedHttpException. | ||||
CacheableNormalization | class | Drupal\jsonapi\Normalizer\Value | core/ |
Use to store normalized data and its cacheability. | 2 | 12 | ||
CacheableNormalizerInterface | interface | Drupal\serialization\Normalizer | core/ |
Defines the interface for normalizers producing cacheable normalizations. | 1 | 2 | ||
CacheableNotAcceptableHttpException | class | Drupal\Core\Http\Exception | core/ |
A cacheable NotAcceptableHttpException. | ||||
CacheableNotFoundHttpException | class | Drupal\Core\Http\Exception | core/ |
A cacheable NotFoundHttpException. | 1 | |||
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. | ||||
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. | 1 | |||
CacheableResourceResponse | class | Drupal\jsonapi | core/ |
Extends ResourceResponse with cacheability. | 3 | |||
CacheableResponse | class | Drupal\Core\Cache | core/ |
A response that contains and can expose cacheability metadata. | 6 | |||
CacheableResponseInterface | interface | Drupal\Core\Cache | core/ |
Defines an interface for responses that can expose cacheability metadata. | 8 | 20 | ||
CacheableResponseTrait | trait | Drupal\Core\Cache | core/ |
Provides an implementation of CacheableResponseInterface. | 5 | |||
CacheableRouteProviderInterface | interface | Drupal\Core\Routing | core/ |
Extends the router provider interface to provide caching support. | 1 | 1 | ||
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. | ||||
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. | ||||
CacheAttributeListener | class | Symfony\Component\HttpKernel\EventListener | vendor/ |
Handles HTTP cache headers configured via the Cache attribute. | ||||
CacheBackendInterface | interface | Drupal\Core\Cache | core/ |
Defines an interface for cache implementations. | 8 | 99 | 13 |