Classes, traits, and interfaces in Drupal 9
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 |
|---|---|---|---|---|---|---|---|
| BrowserTestBaseUserAgentTest | class |
Drupal\ |
core/ |
Tests BrowserTestBase functionality. | |||
| BrowserWithJavascriptTest | class |
Drupal\ |
core/ |
Tests if we can execute JavaScript in the browser. | |||
| BubbleableMetadata | class |
Drupal\ |
core/ |
Value object used for bubbleable rendering metadata. | 3 | 66 | |
| BubbleableMetadataTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\Core\Render\BubbleableMetadata @group Render | |||
| BubblingTest | class |
Drupal\ |
core/ |
||||
| BuilderInterface | interface |
Drupal\ |
composer/ |
Produce the output for a metapackage. | 1 | 1 | |
| BuilderTest | class |
Drupal\ |
core/ |
Test DrupalCoreRecommendedBuilder. | |||
| BuildTestBase | abstract class |
Drupal\ |
core/ |
Provides a workspace to test build processes. | 4 | 4 | |
| BuildTestSuite | class |
Drupal\ |
core/ |
Discovers tests for the build test suite. | |||
| BuildTestTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\BuildTests\Framework\BuildTestBase @group Build | |||
| BulkDeleteTest | class |
Drupal\ |
core/ |
Bulk delete storages and fields, and clean up afterwards. | |||
| BulkForm | class |
Drupal\ |
core/ |
Defines an actions-based bulk operation form element. | 3 | 3 | |
| BulkFormAccessTest | class |
Drupal\ |
core/ |
Tests if entity access is respected on a node bulk operations form. | |||
| BulkFormAccessTest | class |
Drupal\ |
core/ |
Tests if entity access is respected on a user bulk form. | |||
| BulkFormTest | class |
Drupal\ |
core/ |
Tests the views bulk form test. | |||
| BulkFormTest | class |
Drupal\ |
core/ |
Tests a node bulk form. | |||
| BulkFormTest | class |
Drupal\ |
core/ |
Tests a user bulk form. | |||
| Bundle | class |
Drupal\ |
core/ |
Filter class which allows filtering by entity bundles. | |||
| BundleConfigImportValidate | class |
Drupal\ |
core/ |
Entity config importer validation event subscriber. | 2 | ||
| BundleConstraint | class |
Drupal\ |
core/ |
Checks if a value is a valid entity type. | 1 | ||
| BundleConstraintValidator | class |
Drupal\ |
core/ |
Validates the Bundle constraint. | |||
| BundleConstraintValidatorTest | class |
Drupal\ |
core/ |
Tests validation constraints for BundleConstraintValidator. | |||
| BundleEntityFormBase | class |
Drupal\ |
core/ |
Class BundleEntityFormBase is a base form for bundle config entities. | 4 | 5 | |
| BundlePermissionHandlerTrait | trait |
Drupal\ |
core/ |
Provides a method to simplify generating bundle level permissions. | 4 | ||
| BundlePermissionHandlerTraitTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\Core\Entity\BundlePermissionHandlerTrait | |||
| BundleTranslationSettingsInterface | interface |
Drupal\ |
core/ |
Interface providing support for content translation bundle settings. | 1 | 2 | |
| Button | class |
Drupal\ |
core/ |
Provides an action button form element. | 1 | ||
| Bytes | class |
Drupal\ |
core/ |
Provides helper methods for byte conversions. | 11 | ||
| BytesTest | class |
Drupal\ |
core/ |
Tests bytes size parsing helper methods. | |||
| Cache | class |
Drupal\ |
core/ |
Helper methods for cache. | 208 | ||
| CacheabilityMetadataConfigOverride | class |
Drupal\ |
core/ |
Test implementation of a config override that provides cacheability metadata. | 2 | ||
| CacheabilityMetadataConfigOverrideIntegrationTest | class |
Drupal\ |
core/ |
Tests if configuration overrides correctly affect cacheability metadata. | |||
| CacheabilityMetadataConfigOverrideTest | class |
Drupal\ |
core/ |
Tests if configuration overrides correctly affect cacheability metadata. | |||
| CacheableAccessDeniedHttpException | class |
Drupal\ |
core/ |
A cacheable AccessDeniedHttpException. | 1 | 5 | |
| CacheableBadRequestHttpException | class |
Drupal\ |
core/ |
A cacheable BadRequestHttpException. | 12 | ||
| CacheableConflictHttpException | class |
Drupal\ |
core/ |
A cacheable ConflictHttpException. | 1 | ||
| CacheableDependencyInterface | interface |
Drupal\ |
core/ |
Defines an interface for objects which may be used by other cached objects. | 66 | 85 | |
| CacheableDependencyTrait | trait |
Drupal\ |
core/ |
Trait for \Drupal\Core\Cache\CacheableDependencyInterface. | 21 | ||
| CacheableEmbeddedDataSource | class |
Drupal\ |
core/ |
A copy of embedded_data which allows caching the count. | |||
| CacheableExceptionTest | class |
Drupal\ |
core/ |
@group Http | |||
| CacheableGoneHttpException | class |
Drupal\ |
core/ |
A cacheable GoneHttpException. | 1 | ||
| CacheableHttpException | class |
Drupal\ |
core/ |
A cacheable HttpException. | 2 | ||
| CacheableJsonResponse | class |
Drupal\ |
core/ |
A JsonResponse that contains and can expose cacheability metadata. | 6 | ||
| CacheableLengthRequiredHttpException | class |
Drupal\ |
core/ |
A cacheable LengthRequiredHttpException. | 1 | ||
| CacheableMetadata | class |
Drupal\ |
core/ |
Defines a generic class for passing cacheability metadata. | 2 | 147 | |
| CacheableMetadataCalculationTest | class |
Drupal\ |
core/ |
Tests that cacheability metadata is only calculated when needed. | |||
| CacheableMetadataCalculationTest | class |
Drupal\ |
core/ |
Tests plugin that reports when cacheable metadata is being calculated. | |||
| CacheableMetadataTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\Core\Cache\CacheableMetadata @group Cache | |||
| CacheableMethodNotAllowedHttpException | class |
Drupal\ |
core/ |
A cacheable MethodNotAllowedHttpException. | 2 | ||
| CacheableNormalization | class |
Drupal\ |
core/ |
Use to store normalized data and its cacheability. | 2 | 17 |