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 1518
Name | Deprecated | Object type | Namespace | File name | Summary | Direct uses | Use statements | Strings |
---|---|---|---|---|---|---|---|---|
BrowserMissingDependentModuleMethodTest | in drupal:10.3.0 and is removed from drupal:11.0.0. There is no replacement. |
class | Drupal\FunctionalTests | core/ |
A fixture test class with requires annotation. | |||
BrowserMissingDependentModuleTest | in drupal:10.3.0 and is removed from drupal:11.0.0. There is no replacement. |
class | Drupal\FunctionalTests | core/ |
A fixture test class with requires annotation. | |||
BrowserTestBase | abstract class | Drupal\Tests | core/ |
Provides a test case for functional Drupal tests. | 599 | 608 | ||
BrowserTestBaseMockableClass | class | Drupal\Tests\Core\Test | core/ |
A class extending BrowserTestBase for testing purposes. | ||||
BrowserTestBaseTest | class | Drupal\FunctionalTests | core/ |
Tests BrowserTestBase functionality. | ||||
BrowserTestBaseTest | class | Drupal\Tests\Core\Test | core/ |
@coversDefaultClass \Drupal\Tests\BrowserTestBase @group Test | ||||
BrowserTestBaseUserAgentTest | class | Drupal\FunctionalTests | core/ |
Tests BrowserTestBase functionality. | ||||
BrowserWithJavascriptTest | class | Drupal\FunctionalJavascriptTests | core/ |
Tests if we can execute JavaScript in the browser. | ||||
BubbleableMetadata | class | Drupal\Core\Render | core/ |
Value object used for bubbleable rendering metadata. | 3 | 77 | ||
BubbleableMetadataTest | class | Drupal\Tests\Core\Render | core/ |
@coversDefaultClass \Drupal\Core\Render\BubbleableMetadata @group Render | ||||
BubblingTest | class | Drupal\Tests\Core\Render | core/ |
|||||
BuilderInterface | interface | Drupal\Composer\Generator | composer/ |
Produce the output for a metapackage. | 1 | 1 | ||
BuilderTest | class | Drupal\Tests\Composer\Generator | core/ |
Test DrupalCoreRecommendedBuilder. | ||||
BuildTest | final class | Drupal\Tests\Component\Foo | core/ |
|||||
BuildTestBase | abstract class | Drupal\BuildTests\Framework | core/ |
Provides a workspace to test build processes. | 7 | 8 | ||
BuildTestSuite | in drupal:10.3.0 and is removed from drupal:11.0.0. There is no replacement and test discovery will be handled differently in PHPUnit 10. |
class | Drupal\Tests\TestSuites | core/ |
Discovers tests for the build test suite. | |||
BuildTestTest | class | Drupal\BuildTests\Framework\Tests | core/ |
@coversDefaultClass \Drupal\BuildTests\Framework\BuildTestBase @group Build | ||||
BulkDeleteTest | class | Drupal\Tests\field\Kernel | core/ |
Bulk delete storages and fields, and clean up afterwards. | ||||
BulkForm | class | Drupal\views\Plugin\views\field | core/ |
Defines an actions-based bulk operation form element. | 3 | 4 | ||
BulkFormAccessTest | class | Drupal\Tests\node\Functional\Views | core/ |
Tests if entity access is respected on a node bulk operations form. | ||||
BulkFormAccessTest | class | Drupal\Tests\user\Functional\Views | core/ |
Tests if entity access is respected on a user bulk form. | ||||
BulkFormTest | class | Drupal\Tests\user\Functional\Views | core/ |
Tests a user bulk form. | ||||
BulkFormTest | class | Drupal\Tests\views\Functional | core/ |
Tests the views bulk form test. | 1 | 1 | ||
BulkFormTest | class | Drupal\Tests\node\Functional\Views | core/ |
Tests a node bulk form. | ||||
BulkFormTest | class | Drupal\Tests\views\Unit\Plugin\views\field | core/ |
@coversDefaultClass \Drupal\views\Plugin\views\field\BulkForm @group Views | ||||
BulkOperationsTest | class | Drupal\Tests\views\FunctionalJavascript\Plugin | core/ |
Tests the bulk operations. | ||||
Bundle | class | Drupal\views\Plugin\views\filter | core/ |
Filter class which allows filtering by entity bundles. | ||||
BundleClassInheritanceException | class | Drupal\Core\Entity\Exception | core/ |
Exception thrown if a bundle class does not extend the main entity class. | 2 | |||
BundleClassTest | class | Drupal\KernelTests\Core\Entity | core/ |
Tests entity bundle classes. | ||||
BundleConfigImportValidate | class | Drupal\Core\Entity\Event | core/ |
Entity config importer validation event subscriber. | ||||
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 | 7 | ||
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. | 13 | 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. | 218 | |||
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 |
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.