Classes, traits, and interfaces - 9.5.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 1523
| Name | Deprecated | Object type | Namespace | File name | Summary | Direct uses | Use statements | Strings |
|---|---|---|---|---|---|---|---|---|
| MockMenuBlockDeriver | class | Drupal\plugin_test\Plugin\plugin_test\mock_block | core/ |
Mock implementation of DeriverInterface for the mock menu block plugin. | ||||
| MockPhpStorage | class | Drupal\system\PhpStorage | core/ |
Mock PHP storage class used for testing. | 1 | |||
| MockQuickEditEntityFieldAccessCheck | class | Drupal\quickedit_test | core/ |
Access check for in-place editing entity fields. | 2 | |||
| MockRouteProvider | class | Drupal\system\Tests\Routing | core/ |
Easily configurable mock route provider. | 1 | |||
| MockService | class | Drupal\Tests\Component\DependencyInjection | core/ |
Helper class to test Container::get() method. | ||||
| MockTestBlock | class | Drupal\plugin_test\Plugin\plugin_test\mock_block | core/ |
Mock implementation of a test block plugin used by Plugin API unit tests. | ||||
| MockTestConnection | class | Drupal\Tests\system\Functional\FileTransfer | core/ |
Mock connection object for test case. | ||||
| MockUserLoginBlock | class | Drupal\plugin_test\Plugin\plugin_test\mock_block | core/ |
Mock implementation of a login block plugin used by Plugin API unit tests. | ||||
| MockUserNameBlock | class | Drupal\plugin_test\Plugin\plugin_test\mock_block | core/ |
Implementation of a user name block plugin used by Plugin API context test. | ||||
| ModalRenderer | class | Drupal\Core\Render\MainContent | core/ |
Default main content renderer for modal dialog requests. | 1 | 1 | 2 | |
| ModalRendererTest | class | Drupal\Tests\system\FunctionalJavascript | core/ |
Tests that dialog links use different renderer services. | ||||
| ModeratedContentController | class | Drupal\content_moderation\Controller | core/ |
Defines a controller to list moderated nodes. | ||||
| ModeratedContentLocalTaskTest | class | Drupal\Tests\content_moderation\Functional | core/ |
Tests moderated content dynamic local task. | ||||
| ModeratedContentViewTest | class | Drupal\Tests\content_moderation\Functional | core/ |
Tests moderated content administration page functionality. | ||||
| ModeratedNodeJsonAnonTest | class | Drupal\Tests\rest\Functional\EntityResource\ModeratedNode | core/ |
@group rest | ||||
| ModeratedNodeJsonBasicAuthTest | class | Drupal\Tests\rest\Functional\EntityResource\ModeratedNode | core/ |
@group rest | ||||
| ModeratedNodeJsonCookieTest | class | Drupal\Tests\rest\Functional\EntityResource\ModeratedNode | core/ |
@group rest | ||||
| ModeratedNodeListBuilder | class | Drupal\content_moderation | core/ |
Defines a class to build a listing of moderated node entities. | 1 | |||
| ModeratedNodeResourceTestBase | abstract class | Drupal\Tests\rest\Functional\EntityResource\ModeratedNode | core/ |
Extend the Node resource test base and apply moderation to the entity. | 6 | |||
| ModeratedNodeXmlAnonTest | class | Drupal\Tests\rest\Functional\EntityResource\ModeratedNode | core/ |
@group rest | ||||
| ModeratedNodeXmlBasicAuthTest | class | Drupal\Tests\rest\Functional\EntityResource\ModeratedNode | core/ |
@group rest | ||||
| ModeratedNodeXmlCookieTest | class | Drupal\Tests\rest\Functional\EntityResource\ModeratedNode | core/ |
@group rest | ||||
| ModerationActionsTest | class | Drupal\Tests\content_moderation\Functional | core/ |
Test the content moderation actions. | ||||
| ModerationContentTranslationTest | class | Drupal\Tests\content_moderation\Functional | core/ |
Test content_moderation functionality with content_translation. | ||||
| ModerationFormTest | class | Drupal\Tests\content_moderation\Functional | core/ |
Tests the moderation form, specifically on nodes. | ||||
| ModerationHandler | class | Drupal\content_moderation\Entity\Handler | core/ |
Common customizations for most/all entities. | 2 | 3 | ||
| ModerationHandlerInterface | interface | Drupal\content_moderation\Entity\Handler | core/ |
Defines operations that need to vary by entity type. | 1 | |||
| ModerationInformation | class | Drupal\content_moderation | core/ |
General service for moderation-related questions about Entity API. | 3 | 2 | ||
| ModerationInformationInterface | interface | Drupal\content_moderation | core/ |
Interface for moderation_information service. | 1 | 12 | ||
| ModerationInformationTest | class | Drupal\Tests\content_moderation\Unit | core/ |
@coversDefaultClass \Drupal\content_moderation\ModerationInformation[[api-linebreak]] @group content_moderation | ||||
| ModerationInformationTest | class | Drupal\Tests\content_moderation\Kernel | core/ |
@coversDefaultClass \Drupal\content_moderation\ModerationInformation[[api-linebreak]] @group content_moderation | ||||
| ModerationLocaleTest | class | Drupal\Tests\content_moderation\Functional | core/ |
Test content_moderation functionality with localization and translation. | ||||
| ModerationOptOutPublish | class | Drupal\content_moderation\Plugin\Action | core/ |
Alternate action plugin that can opt-out of modifying moderated entities. | 1 | |||
| ModerationOptOutUnpublish | class | Drupal\content_moderation\Plugin\Action | core/ |
Alternate action plugin that can opt-out of modifying moderated entities. | 1 | |||
| ModerationRevisionRevertTest | class | Drupal\Tests\content_moderation\Functional | core/ |
Test revision revert. | ||||
| ModerationStateAccessTest | class | Drupal\Tests\content_moderation\Functional | core/ |
Tests the view access control handler for moderation state entities. | ||||
| ModerationStateBlockTest | class | Drupal\Tests\content_moderation\Functional | core/ |
Tests general content moderation workflow for blocks. | ||||
| ModerationStateConstraint | class | Drupal\content_moderation\Plugin\Validation\Constraint | core/ |
Verifies that nodes have a valid moderation state. | ||||
| ModerationStateConstraintValidator | class | Drupal\content_moderation\Plugin\Validation\Constraint | core/ |
Checks if a moderation state transition is valid. | ||||
| ModerationStateField | class | Drupal\content_moderation\Plugin\views\field | core/ |
A field handler for the computed moderation_state field. | ||||
| ModerationStateFieldItemList | class | Drupal\content_moderation\Plugin\Field | core/ |
A computed field that provides a content entity's moderation state. | 2 | |||
| ModerationStateFieldItemListTest | class | Drupal\Tests\content_moderation\Kernel | core/ |
@coversDefaultClass \Drupal\content_moderation\Plugin\Field\ModerationStateFieldItemList[[api-linebreak]] | ||||
| ModerationStateFilter | class | Drupal\content_moderation\Plugin\views\filter | core/ |
Provides a filter for the moderation state of an entity. | ||||
| ModerationStateJoinViewsHandlerTrait | trait | Drupal\content_moderation\Plugin\views | core/ |
Assist views handler plugins to join to the content_moderation_state entity. | 3 | |||
| ModerationStateNodeTest | class | Drupal\Tests\content_moderation\Functional | core/ |
Tests general content moderation workflow for nodes. | ||||
| ModerationStateNodeTypeTest | class | Drupal\Tests\content_moderation\Functional | core/ |
Tests moderation state node type integration. | ||||
| ModerationStateSort | class | Drupal\content_moderation\Plugin\views\sort | core/ |
Enables sorting for the computed moderation_state field. | ||||
| ModerationStateTestBase | abstract class | Drupal\Tests\content_moderation\Functional | core/ |
Defines a base class for moderation state tests. | 8 | |||
| ModerationStateWidget | class | Drupal\content_moderation\Plugin\Field\FieldWidget | core/ |
Plugin implementation of the 'moderation_state_default' widget. | 1 | |||
| ModerationStateWidgetTest | class | Drupal\Tests\content_moderation\Kernel | core/ |
@coversDefaultClass \Drupal\content_moderation\Plugin\Field\FieldWidget\ModerationStateWidget[[api-linebreak]] @group content_moderation |
Pagination
- Previous page
- Page 116
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.