Classes, traits, and interfaces - main - drupal

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

File

core/core.api.php, line 1529

Name Deprecated Object type Namespace File name Summary Direct uses Use statements Strings
CommentDepthTest class Drupal\Tests\comment\Kernel\Views core/modules/comment/tests/src/Kernel/Views/CommentDepthTest.php Tests the depth of the comment field handler.
CommentDisplayConfigurableTest class Drupal\Tests\comment\Functional core/modules/comment/tests/src/Functional/CommentDisplayConfigurableTest.php Tests making comment base fields' displays configurable.
CommentDisplayConfigurableTestHooks class Drupal\comment_display_configurable_test\Hook core/modules/comment/tests/modules/comment_display_configurable_test/src/Hook/CommentDisplayConfigurableTestHooks.php Hook implementations for comment_display_configurable_test.
CommentedEntity class Drupal\comment\Plugin\views\field core/modules/comment/src/Plugin/views/field/CommentedEntity.php Views field display for commented entity.
CommentEditTest class Drupal\Tests\comment\Functional\Views core/modules/comment/tests/src/Functional/Views/CommentEditTest.php Tests comment edit functionality.
CommentEmptyTitleTestThemeHooks class Drupal\comment_empty_title_test\Hook core/modules/comment/tests/modules/comment_empty_title_test/src/Hook/CommentEmptyTitleTestThemeHooks.php Hook implementations for comment_empty_title_test.
CommentEntityReferenceTest class Drupal\Tests\comment\Functional core/modules/comment/tests/src/Functional/CommentEntityReferenceTest.php Tests that comments behave correctly when added as entity references.
CommentEntityTranslation class Drupal\comment\Plugin\migrate\source\d7 core/modules/comment/src/Plugin/migrate/source/d7/CommentEntityTranslation.php Drupal 7 comment entity translation source plugin. 1
CommentEntityTranslationCheckRequirementsTest class Drupal\Tests\comment\Kernel\Migrate\d7 core/modules/comment/tests/src/Kernel/Migrate/d7/CommentEntityTranslationCheckRequirementsTest.php Tests check requirements for comment entity translation source plugin.
CommentEntityTranslationTest class Drupal\Tests\comment\Kernel\Plugin\migrate\source\d7 core/modules/comment/tests/src/Kernel/Plugin/migrate/source/d7/CommentEntityTranslationTest.php Tests D7 comment entity translation source plugin.
CommentExtrasTest class Drupal\Tests\jsonapi\Functional core/modules/jsonapi/tests/src/Functional/CommentExtrasTest.php JSON:API integration test for the "Comment" content entity type.
CommentFieldAccessTest class Drupal\Tests\comment\Kernel core/modules/comment/tests/src/Kernel/CommentFieldAccessTest.php Tests comment field level access.
CommentFieldFilterTest class Drupal\Tests\comment\Functional\Views core/modules/comment/tests/src/Functional/Views/CommentFieldFilterTest.php Tests comment field filters with translations.
CommentFieldItemList class Drupal\comment core/modules/comment/src/CommentFieldItemList.php Defines an item list class for comment fields. 1
CommentFieldNameTest class Drupal\Tests\comment\Kernel\Views core/modules/comment/tests/src/Kernel/Views/CommentFieldNameTest.php Tests the comment field name field.
CommentFieldPreprocessTest class Drupal\Tests\comment\Kernel core/modules/comment/tests/src/Kernel/CommentFieldPreprocessTest.php Test comment field preprocess hook.
CommentFieldsTest class Drupal\Tests\comment\Functional core/modules/comment/tests/src/Functional/CommentFieldsTest.php Tests fields on comments.
CommentForm class Drupal\comment core/modules/comment/src/CommentForm.php Base handler for comment forms. 1
CommentHooks class Drupal\comment\Hook core/modules/comment/src/Hook/CommentHooks.php Hook implementations for comment.
CommentHostnameTest class Drupal\Tests\comment\Kernel core/modules/comment/tests/src/Kernel/CommentHostnameTest.php Tests the hostname base field.
CommentIntegrationTest class Drupal\Tests\comment\Kernel core/modules/comment/tests/src/Kernel/CommentIntegrationTest.php Tests integration of comment with other components.
CommentInterface interface Drupal\comment core/modules/comment/src/CommentInterface.php Provides an interface defining a comment entity. 1 23
CommentInterfaceTest class Drupal\Tests\comment\Functional core/modules/comment/tests/src/Functional/CommentInterfaceTest.php Tests comment user interfaces.
CommentItem class Drupal\comment\Plugin\Field\FieldType core/modules/comment/src/Plugin/Field/FieldType/CommentItem.php Plugin implementation of the 'comment' field type.
CommentItemInterface interface Drupal\comment\Plugin\Field\FieldType core/modules/comment/src/Plugin/Field/FieldType/CommentItemInterface.php Interface definition for Comment items. 1 39
CommentItemTest class Drupal\Tests\comment\Kernel core/modules/comment/tests/src/Kernel/CommentItemTest.php Tests the new entity API for the comment field type.
CommentJsonAnonTest class Drupal\Tests\comment\Functional\Rest core/modules/comment/tests/src/Functional/Rest/CommentJsonAnonTest.php Tests Comment Json Anon.
CommentJsonBasicAuthTest class Drupal\Tests\comment\Functional\Rest core/modules/comment/tests/src/Functional/Rest/CommentJsonBasicAuthTest.php Tests Comment Json Basic Auth.
CommentJsonCookieTest class Drupal\Tests\comment\Functional\Rest core/modules/comment/tests/src/Functional/Rest/CommentJsonCookieTest.php Tests Comment Json Cookie.
CommentLanguageTest class Drupal\Tests\comment\Functional core/modules/comment/tests/src/Functional/CommentLanguageTest.php Tests for comment language.
CommentLazyBuilders class Drupal\comment core/modules/comment/src/CommentLazyBuilders.php Defines a service for comment #lazy_builder callbacks. 2
CommentLinkBuilder class Drupal\comment core/modules/comment/src/CommentLinkBuilder.php Defines a class for building markup for comment links on a commented entity. 1 2
CommentLinkBuilderInterface interface Drupal\comment core/modules/comment/src/CommentLinkBuilderInterface.php Defines an interface for building comment links on a commented entity. 1
CommentLinkBuilderTest class Drupal\Tests\comment\Unit core/modules/comment/tests/src/Unit/CommentLinkBuilderTest.php Tests Drupal\comment\CommentLinkBuilder.
CommentLinksAlterTest class Drupal\Tests\comment\Functional core/modules/comment/tests/src/Functional/CommentLinksAlterTest.php Tests comment links altering.
CommentLinksTest class Drupal\Tests\comment\Functional core/modules/comment/tests/src/Functional/CommentLinksTest.php Basic comment links tests to ensure markup present.
CommentLinksTest class Drupal\Tests\comment\Kernel\Views core/modules/comment/tests/src/Kernel/Views/CommentLinksTest.php Tests the comment link field handlers.
CommentLockTest class Drupal\Tests\comment\Unit\Entity core/modules/comment/tests/src/Unit/Entity/CommentLockTest.php Tests comment acquires and releases the right lock.
CommentManager class Drupal\comment core/modules/comment/src/CommentManager.php Comment manager contains common functions to manage comment fields. 1 2
CommentManagerInterface interface Drupal\comment core/modules/comment/src/CommentManagerInterface.php Comment manager contains common functions to manage comment fields. 1 13
CommentManagerTest class Drupal\Tests\comment\Unit core/modules/comment/tests/src/Unit/CommentManagerTest.php Tests Drupal\comment\CommentManager.
CommentNameConstraint class Drupal\comment\Plugin\Validation\Constraint core/modules/comment/src/Plugin/Validation/Constraint/CommentNameConstraint.php Supports validating comment author names.
CommentNameConstraintValidator class Drupal\comment\Plugin\Validation\Constraint core/modules/comment/src/Plugin/Validation/Constraint/CommentNameConstraintValidator.php Validates the CommentName constraint.
CommentNodeAccessTest class Drupal\Tests\comment\Functional core/modules/comment/tests/src/Functional/CommentNodeAccessTest.php Tests comments with node access.
CommentNodeChangesTest class Drupal\Tests\comment\Functional core/modules/comment/tests/src/Functional/CommentNodeChangesTest.php Tests that comments behave correctly when the node is changed.
CommentNonNodeTest class Drupal\Tests\comment\Functional core/modules/comment/tests/src/Functional/CommentNonNodeTest.php Tests commenting on a test entity.
CommentOperationsTest class Drupal\Tests\comment\Functional\Views core/modules/comment/tests/src/Functional/Views/CommentOperationsTest.php Tests comment operations.
CommentOrphanTest class Drupal\Tests\comment\Kernel core/modules/comment/tests/src/Kernel/CommentOrphanTest.php Tests loading and rendering orphan comments.
CommentPagerTest class Drupal\Tests\comment\Functional core/modules/comment/tests/src/Functional/CommentPagerTest.php Tests paging of comments and their settings.
CommentPermalinkFormatter class Drupal\comment\Plugin\Field\FieldFormatter core/modules/comment/src/Plugin/Field/FieldFormatter/CommentPermalinkFormatter.php Plugin implementation of the 'comment_permalink' formatter.

Other projects


Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.