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 |
|---|---|---|---|---|---|---|---|
| CommentNameConstraintValidator | class |
Drupal\ |
core/ |
Validates the CommentName constraint. | |||
| CommentNewIndicatorTest | class |
Drupal\ |
core/ |
Tests the 'new' indicator posted on comments. | |||
| CommentNodeAccessTest | class |
Drupal\ |
core/ |
Tests comments with node access. | |||
| CommentNodeChangesTest | class |
Drupal\ |
core/ |
Tests that comments behave correctly when the node is changed. | |||
| CommentNonNodeTest | class |
Drupal\ |
core/ |
Tests commenting on a test entity. | |||
| CommentOperationsTest | class |
Drupal\ |
core/ |
Tests comment operations. | |||
| CommentOrphanTest | class |
Drupal\ |
core/ |
Tests loading and rendering orphan comments. | |||
| CommentPagerTest | class |
Drupal\ |
core/ |
Tests paging of comments and their settings. | |||
| CommentPermalinkFormatter | class |
Drupal\ |
core/ |
Plugin implementation of the 'comment_permalink' formatter. | |||
| CommentPreviewTest | class |
Drupal\ |
core/ |
Tests comment preview. | |||
| CommentResourceTestBase | abstract class |
Drupal\ |
core/ |
7 | 1 | ||
| CommentRestExportTest | class |
Drupal\ |
core/ |
Tests a comment rest export view. | |||
| CommentRowTest | class |
Drupal\ |
core/ |
Tests the comment row plugin. | |||
| CommentRssTest | class |
Drupal\ |
core/ |
Tests comments as part of an RSS feed. | |||
| CommentSelection | class |
Drupal\ |
core/ |
Provides specific access control for the comment entity type. | |||
| CommentSourceWithHighWaterTest | class |
Drupal\ |
core/ |
Tests the Drupal 6 comment source w/ high water handling. | |||
| CommentStatistics | class |
Drupal\ |
core/ |
1 | 2 | ||
| CommentStatisticsInterface | interface |
Drupal\ |
core/ |
Provides an interface for storing and retrieving comment statistics. | 1 | 1 | |
| CommentStatisticsTest | class |
Drupal\ |
core/ |
Tests comment statistics on nodes. | |||
| CommentStatisticsUnitTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\comment\CommentStatistics @group comment | |||
| CommentStatusFieldAccessTest | class |
Drupal\ |
core/ |
Tests comment status field access. | |||
| CommentStorage | class |
Drupal\ |
core/ |
Defines the storage handler class for comments. | |||
| CommentStorageInterface | interface |
Drupal\ |
core/ |
Defines an interface for comment entity storage classes. | 1 | 1 | |
| CommentStorageSchema | class |
Drupal\ |
core/ |
Defines the comment schema handler. | |||
| CommentStringIdEntitiesTest | class |
Drupal\ |
core/ |
Tests that comment fields cannot be added to entities with non-integer IDs. | |||
| CommentTest | class |
Drupal\ |
core/ |
JSON:API integration test for the "Comment" content entity type. | |||
| CommentTest | class |
Drupal\ |
core/ |
Tests D6 comment source plugin. | |||
| CommentTest | class |
Drupal\ |
core/ |
Tests D7 comment source plugin. | |||
| CommentTestBase | abstract class |
Drupal\ |
core/ |
Provides setup and helper methods for comment tests. | 23 | 3 | |
| CommentTestBase | abstract class |
Drupal\ |
core/ |
Provides setup and helper methods for comment views tests. | 6 | ||
| CommentTestBaseField | class |
Drupal\ |
core/ |
Defines a test entity class for comment as a base field. | 1 | ||
| CommentTestController | class |
Drupal\ |
core/ |
Controller for the comment_test.module. | |||
| CommentTestTrait | trait |
Drupal\ |
core/ |
Provides common functionality for the Comment test classes. | 43 | ||
| CommentThreadingTest | class |
Drupal\ |
core/ |
Tests to make sure the comment number increments properly. | |||
| CommentTitleTest | class |
Drupal\ |
core/ |
Tests to ensure that appropriate and accessible markup is created for comment titles. | |||
| CommentTokenReplaceTest | class |
Drupal\ |
core/ |
Generates text using placeholders for dummy content to check comment token replacement. | |||
| CommentTranslationHandler | class |
Drupal\ |
core/ |
Defines the translation handler for comments. | |||
| CommentTranslationUITest | class |
Drupal\ |
core/ |
Tests the Comment Translation UI. | |||
| CommentType | class |
Drupal\ |
core/ |
Defines the comment type entity. | 26 | ||
| CommentType | class |
Drupal\ |
core/ |
Drupal 6/7 comment types source from database. | |||
| CommentTypeDeleteForm | class |
Drupal\ |
core/ |
Provides a confirmation form for deleting a comment type entity. | |||
| CommentTypeForm | class |
Drupal\ |
core/ |
Base form handler for comment type edit forms. | |||
| CommentTypeHalJsonAnonTest | class |
Drupal\ |
core/ |
@group hal | |||
| CommentTypeHalJsonBasicAuthTest | class |
Drupal\ |
core/ |
@group hal | |||
| CommentTypeHalJsonCookieTest | class |
Drupal\ |
core/ |
@group hal | |||
| CommentTypeInterface | interface |
Drupal\ |
core/ |
Provides an interface defining a comment type entity. | 1 | 1 | |
| CommentTypeJsonAnonTest | class |
Drupal\ |
core/ |
@group rest | |||
| CommentTypeJsonBasicAuthTest | class |
Drupal\ |
core/ |
@group rest | |||
| CommentTypeJsonCookieTest | class |
Drupal\ |
core/ |
@group rest | |||
| CommentTypeListBuilder | class |
Drupal\ |
core/ |
Defines a class to build a listing of comment type entities. |