Classes, traits, and interfaces - 10.3.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 1518
Name | Deprecated | Object type | Namespace | File name | Summary | Direct uses | Use statements | Strings |
---|---|---|---|---|---|---|---|---|
BundleClassTest | class | Drupal\KernelTests\Core\Entity | core/ |
Tests entity bundle classes. | ||||
BundleConfigImportValidate | class | Drupal\Core\Entity\Event | core/ |
Entity config importer validation event subscriber. | 2 | |||
BundleConstraint | class | Drupal\Core\Entity\Plugin\Validation\Constraint | core/ |
Checks if a value is a valid entity type. | 1 | |||
BundleConstraintValidator | class | Drupal\Core\Entity\Plugin\Validation\Constraint | core/ |
Validates the Bundle constraint. | ||||
BundleConstraintValidatorTest | class | Drupal\KernelTests\Core\Entity | core/ |
Tests validation constraints for BundleConstraintValidator. | ||||
BundleEntityFormBase | class | Drupal\Core\Entity | core/ |
Class BundleEntityFormBase is a base form for bundle config entities. | 4 | 5 | ||
BundleEntityStorageInterface | interface | Drupal\Core\Entity | core/ |
A storage that supports entities with bundle specific classes. | 1 | |||
BundlePermissionHandlerTrait | trait | Drupal\Core\Entity | core/ |
Provides a method to simplify generating bundle level permissions. | 5 | |||
BundlePermissionHandlerTraitTest | class | Drupal\KernelTests\Core\Entity | core/ |
@coversDefaultClass \Drupal\Core\Entity\BundlePermissionHandlerTrait | ||||
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 | |||
Bytes | class | Drupal\Component\Utility | core/ |
Provides helper methods for byte conversions. | 12 | 1 | ||
ByteSizeMarkup | final class | Drupal\Core\StringTranslation | core/ |
A class to generate translatable markup for the given byte count. | 17 | |||
ByteSizeMarkupTest | class | Drupal\Tests\Core\StringTranslation | core/ |
@coversDefaultClass \Drupal\Core\StringTranslation\ByteSizeMarkup @group StringTranslation | ||||
BytesTest | class | Drupal\Tests\Component\Utility | core/ |
Tests bytes size parsing helper methods. | ||||
Cache | class | Drupal\Core\Cache | core/ |
Helper methods for cache. | 216 | |||
CacheabilityMetadataConfigOverride | class | Drupal\config_override_integration_test | core/ |
Test implementation of a config override that provides cacheability metadata. | 2 | |||
CacheabilityMetadataConfigOverrideIntegrationTest | class | Drupal\Tests\config\Functional | core/ |
Tests if configuration overrides correctly affect cacheability metadata. | ||||
CacheabilityMetadataConfigOverrideTest | class | Drupal\KernelTests\Core\Config | core/ |
Tests if configuration overrides correctly affect cacheability metadata. | ||||
CacheableAccessDeniedHttpException | class | Drupal\Core\Http\Exception | core/ |
A cacheable AccessDeniedHttpException. | 1 | 4 | ||
CacheableAjaxResponse | class | Drupal\Core\Cache | core/ |
A AjaxResponse that contains and can expose cacheability metadata. | 1 | |||
CacheableBadRequestHttpException | class | Drupal\Core\Http\Exception | core/ |
A cacheable BadRequestHttpException. | 12 | |||
CacheableConflictHttpException | class | Drupal\Core\Http\Exception | core/ |
A cacheable ConflictHttpException. | 1 | |||
CacheableDependencyInterface | interface | Drupal\Core\Cache | core/ |
Defines an interface for objects which may be used by other cached objects. | 69 | 93 | ||
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 | 176 | ||
CacheableMetadataCalculationTest | class | Drupal\views_test_cacheable_metadata_calculation\Plugin\views\access | core/ |
Tests plugin that reports when cacheable metadata is being calculated. | ||||
CacheableMetadataCalculationTest | class | Drupal\Tests\views\Kernel | core/ |
Tests that cacheability metadata is only calculated when needed. | ||||
CacheableMetadataTest | class | Drupal\Tests\Core\Cache | core/ |
@coversDefaultClass \Drupal\Core\Cache\CacheableMetadata @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 | 18 | ||
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 |
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.