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 |
|---|---|---|---|---|---|---|---|---|
| ClassLoaderTest | class | Drupal\Tests\system\Functional\Module | core/ |
Tests class loading for modules. | ||||
| ClassResolver | class | Drupal\Core\DependencyInjection | core/ |
Implements the class resolver interface supporting class names and services. | 4 | 2 | ||
| ClassResolverConstraint | class | Drupal\Core\Validation\Plugin\Validation\Constraint | core/ |
Checks if a method on a service or instantiated object returns true. | ||||
| ClassResolverConstraintValidator | class | Drupal\Core\Validation\Plugin\Validation\Constraint | core/ |
Validates if a method on a service or instantiated object returns true. | 1 | |||
| ClassResolverConstraintValidatorTest | class | Drupal\KernelTests\Core\TypedData | core/ |
Tests ClassResolver validation constraint with both valid and invalid values. | ||||
| ClassResolverInterface | interface | Drupal\Core\DependencyInjection | core/ |
Provides interface to get an instance of a class with dependency injection. | 1 | 29 | ||
| ClassWithConstants | class | Drupal\Tests\Component\Annotation\Doctrine\Fixtures | core/ |
1 | ||||
| ClassWithInvalidAnnotationTargetAtClass | class | Drupal\Tests\Component\Annotation\Doctrine\Fixtures | core/ |
Plugin annotation @AnnotationTargetPropertyMethod("Some data"); | ||||
| ClassWithInvalidAnnotationTargetAtMethod | class | Drupal\Tests\Component\Annotation\Doctrine\Fixtures | core/ |
Plugin annotation @AnnotationTargetClass("Some data"); | ||||
| ClassWithInvalidAnnotationTargetAtProperty | class | Drupal\Tests\Component\Annotation\Doctrine\Fixtures | core/ |
Plugin annotation @AnnotationTargetClass("Some data"); | ||||
| ClassWithValidAnnotationTarget | class | Drupal\Tests\Component\Annotation\Doctrine\Fixtures | core/ |
Plugin annotation @AnnotationTargetClass("Some data"); | ||||
| Cleaner | final class | Drupal\package_manager\Plugin\QueueWorker | core/ |
Processes a queue of defunct stage directories, deleting them. | ||||
| ClearCacheBlock | class | Drupal\system\Plugin\Block | core/ |
Provides a block to display 'Clear cache' elements. | ||||
| ClearCacheBlockTest | class | Drupal\Tests\system\Functional\Block | core/ |
Tests clear cache block behavior. | ||||
| ClearCacheForm | class | Drupal\system\Form | core/ |
Clear caches for this site. | 2 | |||
| ClearTest | class | Drupal\Tests\system\Functional\Cache | core/ |
Tests our clearing is done the proper way. | ||||
| ClickSortingAJAXTest | class | Drupal\Tests\views\FunctionalJavascript | core/ |
Tests the click sorting AJAX functionality of Views exposed forms. | ||||
| ClientErrorResponseSubscriber | class | Drupal\Core\EventSubscriber | core/ |
Response subscriber to set the '4xx-response' cache tag on 4xx responses. | 2 | |||
| ClientFactory | class | Drupal\Core\Http | core/ |
Helper class to construct a HTTP client with Drupal specific config. | 2 | 2 | ||
| ClientFactoryTest | class | Drupal\Tests\Core\Http | core/ |
Tests Drupal\Core\Http\ClientFactory. | ||||
| CloseDialogCommand | class | Drupal\Core\Ajax | core/ |
Defines an AJAX command that closes the current active dialog. | 1 | 6 | ||
| CloseModalDialogCommand | class | Drupal\Core\Ajax | core/ |
Defines an AJAX command that closes the currently visible modal dialog. | 2 | |||
| CodeBlock | class | Drupal\ckeditor5\Plugin\CKEditor5Plugin | core/ |
CKEditor 5 Code Block plugin configuration. | 1 | |||
| CollapsedSummariesTest | class | Drupal\Tests\node\FunctionalJavascript | core/ |
Tests that outlines of node meta values are displayed in summaries and tabs. | ||||
| CollectPathsToExcludeEvent | final class | Drupal\package_manager\Event | core/ |
Defines an event that collects paths to exclude. | 18 | |||
| CollectPathsToExcludeFailValidator | class | Drupal\package_manager_test_validation | core/ |
Allows to test an excluder which fails on CollectPathsToExcludeEvent. | 2 | |||
| CollectRelationshipMetaEvent | final class | Drupal\jsonapi\Events | core/ |
Event for collecting the relationship metadata of a JSON:API resource object. | 3 | |||
| CollectResourceObjectMetaEvent | final class | Drupal\jsonapi\Events | core/ |
Event for collecting resource object metadata of a JSON:API resource types. | 2 | |||
| CollectRoutesTest | class | Drupal\Tests\rest\Unit | core/ |
Tests the REST export view plugin. | ||||
| Color | class | Drupal\Core\Render\Element | core/ |
Provides a form element for choosing a color. | ||||
| Color | class | Drupal\Component\Utility | core/ |
Performs color conversions. | 6 | |||
| ColorTest | class | Drupal\Tests\Component\Utility | core/ |
Tests Color utility class conversions. | ||||
| Com | class | Drupal\Component\Uuid | core/ |
Generates a UUID using the Windows internal GUID extension. | 1 | |||
| Combine | class | Drupal\views\Plugin\views\filter | core/ |
Filter handler which allows to search on multiple fields. | 1 | |||
| CommandInterface | interface | Drupal\Core\Ajax | core/ |
AJAX command interface. | 32 | 10 | ||
| CommandLineOrUnsafeMethod | class | Drupal\Core\PageCache\RequestPolicy | core/ |
Reject when running from the command line or when HTTP method is not safe. | 3 | |||
| CommandLineOrUnsafeMethodTest | class | Drupal\Tests\Core\PageCache | core/ |
Tests Drupal\Core\PageCache\RequestPolicy\CommandLineOrUnsafeMethod. | ||||
| CommandProvider | class | Drupal\Composer\Plugin\Scaffold | composer/ |
List of all commands provided by this package. | 1 | |||
| CommandProvider | final class | Drupal\Composer\Plugin\RecipeUnpack | composer/ |
List of all commands provided by this package. | 1 | |||
| CommandsTest | class | Drupal\FunctionalJavascriptTests\Ajax | core/ |
Performs tests on AJAX framework commands. | ||||
| CommandsTest | class | Drupal\KernelTests\Core\Ajax | core/ |
Performs tests on AJAX framework commands. | ||||
| CommandWithAttachedAssetsInterface | interface | Drupal\Core\Ajax | core/ |
Interface for Ajax commands that render content and attach assets. | 5 | |||
| CommandWithAttachedAssetsTrait | trait | Drupal\Core\Ajax | core/ |
Trait for Ajax commands that render content and attach assets. | ||||
| Comment | class | Drupal\comment\Entity | core/ |
Defines the comment entity class. | 51 | |||
| Comment | class | Drupal\comment\Plugin\views\wizard | core/ |
Tests creating comment views with the wizard. | ||||
| Comment | class | Drupal\comment\Plugin\migrate\source\d6 | core/ |
Drupal 6 comment source from database. | 2 | |||
| Comment | class | Drupal\comment\Plugin\migrate\source\d7 | core/ |
Drupal 7 comment source from database. | 1 | |||
| CommentAccessControlHandler | class | Drupal\comment | core/ |
Defines the access control handler for the comment entity type. | 1 | |||
| CommentAccessTest | class | Drupal\Tests\comment\Functional | core/ |
Tests comment administration and preview access. | ||||
| CommentAdminOverview | class | Drupal\comment\Form | core/ |
Provides the comments overview administration form. | 1 |
Pagination
- Previous page
- Page 24
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.