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 |
|---|---|---|---|---|---|---|---|
| CommentBookTest | class |
Drupal\ |
core/ |
Tests visibility of comments on book pages. | |||
| CommentBreadcrumbBuilder | class |
Drupal\ |
core/ |
Class to define the comment breadcrumb builder. | 2 | ||
| CommentBulkForm | class |
Drupal\ |
core/ |
Defines a comment operations bulk form element. | 1 | ||
| CommentBulkFormTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\comment\Plugin\views\field\CommentBulkForm @group comment | |||
| CommentBundlesTest | class |
Drupal\ |
core/ |
Tests that comment bundles behave as expected. | |||
| CommentCacheTagsTest | class |
Drupal\ |
core/ |
Tests the Comment entity's cache tags. | |||
| CommentController | class |
Drupal\ |
core/ |
Controller for the comment entity. | |||
| CommentCSSTest | class |
Drupal\ |
core/ |
Tests CSS classes on comments. | |||
| CommentDefaultFormatter | class |
Drupal\ |
core/ |
Provides a default comment formatter. | |||
| CommentDefaultFormatterCacheTagsTest | class |
Drupal\ |
core/ |
Tests the bubbling up of comment cache tags when using the Comment list formatter on an entity. | |||
| CommentDepthTest | class |
Drupal\ |
core/ |
Tests the depth of the comment field handler. | |||
| CommentedEntity | class |
Drupal\ |
core/ |
Views field display for commented entity. | |||
| CommentEditTest | class |
Drupal\ |
core/ |
Tests comment edit functionality. | |||
| CommentEntityTest | class |
Drupal\ |
core/ |
Tests comments with other entities. | |||
| CommentEntityTranslation | class |
Drupal\ |
core/ |
Drupal 7 comment entity translation source plugin. | |||
| CommentEntityTranslationCheckRequirementsTest | class |
Drupal\ |
core/ |
Tests check requirements for comment entity translation source plugin. | |||
| CommentEntityTranslationTest | class |
Drupal\ |
core/ |
Tests D7 comment entity translation source plugin. | |||
| CommentFieldAccessTest | class |
Drupal\ |
core/ |
Tests comment field level access. | |||
| CommentFieldFilterTest | class |
Drupal\ |
core/ |
Tests comment field filters with translations. | |||
| CommentFieldItemList | class |
Drupal\ |
core/ |
Defines an item list class for comment fields. | |||
| CommentFieldNameTest | class |
Drupal\ |
core/ |
Tests the comment field name field. | |||
| CommentFieldsTest | class |
Drupal\ |
core/ |
Tests fields on comments. | |||
| CommentForm | class |
Drupal\ |
core/ |
Base handler for comment forms. | |||
| CommentHalJsonAnonTest | class |
Drupal\ |
core/ |
@group hal | |||
| CommentHalJsonBasicAuthTest | class |
Drupal\ |
core/ |
@group hal | |||
| CommentHalJsonCookieTest | class |
Drupal\ |
core/ |
@group hal | |||
| CommentHalJsonTestBase | abstract class |
Drupal\ |
core/ |
3 | |||
| CommentHostnameTest | class |
Drupal\ |
core/ |
Tests the hostname base field. | |||
| CommentIntegrationTest | class |
Drupal\ |
core/ |
Tests integration of comment with other components. | |||
| CommentInterface | interface |
Drupal\ |
core/ |
Provides an interface defining a comment entity. | 1 | 37 | |
| CommentInterfaceTest | class |
Drupal\ |
core/ |
Tests comment user interfaces. | |||
| CommentItem | class |
Drupal\ |
core/ |
Plugin implementation of the 'comment' field type. | |||
| CommentItemInterface | interface |
Drupal\ |
core/ |
Interface definition for Comment items. | 1 | 37 | |
| CommentItemTest | class |
Drupal\ |
core/ |
Tests the new entity API for the comment field type. | |||
| CommentJsonAnonTest | class |
Drupal\ |
core/ |
@group rest | |||
| CommentJsonBasicAuthTest | class |
Drupal\ |
core/ |
@group rest | |||
| CommentJsonCookieTest | class |
Drupal\ |
core/ |
@group rest | |||
| CommentLanguageTest | class |
Drupal\ |
core/ |
Tests for comment language. | |||
| CommentLazyBuilders | class |
Drupal\ |
core/ |
Defines a service for comment #lazy_builder callbacks. | 2 | ||
| CommentLinkBuilder | class |
Drupal\ |
core/ |
Defines a class for building markup for comment links on a commented entity. | 1 | 2 | |
| CommentLinkBuilderInterface | interface |
Drupal\ |
core/ |
Defines an interface for building comment links on a commented entity. | 1 | ||
| CommentLinkBuilderTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\comment\CommentLinkBuilder @group comment | |||
| CommentLinksAlterTest | class |
Drupal\ |
core/ |
Tests comment links altering. | |||
| CommentLinksTest | class |
Drupal\ |
core/ |
Basic comment links tests to ensure markup present. | |||
| CommentLinksTest | class |
Drupal\ |
core/ |
Tests the comment link field handlers. | |||
| CommentLockTest | class |
Drupal\ |
core/ |
Tests comment acquires and releases the right lock. | |||
| CommentManager | class |
Drupal\ |
core/ |
Comment manager contains common functions to manage comment fields. | 1 | 2 | |
| CommentManagerInterface | interface |
Drupal\ |
core/ |
Comment manager contains common functions to manage comment fields. | 1 | 15 | |
| CommentManagerTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\comment\CommentManager @group comment | |||
| CommentNameConstraint | class |
Drupal\ |
core/ |
Supports validating comment author names. |