Classes, traits, and interfaces - main - 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 1529
| Name | Deprecated | Object type | Namespace | File name | Summary | Direct uses | Use statements | Strings |
|---|---|---|---|---|---|---|---|---|
| DriverSpecificSyntaxTestBase | abstract class | Drupal\KernelTests\Core\Database | core/ |
Tests driver specific SQL syntax interpretation. | 4 | 4 | ||
| DriverSpecificTransactionTestBase | abstract class | Drupal\KernelTests\Core\Database | core/ |
Tests the transaction abstraction system. | 4 | 4 | ||
| Dropbutton | class | Drupal\Core\Render\Element | core/ |
Provides a render element for a set of links rendered as a drop-down button. | 1 | |||
| Dropbutton | class | Drupal\views\Plugin\views\field | core/ |
Provides a handler that renders links as dropbutton. | ||||
| Drupal | class | core/ |
Static Service Container wrapper. | |||||
| Drupal6SqlBaseTest | class | Drupal\Tests\migrate_drupal\Unit\source\d6 | core/ |
Tests the D6 SQL base class. | ||||
| DrupalApplication | class | Drupal\Core\Command | core/ |
Customize the Symfony Application for Drupal. | ||||
| DrupalApplicationTesterTrait | trait | Drupal\KernelTests | core/ |
Trait to help with testing the drupal console. | 2 | |||
| DrupalAspectsOfCKEditor5Plugin | class | Drupal\ckeditor5\Attribute | core/ |
Define a Drupal aspects of CKEditor5 plugin. | ||||
| DrupalAspectsOfCKEditor5Plugin | class | Drupal\ckeditor5\Annotation | core/ |
Defines the "Drupal aspects of a CKEditor5Plugin" annotation object. | 1 | |||
| DrupalComponentTest | class | Drupal\Tests\Component | core/ |
General tests for \Drupal\Component that can't go anywhere else. | ||||
| DrupalConsoleLogger | class | Drupal\Core\Command | core/ |
Logs to the console. A logger is set during DrupalApplication->bootstrap(). | 2 | 2 | ||
| DrupalConsoleLoggerTest | class | Drupal\Tests\Core\Command | core/ |
Tests DrupalConsoleLogger. | ||||
| DrupalCoreComposer | class | Drupal\Composer\Generator\Util | composer/ |
Utilities for working with drupal composer.json files and data. | 6 | |||
| DrupalCoreRecommendedBuilder | class | Drupal\Composer\Generator\Builder | composer/ |
Builder to produce metapackage for drupal/core-recommended. | 3 | |||
| DrupalDateTime | class | Drupal\Core\Datetime | core/ |
Extends DateTimePlus(). | 3 | 39 | ||
| DrupalDateTimeTest | class | Drupal\Tests\Core\Datetime | core/ |
Tests Drupal\Core\Datetime\DrupalDateTime. | ||||
| DrupalDateTimeTest | class | Drupal\KernelTests\Core\Datetime | core/ |
Tests DrupalDateTime functionality. | ||||
| DrupalDebugClassLoader | class | Drupal\TestTools\ErrorHandler | core/ |
Extends Symfony's DebugClassLoader for Drupal-aware vendor boundaries. | 2 | |||
| DrupalDebugClassLoaderTest | class | Drupal\Tests\TestTools\ErrorHandler | core/ |
Tests the DrupalDebugClassLoader. | ||||
| DrupalDevDependenciesBuilder | class | Drupal\Composer\Generator\Builder | composer/ |
Builder to produce metapackage for drupal/core-dev. | 3 | |||
| DrupalFlushAllCachesInInstallerTest | class | Drupal\FunctionalTests\Installer | core/ |
Tests drupal_flush_all_caches() and container rebuilds during an install. | ||||
| DrupalFlushAllCachesTest | class | Drupal\KernelTests\Core\Common | core/ |
Tests Drupal Flush All Caches. | ||||
| DrupalInstalledTemplate | class | Drupal\Composer\Plugin\Scaffold | composer/ |
Produces code for the DrupalInstalled file. | ||||
| DrupalInstalledTest | class | Drupal\Tests\Composer\Plugin\Scaffold\Functional | core/ |
Tests DrupalInstalled.php hash changes when scaffolding is run. | ||||
| DrupalKernel | class | Drupal\Core | core/ |
The DrupalKernel class is the core of Drupal itself. | 4 | 38 | ||
| DrupalKernelInterface | interface | Drupal\Core | core/ |
The interface for DrupalKernel, the core of Drupal. | 1 | 13 | ||
| DrupalKernelRequestStackTest | class | Drupal\KernelTests\Core\DrupalKernel | core/ |
Tests the usage of the request stack as part of request processing. | ||||
| DrupalKernelSiteTest | class | Drupal\KernelTests\Core\DrupalKernel | core/ |
Tests site-specific service overrides. | ||||
| DrupalKernelTest | class | Drupal\KernelTests\Core\DrupalKernel | core/ |
Tests DIC compilation to disk. | ||||
| DrupalKernelTest | class | Drupal\Tests\Core\DrupalKernel | core/ |
Tests Drupal\Core\DrupalKernel. | ||||
| DrupalLogErrorTest | class | Drupal\Tests\Core\Error | core/ |
Tests logging of errors in core/error.inc. | ||||
| DrupalMessengerServiceTest | class | Drupal\Tests\system\Functional\Bootstrap | core/ |
Tests the Messenger service. | ||||
| DrupalPackageBuilder | abstract class | Drupal\Composer\Generator\Builder | composer/ |
Base class that includes helpful utility routine for Drupal builder classes. | 3 | |||
| DrupalPinnedDevDependenciesBuilder | in drupal:11.4.0 and is removed from drupal:12.0.0. Use drupal/core-dev instead. |
class | Drupal\Composer\Generator\Builder | composer/ |
Builder to produce metapackage for drupal/core-dev-pinned. | |||
| DrupalRuntime | class | Drupal\Core\Runtime | core/ |
The custom Drupal framework runtime. | 1 | |||
| DrupalSelenium2Driver | class | Drupal\FunctionalJavascriptTests | core/ |
Provides a driver for Selenium testing. | 1 | |||
| DrupalSelenium2DriverTest | class | Drupal\FunctionalJavascriptTests\Tests | core/ |
Tests the DrupalSelenium2Driver methods. | ||||
| DrupalSqlBase | in drupal:11.3.0 and is removed from drupal:12.0.0. There is no replacement. |
abstract class | Drupal\migrate_drupal\Plugin\migrate\source | core/ |
A base class for source plugins using a Drupal database as a source. | 65 | 63 | |
| DrupalSqlBaseTest | class | Drupal\Tests\migrate_drupal\Unit\source | core/ |
Tests Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase. | ||||
| DrupalStandardsListenerDeprecatedClass | class | Drupal\deprecation_test\Deprecation | core/ |
Fixture class for use by DrupalStandardsListenerDeprecationTest. | 1 | |||
| DrupalStandardsListenerDeprecationTest | class | Drupal\Tests\Core\Listeners | core/ |
Test deprecation error handling by DrupalStandardsListener. | ||||
| DrupalTest | class | Drupal\Tests\Core | core/ |
Tests the Drupal class. | ||||
| DrupalTestBrowser | class | Drupal\Tests | core/ |
Enables a BrowserKitDriver mink driver to use a Guzzle client. | 2 | |||
| DrupalTestCase | abstract class | Drupal\Tests | core/ |
Provides the root base class for all Drupal core tests. | 4 | 3 | ||
| DrupalTestCaseTrait | trait | Drupal\Tests | core/ |
Provides methods common across Drupal test classes. | ||||
| DrupalTranslator | class | Drupal\Core\Validation | core/ |
Translates strings using Drupal's translation system. | 2 | |||
| DtcgInterface | interface | Drupal\Core\Theme\DesignToken | core/ |
Interface for DTCG tokens and groups. | 2 | 1 | ||
| DummyAjaxFormatter | class | Drupal\image_module_test\Plugin\Field\FieldFormatter | core/ |
Empty renderer for a dummy field with an AJAX handler. | ||||
| DummyAjaxItem | class | Drupal\image_module_test\Plugin\Field\FieldType | core/ |
Defines a dummy field containing an AJAX handler. |
Pagination
- Previous page
- Page 57
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.