Classes, traits, and interfaces - 8.9.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 1511
| Name | Deprecated | Object type | Namespace | File name | Summary | Direct uses | Use statements | Strings |
|---|---|---|---|---|---|---|---|---|
| CustomAnnotationClassDiscoveryTest | class | Drupal\KernelTests\Core\Plugin\Discovery | core/ |
Tests that a custom annotation class is used. | ||||
| CustomBooleanTest | class | Drupal\Tests\views_ui\Functional | core/ |
Tests the UI and functionality for the Custom boolean field handler options. | ||||
| CustomDirectoryAnnotatedClassDiscoveryTest | class | Drupal\KernelTests\Core\Plugin\Discovery | core/ |
Tests that plugins in a custom directory are correctly discovered using annotated classes. | ||||
| CustomDirectoryExample1 | class | Drupal\plugin_test | core/ |
Provides a test plugin within a custom directory. | ||||
| CustomDirectoryExample2 | class | Drupal\plugin_test | core/ |
Provides a test plugin within a custom directory. | ||||
| CustomPageExceptionHtmlSubscriber | class | Drupal\Core\EventSubscriber | core/ |
Exception subscriber for handling core custom HTML error pages. | 1 | 2 | ||
| CustomPageExceptionHtmlSubscriberTest | class | Drupal\Tests\Core\EventSubscriber | core/ |
@coversDefaultClass \Drupal\Core\EventSubscriber\CustomPageExceptionHtmlSubscriber[[api-linebreak]] @group EventSubscriber | ||||
| CustomPlugin | class | Drupal\Tests\Component\Annotation | core/ |
Custom plugin annotation. | ||||
| CustomPlugin2 | class | Drupal\Tests\Component\Annotation | core/ |
Custom plugin annotation. | ||||
| CustomStrings | class | Drupal\Core\StringTranslation\Translator | core/ |
String translator using overrides from variables. | 2 | |||
| CustomThemeNegotiator | class | Drupal\theme_test\Theme | core/ |
Just forces the 'test_theme' theme. | 2 | |||
| D6FileField | class | Drupal\migrate_cckfield_plugin_manager_test\Plugin\migrate\cckfield | core/ |
Plugin annotation @MigrateCckField( id = "d6_file", core = {6}, type_map = { "file" = "file" }, source_module = "foo", destination_module = "bar" ) | 2 | |||
| D6FileField | class | Drupal\migrate_field_plugin_manager_test\Plugin\migrate\field | core/ |
Plugin annotation @MigrateField( id = "d6_file", core = {6}, type_map = { "file" = "file" }, source_module = "foo", destination_module = "bar" ) | ||||
| D6NoCoreVersionSpecified | class | Drupal\migrate_field_plugin_manager_test\Plugin\migrate\field | core/ |
Plugin annotation @MigrateField( id = "d6_no_core_version_specified", source_module = "foo", destination_module = "bar", ) | ||||
| D6NoCoreVersionSpecified | class | Drupal\migrate_cckfield_plugin_manager_test\Plugin\migrate\cckfield | core/ |
Plugin annotation @MigrateCckField( id = "d6_no_core_version_specified", source_module = "foo", destination_module = "bar", ) | ||||
| D6NodeDeriver | class | Drupal\node\Plugin\migrate | core/ |
Deriver for Drupal 6 node and node revision migrations based on node types. | 4 | |||
| D6NodeTranslation | class | Drupal\node\Plugin\migrate | core/ |
Migration plugin for the Drupal 6 node translations. | 2 | |||
| D6TermNodeDeriver | class | Drupal\taxonomy\Plugin\migrate | core/ |
Deriver for Drupal 6 term node migrations based on vocabularies. | 3 | |||
| D6VariableTranslation | in drupal:8.7.0 and is removed from drupal:9.0.0. Use \Drupal\migrate_drupal\Plugin\migrate\source\d6\VariableTranslation. |
class | Drupal\migrate_drupal\Plugin\migrate\source\d6 | core/ |
Gets Drupal i18n_variable source from database. | |||
| D7Comment | class | Drupal\comment\Plugin\migrate | core/ |
Migration plugin for Drupal 7 comments with fields. | 2 | |||
| D7NodeDeriver | class | Drupal\node\Plugin\migrate | core/ |
Deriver for Drupal 7 node and node revision migrations based on node types. | 5 | |||
| D7NodeTranslation | class | Drupal\node\Plugin\migrate | core/ |
Migration plugin for the Drupal 7 node translations. | 2 | |||
| D7TaxonomyTermDeriver | class | Drupal\taxonomy\Plugin\migrate | core/ |
Deriver for Drupal 7 taxonomy term migrations based on vocabularies. | 2 | |||
| Data | abstract class | Drupal\jsonapi\JsonApiResource | core/ |
Represents the `data` and `included` objects of a top-level object. | 2 | 4 | ||
| Database | abstract class | Drupal\Core\Database | core/ |
Primary front-controller for the database system. | 318 | |||
| DatabaseAccessDeniedException | class | Drupal\Core\Database | core/ |
Exception thrown if access credentials fail. | 2 | |||
| DatabaseBackend | class | Drupal\Core\Flood | core/ |
Defines the database flood backend. This is the default Drupal backend. | 2 | 2 | ||
| DatabaseBackend | class | Drupal\Core\Cache | core/ |
Defines a default cache implementation. | 4 | |||
| DatabaseBackendFactory | class | Drupal\Core\Cache | core/ |
2 | 2 | |||
| DatabaseBackendFactoryTest | class | Drupal\Tests\Core\Cache | core/ |
@coversDefaultClass \Drupal\Core\Cache\DatabaseBackendFactory[[api-linebreak]] @group Cache | ||||
| DatabaseBackendTagTest | class | Drupal\KernelTests\Core\Cache | core/ |
Tests DatabaseBackend cache tag implementation. | ||||
| DatabaseBackendTest | class | Drupal\KernelTests\Core\Cache | core/ |
Unit test of the database backend using the generic cache unit test base. | ||||
| DatabaseCacheTagsChecksum | class | Drupal\Core\Cache | core/ |
Cache tags invalidations checksum implementation that uses the database. | 2 | |||
| DatabaseException | interface | Drupal\Core\Database | core/ |
Interface for a database exception. | 19 | 19 | ||
| DatabaseExceptionWrapper | class | Drupal\Core\Database | core/ |
This wrapper class serves only to provide additional debug information. | 19 | |||
| DatabaseExceptionWrapperTest | class | Drupal\KernelTests\Core\Database | core/ |
Tests exceptions thrown by queries. | ||||
| DatabaseFileUsageBackend | class | Drupal\file\FileUsage | core/ |
Defines the database file usage backend. This is the default Drupal backend. | 1 | 2 | ||
| DatabaseLegacyTest | class | Drupal\KernelTests\Core\Database | core/ |
Deprecation tests cases for the database layer. | ||||
| DatabaseLockBackend | class | Drupal\Core\Lock | core/ |
Defines the database lock backend. This is the default backend in Drupal. | 1 | 3 | 2 | |
| DatabaseLockBackend | class | Drupal\Core\ProxyClass\Lock | core/ |
Provides a proxy class for \Drupal\Core\Lock\DatabaseLockBackend. | ||||
| DatabaseNotFoundException | class | Drupal\Core\Database | core/ |
Exception thrown if specified database is not found. | 8 | |||
| DatabaseQueue | class | Drupal\Core\Queue | core/ |
Default queue implementation. | 1 | 1 | ||
| DatabaseStorage | class | Drupal\Core\KeyValueStore | core/ |
Defines a default key/value store implementation. | 1 | |||
| DatabaseStorage | class | Drupal\Core\Config | core/ |
Defines the Database storage. | 3 | 3 | ||
| DatabaseStorageExpirable | class | Drupal\Core\KeyValueStore | core/ |
Defines a default key/value store implementation for expiring items. | 1 | |||
| DatabaseStorageExpirableTest | class | Drupal\KernelTests\Core\KeyValueStore | core/ |
Tests the key-value database storage. | ||||
| DatabaseStorageTest | class | Drupal\KernelTests\Core\KeyValueStore | core/ |
Tests the key-value database storage. | ||||
| DatabaseStorageTest | class | Drupal\KernelTests\Core\Config\Storage | core/ |
Tests DatabaseStorage operations. | ||||
| DatabaseTest | class | Drupal\Tests\Core\Database | core/ |
@coversDefaultClass \Drupal\Core\Database\Database[[api-linebreak]] | ||||
| DatabaseTestBase | abstract class | Drupal\KernelTests\Core\Database | core/ |
Base class for databases database tests. | 32 | 2 |
Pagination
- Previous page
- Page 38
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.