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 |
|---|---|---|---|---|---|---|---|
| BlockViewBuilderTest | class |
Drupal\ |
core/ |
Tests the block view builder. | |||
| BlockVisibility | class |
Drupal\ |
core/ |
Plugin annotation @MigrateProcessPlugin( id = "block_visibility" ) | 1 | ||
| BlockVisibilityTest | class |
Drupal\ |
core/ |
Tests the block_visibility process plugin. | |||
| BlockXmlAnonTest | class |
Drupal\ |
core/ |
@group rest | |||
| BlockXmlBasicAuthTest | class |
Drupal\ |
core/ |
@group rest | |||
| BlockXmlCookieTest | class |
Drupal\ |
core/ |
@group rest | |||
| BlockXssTest | class |
Drupal\ |
core/ |
Tests that the block module properly escapes block descriptions. | |||
| Book | class |
Drupal\ |
core/ |
Drupal 6/7 book source from database. | |||
| Book | class |
Drupal\ |
core/ |
Plugin annotation @MigrateDestination( id = "book", provider = "book" ) | |||
| BookAdminEditForm | class |
Drupal\ |
core/ |
Provides a form for administering a single book's hierarchy. | 1 | ||
| BookBreadcrumbBuilder | class |
Drupal\ |
core/ |
Provides a breadcrumb builder for nodes in a book. | 2 | ||
| BookBreadcrumbTest | class |
Drupal\ |
core/ |
Create a book, add pages, and test book interface. | |||
| BookContentModerationTest | class |
Drupal\ |
core/ |
Tests Book and Content Moderation integration. | |||
| BookController | class |
Drupal\ |
core/ |
Controller routines for book routes. | |||
| BookExport | class |
Drupal\ |
core/ |
Provides methods for exporting book to different formats. | 1 | 2 | |
| BookInstallTest | class |
Drupal\ |
core/ |
Test installation of Book module. | |||
| BookJavascriptTest | class |
Drupal\ |
core/ |
Tests Book javascript functionality. | |||
| BookLocalTasksTest | class |
Drupal\ |
core/ |
Tests existence of book local tasks. | |||
| BookManager | class |
Drupal\ |
core/ |
Defines a book manager. | 4 | 2 | |
| BookManagerDeprecationTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\book\BookManager @group legacy | |||
| BookManagerInterface | interface |
Drupal\ |
core/ |
Provides an interface defining a book manager. | 1 | 7 | |
| BookManagerTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\book\BookManager @group book | |||
| BookMultilingualTest | class |
Drupal\ |
core/ |
Tests multilingual books. | |||
| BookNavigationBlock | class |
Drupal\ |
core/ |
Provides a 'Book navigation' block. | |||
| BookNavigationCacheContext | class |
Drupal\ |
core/ |
Defines the book navigation cache context service. | 1 | 2 | |
| BookNodeIsRemovableAccessCheck | class |
Drupal\ |
core/ |
Determines whether the requested node can be removed from its book. | 2 | ||
| BookOutline | class |
Drupal\ |
core/ |
Provides handling to render the book outline. | 2 | ||
| BookOutlineConstraint | class |
Drupal\ |
core/ |
Validation constraint for changing the book outline in pending revisions. | |||
| BookOutlineConstraintValidator | class |
Drupal\ |
core/ |
Constraint validator for changing the book outline in pending revisions. | |||
| BookOutlineForm | class |
Drupal\ |
core/ |
Displays the book outline form. | |||
| BookOutlineStorage | class |
Drupal\ |
core/ |
Defines a storage class for books outline. | 2 | ||
| BookOutlineStorageInterface | interface |
Drupal\ |
core/ |
Defines a common interface for book outline storage classes. | 1 | ||
| BookPendingRevisionTest | class |
Drupal\ |
core/ |
Tests that the Book module handles pending revisions correctly. | |||
| BookRelationshipTest | class |
Drupal\ |
core/ |
Tests entity reference relationship data. | |||
| BookRemoveForm | class |
Drupal\ |
core/ |
Remove form for book module. | 1 | ||
| BookSettingsForm | class |
Drupal\ |
core/ |
Configure book settings for this site. | 1 | ||
| BookTest | class |
Drupal\ |
core/ |
Create a book, add pages, and test book interface. | |||
| BookTest | class |
Drupal\ |
core/ |
@covers \Drupal\book\Plugin\migrate\source\Book @group book | |||
| BookTestTrait | trait |
Drupal\ |
core/ |
Provides common functionality for Book test classes. | |||
| BookUninstallTest | class |
Drupal\ |
core/ |
Tests that the Book module cannot be uninstalled if books exist. | |||
| BookUninstallValidator | class |
Drupal\ |
core/ |
Prevents book module from being uninstalled whilst any book nodes exist or there are any book outline stored. | 2 | ||
| BookUninstallValidator | class |
Drupal\ |
core/ |
Provides a proxy class for \Drupal\book\BookUninstallValidator. | |||
| BookUninstallValidatorTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\book\BookUninstallValidator @group book | |||
| Boolean | class |
Drupal\ |
core/ |
A handler to provide proper displays for booleans. | |||
| BooleanCheckboxWidget | class |
Drupal\ |
core/ |
Plugin implementation of the 'boolean_checkbox' widget. | |||
| BooleanData | class |
Drupal\ |
core/ |
The boolean data type. | 4 | 1 | |
| BooleanFieldTest | class |
Drupal\ |
core/ |
Tests boolean field functionality. | |||
| BooleanFormatter | class |
Drupal\ |
core/ |
Plugin implementation of the 'boolean' formatter. | |||
| BooleanFormatterSettingsTest | class |
Drupal\ |
core/ |
Tests the Boolean field formatter settings. | |||
| BooleanFormatterSettingsTest | class |
Drupal\ |
core/ |
Tests the Boolean field formatter settings. |