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 |
|---|---|---|---|---|---|---|---|
| BlockContent | class |
Drupal\ |
core/ |
Defines the custom block entity class. | 34 | ||
| BlockContent | class |
Drupal\ |
core/ |
Retrieves block plugin definitions for all custom blocks. | |||
| BlockContent | class |
Drupal\ |
core/ |
Used for creating 'block_content' views with the wizard. | |||
| BlockContentAccessControlHandler | class |
Drupal\ |
core/ |
Defines the access control handler for the custom block entity type. | 1 | ||
| BlockContentAccessHandlerTest | class |
Drupal\ |
core/ |
Tests the block content entity access handler. | |||
| BlockContentAddLocalAction | class |
Drupal\ |
core/ |
Modifies the 'Add custom block' local action. | 1 | ||
| BlockContentBlock | class |
Drupal\ |
core/ |
Defines a generic custom block type. | |||
| BlockContentCacheTagsTest | class |
Drupal\ |
core/ |
Tests the Custom Block entity's cache tags. | |||
| BlockContentContextualLinksTest | class |
Drupal\ |
core/ |
Tests views contextual links on block content. | |||
| BlockContentController | class |
Drupal\ |
core/ |
||||
| BlockContentCreationTest | class |
Drupal\ |
core/ |
Create a block and test saving it. | |||
| BlockContentDeleteForm | class |
Drupal\ |
core/ |
Provides a confirmation form for deleting a custom block entity. | |||
| BlockContentDeletionTest | class |
Drupal\ |
core/ |
Tests that deleting a block clears the cached definitions. | |||
| BlockContentDeriverTest | class |
Drupal\ |
core/ |
Tests block content plugin deriver. | |||
| BlockContentEntityReferenceSelectionTest | class |
Drupal\ |
core/ |
Tests EntityReference selection handlers don't return non-reusable blocks. | |||
| BlockContentEvents | final class |
Drupal\ |
core/ |
Defines events for the block_content module. | 1 | ||
| BlockContentFieldFilterTest | class |
Drupal\ |
core/ |
Tests block_content field filters with translations. | |||
| BlockContentForm | class |
Drupal\ |
core/ |
Form handler for the custom block edit forms. | |||
| BlockContentGetDependencyEvent | class |
Drupal\ |
core/ |
Block content event to allow setting an access dependency. | 2 | ||
| BlockContentHalJsonAnonTest | class |
Drupal\ |
core/ |
@group hal | 2 | ||
| BlockContentHalJsonBasicAuthTest | class |
Drupal\ |
core/ |
@group hal | |||
| BlockContentHalJsonCookieTest | class |
Drupal\ |
core/ |
@group hal | |||
| BlockContentIntegrationTest | class |
Drupal\ |
core/ |
Tests the block_content integration into views. | |||
| BlockContentInterface | interface |
Drupal\ |
core/ |
Provides an interface defining a custom block entity. | 1 | 4 | |
| BlockContentJsonAnonTest | class |
Drupal\ |
core/ |
@group rest | |||
| BlockContentJsonBasicAuthTest | class |
Drupal\ |
core/ |
@group rest | |||
| BlockContentJsonCookieTest | class |
Drupal\ |
core/ |
@group rest | |||
| BlockContentListBuilder | class |
Drupal\ |
core/ |
Defines a class to build a listing of custom block entities. | |||
| BlockContentListTest | class |
Drupal\ |
core/ |
Tests the listing of custom blocks. | |||
| BlockContentListViewsTest | class |
Drupal\ |
core/ |
Tests the Views-powered listing of custom blocks. | |||
| BlockContentLocalTasksTest | class |
Drupal\ |
core/ |
Tests existence of block_content local tasks. | |||
| BlockContentModerationHandler | class |
Drupal\ |
core/ |
Customizations for block content entities. | 1 | ||
| BlockContentPageViewTest | class |
Drupal\ |
core/ |
Create a block and test block access by attempting to view the block. | |||
| BlockContentRedirectTest | class |
Drupal\ |
core/ |
Tests the redirect destination on block content on entity operations. | |||
| BlockContentResourceTestBase | abstract class |
Drupal\ |
core/ |
ResourceTestBase for BlockContent entity. | 7 | 1 | |
| BlockContentRevisionsTest | class |
Drupal\ |
core/ |
Create a block with revisions. | |||
| BlockContentSaveTest | class |
Drupal\ |
core/ |
Tests $block_content->save() for saving content. | |||
| BlockContentTest | class |
Drupal\ |
core/ |
JSON:API integration test for the "BlockContent" content entity type. | |||
| BlockContentTestBase | abstract class |
Drupal\ |
core/ |
Sets up block content types. | 11 | 1 | |
| BlockContentTestBase | abstract class |
Drupal\ |
core/ |
Base class for all block_content tests. | 4 | ||
| BlockContentTranslationHandler | class |
Drupal\ |
core/ |
Defines the translation handler for custom blocks. | |||
| BlockContentTranslationUITest | class |
Drupal\ |
core/ |
Tests the block content translation UI. | |||
| BlockContentType | class |
Drupal\ |
core/ |
Defines the custom block type entity. | 31 | ||
| BlockContentTypeDeleteForm | class |
Drupal\ |
core/ |
Provides a confirmation form for deleting a custom block type entity. | |||
| BlockContentTypeForm | class |
Drupal\ |
core/ |
The block content type entity form. | |||
| BlockContentTypeHalJsonAnonTest | class |
Drupal\ |
core/ |
@group hal | |||
| BlockContentTypeHalJsonBasicAuthTest | class |
Drupal\ |
core/ |
@group hal | |||
| BlockContentTypeHalJsonCookieTest | class |
Drupal\ |
core/ |
@group hal | |||
| BlockContentTypeInterface | interface |
Drupal\ |
core/ |
Provides an interface defining a custom block type entity. | 1 | 3 | |
| BlockContentTypeJsonAnonTest | class |
Drupal\ |
core/ |
@group rest |