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 |
|---|---|---|---|---|---|---|---|
| ChooseBlockController | class |
Drupal\ |
core/ |
Defines a controller to choose a new block. | |||
| ChooseSectionController | class |
Drupal\ |
core/ |
Defines a controller to choose a new section. | |||
| CKEditor | class |
Drupal\ |
core/ |
Defines a CKEditor-based text editor for Drupal. | |||
| CKEditorAdminSortTrait | trait |
Drupal\ |
core/ |
Provides callback for simulated CKEditor toolbar configuration change. | 1 | ||
| CKEditorAdminTest | class |
Drupal\ |
core/ |
Tests administration of CKEditor. | |||
| CKEditorIntegrationTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\media_library\Plugin\CKEditorPlugin\DrupalMediaLibrary @group media_library | |||
| CKEditorIntegrationTest | class |
Drupal\ |
core/ |
Tests the integration of CKEditor. | |||
| CKEditorIntegrationTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\media\Plugin\CKEditorPlugin\DrupalMedia @group media | |||
| CKEditorLoadingTest | class |
Drupal\ |
core/ |
Tests loading of CKEditor. | |||
| CkeditorOffCanvasTestController | class |
Drupal\ |
core/ |
Provides controller for testing CKEditor in off-canvas dialogs. | |||
| CKEditorPlugin | class |
Drupal\ |
core/ |
Defines a CKEditorPlugin annotation object. | |||
| CKEditorPluginBase | abstract class |
Drupal\ |
core/ |
Defines a base CKEditor plugin implementation. | 6 | 6 | |
| CKEditorPluginButtonsInterface | interface |
Drupal\ |
core/ |
Defines an interface for CKEditor plugins with buttons. | 4 | 3 | |
| CKEditorPluginConfigurableInterface | interface |
Drupal\ |
core/ |
Defines an interface for configurable CKEditor plugins. | 4 | 4 | |
| CKEditorPluginContextualInterface | interface |
Drupal\ |
core/ |
Defines an interface for contextually enabled CKEditor plugins. | 4 | 4 | |
| CKEditorPluginCssInterface | interface |
Drupal\ |
core/ |
Defines an interface for CKEditor plugins with associated CSS. | 3 | 3 | |
| CKEditorPluginInterface | interface |
Drupal\ |
core/ |
Defines an interface for (loading of) CKEditor plugins. | 5 | ||
| CKEditorPluginManager | class |
Drupal\ |
core/ |
Provides a CKEditor Plugin plugin manager. | 3 | 2 | |
| CKEditorPluginManagerTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\ckeditor\CKEditorPluginManager | |||
| CKEditorPluginManagerTest | class |
Drupal\ |
core/ |
Tests different ways of enabling CKEditor plugins. | |||
| CKEditorStylesComboAdminTest | class |
Drupal\ |
core/ |
Tests administration of the CKEditor StylesCombo plugin. | |||
| CKEditorStylesComboTranslationTest | class |
Drupal\ |
core/ |
Tests administration of the CKEditor StylesCombo plugin. | |||
| CKEditorTest | class |
Drupal\ |
core/ |
Tests for the 'CKEditor' text editor plugin. | |||
| CKEditorTestTrait | trait |
Drupal\ |
core/ |
Provides methods to test CKEditor. | 3 | ||
| CKEditorToolbarButtonTest | class |
Drupal\ |
core/ |
Tests CKEditor toolbar buttons when the language direction is RTL. | |||
| ClaroBlockFilterTest | class |
Drupal\ |
core/ |
Runs BlockFilterTest in Claro. | |||
| ClaroEntityDisplayTest | class |
Drupal\ |
core/ |
Runs EntityDisplayTest in Claro. | |||
| ClaroLayoutBuilderTest | class |
Drupal\ |
core/ |
Tests the layout builder with the Claro theme. | |||
| ClaroMenuUiJavascriptTest | class |
Drupal\ |
core/ |
Runs MenuUiJavascriptTest in Claro. | |||
| ClaroPasswordConfirmWidgetTest | class |
Drupal\ |
core/ |
Tests the password confirm widget with Claro theme. | |||
| ClaroPreRender | class |
Drupal\ |
core/ |
Implements trusted prerender callbacks for the Claro theme. | 2 | ||
| ClaroTableDragTest | class |
Drupal\ |
core/ |
Tests draggable tables with Claro theme. | |||
| ClaroTest | class |
Drupal\ |
core/ |
Tests the Claro theme. | |||
| ClaroVerticalTabsTest | class |
Drupal\ |
core/ |
Confirms that Claro can render vertical tabs correctly. | |||
| ClaroViewsUiTest | class |
Drupal\ |
core/ |
Runs tests on Views UI using Claro. | |||
| ClassFinder | class |
Drupal\ |
core/ |
A Utility class that uses active autoloaders to find a file for a class. | 2 | ||
| ClassFinderInterface | interface |
Drupal\ |
core/ |
Finds a class in a PSR-0 structure. | 2 | 1 | |
| ClassFinderTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\Component\ClassFinder\ClassFinder @group ClassFinder | |||
| ClassLoaderTest | class |
Drupal\ |
core/ |
Tests class loading for modules. | |||
| ClassRequiresAvailable | class |
Drupal\ |
core/ |
@requires externalCommand available_command | |||
| ClassRequiresUnavailable | class |
Drupal\ |
core/ |
@requires externalCommand unavailable_command | |||
| ClassResolver | class |
Drupal\ |
core/ |
Implements the class resolver interface supporting class names and services. | 2 | 2 | |
| ClassResolverInterface | interface |
Drupal\ |
core/ |
Provides an interface to get an instance of a class with dependency injection. | 1 | 19 | |
| ClassWithConstants | class |
Drupal\ |
core/ |
1 | |||
| ClassWithInvalidAnnotationTargetAtClass | class |
Drupal\ |
core/ |
Plugin annotation @AnnotationTargetPropertyMethod("Some data"); | |||
| ClassWithInvalidAnnotationTargetAtMethod | class |
Drupal\ |
core/ |
Plugin annotation @AnnotationTargetClass("Some data"); | |||
| ClassWithInvalidAnnotationTargetAtProperty | class |
Drupal\ |
core/ |
Plugin annotation @AnnotationTargetClass("Some data"); | |||
| ClassWithValidAnnotationTarget | class |
Drupal\ |
core/ |
Plugin annotation @AnnotationTargetClass("Some data"); | |||
| ClassWriter | final class |
Drupal\ |
core/ |
Helper class to rewrite PHPUnit's TestCase class. | 2 | ||
| ClassyPreprocessUnchangedTest | class |
Drupal\ |
core/ |
Confirms that classy.theme has not added new functionality. |