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 |
---|---|---|---|---|---|---|---|---|
BreakStatement | class | Peast\Syntax\Node | vendor/ |
A node that represents the "break" statement inside loops. | ||||
Break_ | class | PhpParser\Node\Stmt | vendor/ |
|||||
BrickMathCalculator | final class | Ramsey\Uuid\Math | vendor/ |
A calculator using the brick/math library for arbitrary-precision arithmetic | 6 | |||
Broken | class | Drupal\views\Plugin\views\sort | core/ |
A special handler to take the place of missing or broken handlers. | ||||
Broken | class | Drupal\views\Plugin\views\field | core/ |
A special handler to take the place of missing or broken handlers. | ||||
Broken | class | Drupal\Core\Entity\Plugin\EntityReferenceSelection | core/ |
Defines a fallback plugin for missing entity_reference selection plugins. | ||||
Broken | class | Drupal\views\Plugin\views\relationship | core/ |
A special handler to take the place of missing or broken handlers. | ||||
Broken | class | Drupal\views\Plugin\views\argument | core/ |
A special handler to take the place of missing or broken handlers. | ||||
Broken | class | Drupal\Core\Block\Plugin\Block | core/ |
Defines a fallback plugin for missing block plugins. | ||||
Broken | class | Drupal\views\Plugin\views\filter | core/ |
A special handler to take the place of missing or broken handlers. | 1 | |||
Broken | class | Drupal\views\Plugin\views\area | core/ |
A special handler to take the place of missing or broken handlers. | ||||
BrokenHandlerTrait | trait | Drupal\views\Plugin\views | core/ |
A Trait for Views broken handlers. | 6 | |||
BrokenPostRequestException | class | Drupal\Core\Form\Exception | core/ |
Defines an exception used, when the POST HTTP body is broken. | 2 | |||
Browser | final class | WebDriver | vendor/ |
WebDriver\Browser class | ||||
BrowserCookieValueSame | final class | Symfony\Component\BrowserKit\Test\Constraint | vendor/ |
|||||
BrowserHasCookie | final class | Symfony\Component\BrowserKit\Test\Constraint | vendor/ |
|||||
BrowserKitDriver | class | Behat\Mink\Driver | vendor/ |
Symfony BrowserKit driver. | ||||
BrowserSpecificStylesSniff | class | PHP_CodeSniffer\Standards\MySource\Sniffs\CSS | vendor/ |
|||||
BubbleableMetadata | class | Drupal\Core\Render | core/ |
Value object used for bubbleable rendering metadata. | 3 | 40 | ||
BucketEntry | final class | OpenTelemetry\SDK\Metrics\Exemplar | vendor/ |
@internal | ||||
Buckets | class | Opentelemetry\Proto\Metrics\V1\ExponentialHistogramDataPoint | vendor/ |
Buckets are a set of bucket counts, encoded in a contiguous array of counts. | ||||
BucketStorage | final class | OpenTelemetry\SDK\Metrics\Exemplar | vendor/ |
@internal | ||||
BufferedOutput | class | Symfony\Component\Console\Output | vendor/ |
@author Jean-François Simon <contact@jfsimon.fr> | 1 | |||
BufferingLogger | class | Symfony\Component\ErrorHandler | vendor/ |
A buffering logger that stacks logs for later. | ||||
BufferIO | class | Composer\IO | vendor/ |
@author Jordi Boggiano <j.boggiano@seld.be> | 2 | |||
BufferStream | final class | GuzzleHttp\Psr7 | vendor/ |
Provides a buffer stream that can be written to to fill a buffer, and read from to remove bytes from the buffer. | ||||
Builder | final class | PHPUnit\TextUI\Configuration | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | ||||
Builder | interface | PhpParser | vendor/ |
8 | 3 | |||
Builder | final class | PHPUnit\TextUI\CliArguments | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | 2 | |||
Builder | final class | SebastianBergmann\CodeCoverage\Node | vendor/ |
@internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage | 1 | |||
BuilderCollection | this class has been deprecated, and will be removed in 5.0.0. The use-case for this class comes from a pre-`phpstan/phpstan` and pre-`vimeo/psalm` ecosystem, in which type safety had to be mostly enforced at runtime: that is no longer necessary, now that you can safely verify your code to be correct, and use more generic types like `iterable<T>` instead. |
class | Ramsey\Uuid\Builder | vendor/ |
A collection of UuidBuilderInterface objects | |||
BuilderFactory | class | PhpParser | vendor/ |
|||||
BuilderHelpers | final class | PhpParser | vendor/ |
This class defines helpers used in the implementation of builders. Don't use it directly. | 16 | |||
BuilderInterface | interface | Drupal\Composer\Generator | composer/ |
Produce the output for a metapackage. | 1 | 1 | ||
BuilderNotFoundException | class | Ramsey\Uuid\Exception | vendor/ |
Thrown to indicate that no suitable builder could be found | 1 | |||
BuildInformation | final class | SebastianBergmann\CodeCoverage\Report\Xml | vendor/ |
@internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage | ||||
BuildMetaData | class | PharIo\Version | vendor/ |
|||||
BulkForm | class | Drupal\views\Plugin\views\field | core/ |
Defines an actions-based bulk operation form element. | 3 | 3 | ||
BumpCommand | final class | Composer\Command | vendor/ |
@author Jordi Boggiano <j.boggiano@seld.be> | ||||
Bundle | class | Drupal\views\Plugin\views\filter | core/ |
Filter class which allows filtering by entity bundles. | ||||
Bundle | abstract class | Symfony\Component\HttpKernel\Bundle | vendor/ |
An implementation of BundleInterface that adds a few conventions for DependencyInjection extensions. | 1 | |||
BundleClassInheritanceException | class | Drupal\Core\Entity\Exception | core/ |
Exception thrown if a bundle class does not extend the main entity class. | 1 | |||
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. | ||||
BundledComponent | class | PharIo\Manifest | vendor/ |
|||||
BundledComponentCollection | class | PharIo\Manifest | vendor/ |
@template-implements IteratorAggregate<int,BundledComponent> | ||||
BundledComponentCollectionIterator | class | PharIo\Manifest | vendor/ |
@template-implements Iterator<int,BundledComponent> | ||||
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 |