Classes, traits, and interfaces - 9.5.x - 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 1523

Name Deprecated Object type Namespace File name Summary Direct uses Use statements Strings
CKEditor5PluginElementsSubsetInterface interface Drupal\ckeditor5\Plugin core/modules/ckeditor5/src/Plugin/CKEditor5PluginElementsSubsetInterface.php Defines an interface for plugins that can support an elements subset. 7 10
CKEditor5PluginInterface interface Drupal\ckeditor5\Plugin core/modules/ckeditor5/src/Plugin/CKEditor5PluginInterface.php Defines an interface for CKEditor 5 plugins. 2
CKEditor5PluginManager class Drupal\ckeditor5\Plugin core/modules/ckeditor5/src/Plugin/CKEditor5PluginManager.php Provides a CKEditor 5 plugin manager. 2
CKEditor5PluginManagerInterface interface Drupal\ckeditor5\Plugin core/modules/ckeditor5/src/Plugin/CKEditor5PluginManagerInterface.php Provides the interface for a plugin manager of CKEditor 5 plugins. 1 4
CKEditor5PluginManagerTest class Drupal\Tests\ckeditor5\Kernel core/modules/ckeditor5/tests/src/Kernel/CKEditor5PluginManagerTest.php Tests different ways of enabling CKEditor 5 plugins.
CKEditor5QuickEditLibraryTest class Drupal\Tests\quickedit\Functional\CKEditor5 core/modules/quickedit/tests/src/Functional/CKEditor5/CKEditor5QuickEditLibraryTest.php Tests that a Quick Edit specific library loads when Quick Edit is enabled.
CKEditor5StylesheetsMessage final class Drupal\ckeditor5 core/modules/ckeditor5/src/CKEditor5StylesheetsMessage.php Messaging for themes using the ckeditor_stylesheets setting. 1 2
CKEditor5StylesheetsTest class Drupal\Tests\ckeditor5\Kernel core/modules/ckeditor5/tests/src/Kernel/CKEditor5StylesheetsTest.php Test the ckeditor5-stylesheets theme config property.
CKEditor5Test class Drupal\Tests\ckeditor5\Unit core/modules/ckeditor5/tests/src/Unit/CKEditor5Test.php @coversDefaultClass \Drupal\ckeditor5\Plugin\Editor\CKEditor5 @group ckeditor5 @internal
CKEditor5Test class Drupal\Tests\ckeditor5\FunctionalJavascript core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5Test.php Tests for CKEditor 5.
CKEditor5TestBase abstract class Drupal\Tests\ckeditor5\FunctionalJavascript core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5TestBase.php Base class for testing CKEditor 5. 13
CKEditor5TestTrait trait Drupal\Tests\ckeditor5\Traits core/modules/ckeditor5/tests/src/Traits/CKEditor5TestTrait.php Provides methods to test CKEditor 5. 11
CKEditor5ToolbarTest class Drupal\Tests\ckeditor5\FunctionalJavascript core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5ToolbarTest.php Tests for CKEditor 5 editor UI with Toolbar module.
CKEditor5UpdateAlignmentTest class Drupal\Tests\ckeditor5\Functional\Update core/modules/ckeditor5/tests/src/Functional/Update/CKEditor5UpdateAlignmentTest.php Tests the update path for CKEditor 5 alignment.
CKEditor5UpdateImageToolbarItemTest class Drupal\Tests\ckeditor5\Functional\Update core/modules/ckeditor5/tests/src/Functional/Update/CKEditor5UpdateImageToolbarItemTest.php Tests the update path for the CKEditor 5 image toolbar item.
CKEditor5ValidationTestTrait trait Drupal\Tests\ckeditor5\Kernel core/modules/ckeditor5/tests/src/Kernel/CKEditor5ValidationTestTrait.php Defines a trait for testing CKEditor 5 validity.
CKEditorAdminSortTrait trait Drupal\Tests\ckeditor\Traits core/modules/ckeditor/tests/src/Traits/CKEditorAdminSortTrait.php Provides callback for simulated CKEditor toolbar configuration change. 1
CKEditorAdminTest class Drupal\Tests\ckeditor\Functional core/modules/ckeditor/tests/src/Functional/CKEditorAdminTest.php Tests administration of CKEditor.
CKEditorIntegrationTest class Drupal\Tests\ckeditor\FunctionalJavascript core/modules/ckeditor/tests/src/FunctionalJavascript/CKEditorIntegrationTest.php Tests the integration of CKEditor.
CKEditorLoadingTest class Drupal\Tests\ckeditor\Functional core/modules/ckeditor/tests/src/Functional/CKEditorLoadingTest.php Tests loading of CKEditor.
CkeditorOffCanvasTestController class Drupal\ckeditor_test core/modules/ckeditor/tests/modules/src/CkeditorOffCanvasTestController.php Provides controller for testing CKEditor in off-canvas dialogs.
CKEditorPlugin class Drupal\ckeditor\Annotation core/modules/ckeditor/src/Annotation/CKEditorPlugin.php Defines a CKEditorPlugin annotation object.
CKEditorPluginBase abstract class Drupal\ckeditor core/modules/ckeditor/src/CKEditorPluginBase.php Defines a base CKEditor plugin implementation. 6 6
CKEditorPluginButtonsInterface interface Drupal\ckeditor core/modules/ckeditor/src/CKEditorPluginButtonsInterface.php Defines an interface for CKEditor plugins with buttons. 4 4
CKEditorPluginConfigurableInterface interface Drupal\ckeditor core/modules/ckeditor/src/CKEditorPluginConfigurableInterface.php Defines an interface for configurable CKEditor plugins. 4 5
CKEditorPluginContextualInterface interface Drupal\ckeditor core/modules/ckeditor/src/CKEditorPluginContextualInterface.php Defines an interface for contextually enabled CKEditor plugins. 5 6
CKEditorPluginCssInterface interface Drupal\ckeditor core/modules/ckeditor/src/CKEditorPluginCssInterface.php Defines an interface for CKEditor plugins with associated CSS. 4 4
CKEditorPluginInterface interface Drupal\ckeditor core/modules/ckeditor/src/CKEditorPluginInterface.php Defines an interface for (loading of) CKEditor plugins. 7 2
CKEditorPluginManager class Drupal\ckeditor core/modules/ckeditor/src/CKEditorPluginManager.php Provides a CKEditor Plugin plugin manager. 3 2
CKEditorPluginManagerTest class Drupal\Tests\ckeditor\Unit core/modules/ckeditor/tests/src/Unit/CKEditorPluginManagerTest.php @coversDefaultClass \Drupal\ckeditor\CKEditorPluginManager
CKEditorPluginManagerTest class Drupal\Tests\ckeditor\Kernel core/modules/ckeditor/tests/src/Kernel/CKEditorPluginManagerTest.php Tests different ways of enabling CKEditor plugins.
CKEditorStylesComboAdminTest class Drupal\Tests\ckeditor\Functional core/modules/ckeditor/tests/src/Functional/CKEditorStylesComboAdminTest.php Tests administration of the CKEditor StylesCombo plugin.
CKEditorStylesComboTranslationTest class Drupal\Tests\ckeditor\Functional core/modules/ckeditor/tests/src/Functional/CKEditorStylesComboTranslationTest.php Tests administration of the CKEditor StylesCombo plugin.
CKEditorStylesheetsWarningTest class Drupal\Tests\ckeditor5\FunctionalJavascript core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditorStylesheetsWarningTest.php Tests warnings when ckeditor_stylesheets do not have CKEditor 5 equivalents.
CKEditorTest class Drupal\Tests\ckeditor\Kernel core/modules/ckeditor/tests/src/Kernel/CKEditorTest.php Tests for the 'CKEditor' text editor plugin.
CKEditorTestTrait trait Drupal\Tests\ckeditor\Traits core/modules/ckeditor/tests/src/Traits/CKEditorTestTrait.php Provides methods to test CKEditor. 3
CKEditorToolbarButtonTest class Drupal\Tests\ckeditor\Functional core/modules/ckeditor/tests/src/Functional/CKEditorToolbarButtonTest.php Tests CKEditor toolbar buttons when the language direction is RTL.
CKEditorUpdateOmitDisabledPluginSettings class Drupal\Tests\ckeditor\Functional\Update core/modules/ckeditor/tests/src/Functional/Update/CKEditorUpdateOmitDisabledPluginSettings.php Tests the update path for CKEditor plugin settings for disabled plugins.
ClaroBlockFilterTest class Drupal\FunctionalJavascriptTests\Theme core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroBlockFilterTest.php Runs BlockFilterTest in Claro.
ClaroEntityDisplayTest class Drupal\FunctionalJavascriptTests\Theme core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroEntityDisplayTest.php Runs EntityDisplayTest in Claro.
ClaroLayoutBuilderTest class Drupal\FunctionalTests\Theme core/tests/Drupal/FunctionalTests/Theme/ClaroLayoutBuilderTest.php Tests the layout builder with the Claro theme.
ClaroMenuUiJavascriptTest class Drupal\FunctionalJavascriptTests\Theme core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroMenuUiJavascriptTest.php Runs MenuUiJavascriptTest in Claro.
ClaroPasswordConfirmWidgetTest class Drupal\FunctionalJavascriptTests\Theme core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroPasswordConfirmWidgetTest.php Tests the password confirm widget with Claro theme.
ClaroPreRender class Drupal\claro core/themes/claro/src/ClaroPreRender.php Implements trusted prerender callbacks for the Claro theme. 2
ClaroTableDragTest class Drupal\FunctionalJavascriptTests\Theme core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroTableDragTest.php Tests draggable tables with Claro theme.
ClaroTest class Drupal\FunctionalTests\Theme core/tests/Drupal/FunctionalTests/Theme/ClaroTest.php Tests the Claro theme.
ClaroVerticalTabsTest class Drupal\KernelTests\Core\Theme core/tests/Drupal/KernelTests/Core/Theme/ClaroVerticalTabsTest.php Confirms that Claro can render vertical tabs correctly.
ClaroViewsUiTest class Drupal\FunctionalJavascriptTests\Theme core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroViewsUiTest.php Runs tests on Views UI using Claro.
ClassFinder class Drupal\Component\ClassFinder core/lib/Drupal/Component/ClassFinder/ClassFinder.php A Utility class that uses active autoloaders to find a file for a class. 2
ClassFinderInterface interface Drupal\Component\ClassFinder core/lib/Drupal/Component/ClassFinder/ClassFinderInterface.php Finds a class in a PSR-0 structure. 2 1

Other projects


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