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 |
|---|---|---|---|---|---|---|---|
| BatchMemory | class |
Drupal\ |
core/ |
Defines a batch queue handler used by the Batch API for non-progressive batches. | |||
| BatchNegotiator | class |
Drupal\ |
core/ |
Sets the active theme for the batch page. | 2 | ||
| BatchStorage | class |
Drupal\ |
core/ |
2 | |||
| BatchStorage | class |
Drupal\ |
core/ |
Provides a proxy class for \Drupal\Core\Batch\BatchStorage. | |||
| BatchStorageInterface | interface |
Drupal\ |
core/ |
Defines a common interface for batch storage operations. | 2 | 1 | |
| BatchTestChainedForm | class |
Drupal\ |
core/ |
Generate form of id batch_test_chained_form. | 1 | ||
| BatchTestController | class |
Drupal\ |
core/ |
Controller routines for batch tests. | |||
| BatchTestMockForm | class |
Drupal\ |
core/ |
Generate form of id batch_test_mock_form. | |||
| BatchTestMultiStepForm | class |
Drupal\ |
core/ |
Generate form of id batch_test_multistep_form. | 1 | ||
| BatchTestSimpleForm | class |
Drupal\ |
core/ |
Generate form of id batch_test_simple_form. | 1 | ||
| BatchUserAction | class |
Drupal\ |
core/ |
Provides action that sets batch precessing. | |||
| BazCacheContext | class |
Drupal\ |
core/ |
Fake calculated cache context class. | |||
| BazClass | class |
Drupal\ |
core/ |
Stub class which acts as a service dependency, to test the container. | |||
| BcRoute | class |
Drupal\ |
core/ |
A backwards compatibility route. | |||
| BcTimestampNormalizerUnixTestTrait | trait |
Drupal\ |
core/ |
Trait for ResourceTestBase subclasses formatting expected timestamp data. | |||
| BeforeCommand | class |
Drupal\ |
core/ |
An AJAX command for calling the jQuery before() method. | 2 | ||
| BigApple | class |
Drupal\ |
core/ |
Plugin annotation @PluginExtended( id = "big_apple", label = "Big Apple", color = "green" ) | |||
| BigPipe | class |
Drupal\ |
core/ |
Service for sending an HTML response in chunks (to get faster page loads). | 4 | 2 | |
| BigPipeController | class |
Drupal\ |
core/ |
Returns responses for BigPipe module routes. | |||
| BigPipeMarkup | final class |
Drupal\ |
core/ |
Defines an object that passes safe strings through BigPipe's render pipeline. | 3 | ||
| BigPipePlaceholderTestCase | class |
Drupal\ |
core/ |
||||
| BigPipePlaceholderTestCases | class |
Drupal\ |
core/ |
BigPipe placeholder test cases for use in both unit and integration tests. | 2 | ||
| BigPipeRegressionTest | class |
Drupal\ |
core/ |
BigPipe regression tests. | |||
| BigPipeRegressionTestController | class |
Drupal\ |
core/ |
1 | |||
| BigPipeResponse | class |
Drupal\ |
core/ |
A response that is sent in chunks by the BigPipe service. | 3 | ||
| BigPipeResponseAttachmentsProcessor | class |
Drupal\ |
core/ |
Processes attachments of HTML responses with BigPipe enabled. | 1 | 2 | |
| BigPipeResponseAttachmentsProcessorTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\big_pipe\Render\BigPipeResponseAttachmentsProcessor @group big_pipe | |||
| BigPipeStrategy | class |
Drupal\ |
core/ |
Defines the BigPipe placeholder strategy, to send HTML in chunks. | 4 | 2 | |
| BigPipeStrategyTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\big_pipe\Render\Placeholder\BigPipeStrategy @group big_pipe | |||
| BigPipeTest | class |
Drupal\ |
core/ |
Tests BigPipe's no-JS detection & response delivery (with and without JS). | |||
| BigPipeTestController | class |
Drupal\ |
core/ |
||||
| BigPipeTestForm | class |
Drupal\ |
core/ |
Form to test BigPipe. | |||
| BigPipeTestSubscriber | class |
Drupal\ |
core/ |
1 | 2 | ||
| BinaryData | class |
Drupal\ |
core/ |
The binary data type. | |||
| BinaryInterface | interface |
Drupal\ |
core/ |
Interface for binary data. | 1 | 3 | |
| BlankLayout | class |
Drupal\ |
core/ |
Provides a layout plugin that produces no output. | |||
| Block | class |
Drupal\ |
core/ |
Defines a Block configuration entity class. | 31 | ||
| Block | class |
Drupal\ |
core/ |
Defines a Block annotation object. | |||
| Block | class |
Drupal\ |
core/ |
The plugin that handles a block. | |||
| Block | class |
Drupal\ |
core/ |
Drupal block source from database. | 2 | 2 | |
| BlockAccessControlHandler | class |
Drupal\ |
core/ |
Defines the access control handler for the block entity type. | |||
| BlockAddController | class |
Drupal\ |
core/ |
Controller for building the block instance add form. | |||
| BlockAdminThemeTest | class |
Drupal\ |
core/ |
Tests the block system with admin themes. | |||
| BlockBase | abstract class |
Drupal\ |
core/ |
Defines a base block implementation that most blocks plugins will extend. | 47 | 48 | |
| BlockBaseTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\Core\Block\BlockBase @group block | |||
| BlockCacheTest | class |
Drupal\ |
core/ |
Tests block caching. | |||
| BlockComponentRenderArray | class |
Drupal\ |
core/ |
Builds render arrays and handles access for all block components. | 2 | 2 | |
| BlockComponentRenderArrayTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\layout_builder\EventSubscriber\BlockComponentRenderArray @group layout_builder | |||
| BlockConfigEntityUnitTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\block\Entity\Block @group block | |||
| BlockConfigSchemaTest | class |
Drupal\ |
core/ |
Tests the block config schema. |