Classes, traits, and interfaces in Drupal 8
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 |
|---|---|---|---|---|---|---|---|
| BaseFieldOverrideTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\Core\Field\Entity\BaseFieldOverride @group Field | |||
| BaseFieldOverrideXmlAnonTest | class |
Drupal\ |
core/ |
@group rest | |||
| BaseFieldOverrideXmlBasicAuthTest | class |
Drupal\ |
core/ |
@group rest | |||
| BaseFieldOverrideXmlCookieTest | class |
Drupal\ |
core/ |
@group rest | |||
| BaseFormIdInterface | interface |
Drupal\ |
core/ |
Provides an interface for a Form that has a base form ID. | 5 | 5 | |
| BaseThemeDefaultDeprecationTest | class |
Drupal\ |
core/ |
Tests the behavior of the Stable theme. | |||
| BaseThemeRequiredTest | class |
Drupal\ |
core/ |
Tests the behavior of the `base theme` key. | |||
| Basic | class |
Drupal\ |
core/ |
Exposed form plugin that provides a basic exposed form. | |||
| BasicAuth | class |
Drupal\ |
core/ |
HTTP Basic authentication provider. | 2 | ||
| BasicAuthResourceTestTrait | trait |
Drupal\ |
core/ |
Trait for ResourceTestBase subclasses testing $auth=basic_auth. | 154 | ||
| BasicAuthTest | class |
Drupal\ |
core/ |
Tests for BasicAuth authentication provider. | |||
| BasicAuthTestController | class |
Drupal\ |
core/ |
||||
| BasicAuthTestTrait Deprecated | trait |
Drupal\ |
core/ |
Provides common functionality for Basic Authentication test classes. | |||
| BasicAuthTestTrait | trait |
Drupal\ |
core/ |
Provides common functionality for Basic Authentication test classes. | 2 | ||
| BasicControllerClass | class |
Drupal\ |
core/ |
A class containing all kind of different controller methods. | |||
| BasicForm | class |
Drupal\ |
core/ |
A basic form with a passed entity with an interface. | |||
| BasicFormNoContainerInjectionInterface | class |
Drupal\ |
core/ |
||||
| BasicFormNoUpcasting | class |
Drupal\ |
core/ |
A basic form with a passed entity without an interface. | |||
| BasicSettingsForm | class |
Drupal\ |
core/ |
Form builder for the admin display defaults page. | 1 | ||
| BasicStringFormatter | class |
Drupal\ |
core/ |
Plugin implementation of the 'basic_string' formatter. | |||
| BasicSyntaxTest | class |
Drupal\ |
core/ |
Tests SQL syntax interpretation. | |||
| BasicTest | class |
Drupal\ |
core/ |
A basic query test for Views. | |||
| BasicTest | class |
Drupal\ |
core/ |
Tests creating views with the wizard and viewing them on the listing page. | |||
| Batch | class |
Drupal\ |
core/ |
Defines a batch queue handler used by the Batch API. | |||
| BatchBuilder | class |
Drupal\ |
core/ |
Builds an array for a batch process. | 2 | ||
| BatchBuilderTest | class |
Drupal\ |
core/ |
Tests for the batch builder class. | |||
| BatchController | class |
Drupal\ |
core/ |
Controller routines for batch routes. | |||
| BatchKernelTest | class |
Drupal\ |
core/ |
Tests batch functionality. | |||
| 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. | |||
| BcConfigSubscriber | class |
Drupal\ |
core/ |
Config event subscriber to rebuild the container when BC config is saved. | 2 | ||
| BcEditor | class |
Drupal\ |
core/ |
||||
| BcRoute | class |
Drupal\ |
core/ |
A backwards compatibility route. | 2 | ||
| BcRoutesTest | class |
Drupal\ |
core/ |
Tests Settings Tray BC routes. | |||
| BcTimestampNormalizerUnixTestTrait | trait |
Drupal\ |
core/ |
Trait for ResourceTestBase subclasses formatting expected timestamp data. | 21 | ||
| 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. |