Classes, traits, and interfaces - 11.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 1518

Name Deprecated Object type Namespace File name Summary Direct uses Use statements Strings
CKEditor4To5UpgradePluginManager class Drupal\ckeditor5\Plugin core/modules/ckeditor5/src/Plugin/CKEditor4To5UpgradePluginManager.php Provides a CKEditor 4 to 5 upgrade plugin manager.
CKEditor5 class Drupal\ckeditor5\Plugin\Editor core/modules/ckeditor5/src/Plugin/Editor/CKEditor5.php Defines a CKEditor 5-based text editor for Drupal. 25
CKEditor5AllowedTagsTest class Drupal\Tests\ckeditor5\FunctionalJavascript core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5AllowedTagsTest.php Tests for CKEditor 5.
CKEditor5AspectsOfCKEditor5Plugin class Drupal\ckeditor5\Annotation core/modules/ckeditor5/src/Annotation/CKEditor5AspectsOfCKEditor5Plugin.php Defines the "CKEditor 5 aspects of a CKEditor5Plugin" annotation object. 1
CKEditor5AspectsOfCKEditor5Plugin class Drupal\ckeditor5\Attribute core/modules/ckeditor5/src/Attribute/CKEditor5AspectsOfCKEditor5Plugin.php
CKEditor5CacheTag class Drupal\ckeditor5\EventSubscriber core/modules/ckeditor5/src/EventSubscriber/CKEditor5CacheTag.php A subscriber invalidating cache tags when the default theme changes. 2
CKEditor5DialogTest class Drupal\Tests\ckeditor5\FunctionalJavascript core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5DialogTest.php Tests for CKEditor 5 to ensure correct focus management in dialogs.
CKEditor5DialogTestController class Drupal\ckeditor5_test\Controller core/modules/ckeditor5/tests/modules/ckeditor5_test/src/Controller/CKEditor5DialogTestController.php Provides controller for testing CKEditor in off-canvas dialogs.
CKEditor5ElementConstraint class Drupal\ckeditor5\Plugin\Validation\Constraint core/modules/ckeditor5/src/Plugin/Validation/Constraint/CKEditor5ElementConstraint.php CKEditor 5 element.
CKEditor5ElementConstraintValidator class Drupal\ckeditor5\Plugin\Validation\Constraint core/modules/ckeditor5/src/Plugin/Validation/Constraint/CKEditor5ElementConstraintValidator.php CKEditor 5 element validator.
CKEditor5FragmentLinkTest class Drupal\Tests\ckeditor5\FunctionalJavascript core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5FragmentLinkTest.php Tests that the fragment link points to CKEditor 5.
Ckeditor5Hooks class Drupal\ckeditor5\Hook core/modules/ckeditor5/src/Hook/Ckeditor5Hooks.php Hook implementations for ckeditor5.
CKEditor5ImageController class Drupal\ckeditor5\Controller core/modules/ckeditor5/src/Controller/CKEditor5ImageController.php Returns response for CKEditor 5 Simple image upload adapter.
CKEditor5MarkupTest class Drupal\Tests\ckeditor5\FunctionalJavascript core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5MarkupTest.php Tests for CKEditor 5.
CKEditor5MediaAndFilterSettingsInSyncConstraint class Drupal\ckeditor5\Plugin\Validation\Constraint core/modules/ckeditor5/src/Plugin/Validation/Constraint/CKEditor5MediaAndFilterSettingsInSyncConstraint.php Ensure CKEditor 5 media plugin's and media filter's settings are in sync.
CKEditor5MediaAndFilterSettingsInSyncConstraintValidator class Drupal\ckeditor5\Plugin\Validation\Constraint core/modules/ckeditor5/src/Plugin/Validation/Constraint/CKEditor5MediaAndFilterSettingsInSyncConstraintValidator.php CKEditor 5 Media plugin in sync with the filter settings validator.
CKEditor5MediaController class Drupal\ckeditor5\Controller core/modules/ckeditor5/src/Controller/CKEditor5MediaController.php Provides an API for checking if a media entity has image field.
CKEditor5OffCanvasTest class Drupal\Tests\ckeditor5\FunctionalJavascript core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5OffCanvasTest.php Tests for CKEditor 5 to ensure correct styling in off-canvas.
CKEditor5OffCanvasTestController class Drupal\ckeditor5_test\Controller core/modules/ckeditor5/tests/modules/ckeditor5_test/src/Controller/CKEditor5OffCanvasTestController.php Provides controller for testing CKEditor in off-canvas dialogs.
CKEditor5Plugin class Drupal\ckeditor5\Annotation core/modules/ckeditor5/src/Annotation/CKEditor5Plugin.php Defines a CKEditor5Plugin annotation object. 1
CKEditor5Plugin class Drupal\ckeditor5\Attribute core/modules/ckeditor5/src/Attribute/CKEditor5Plugin.php The CKEditor5Plugin attribute. 1
CKEditor5PluginConfigurableInterface interface Drupal\ckeditor5\Plugin core/modules/ckeditor5/src/Plugin/CKEditor5PluginConfigurableInterface.php Defines an interface for configurable CKEditor 5 plugins. 11 10
CKEditor5PluginConfigurableTrait trait Drupal\ckeditor5\Plugin core/modules/ckeditor5/src/Plugin/CKEditor5PluginConfigurableTrait.php Provides a trait for configurable CKEditor 5 plugins. 11
CKEditor5PluginDefault class Drupal\ckeditor5\Plugin core/modules/ckeditor5/src/Plugin/CKEditor5PluginDefault.php Defines the default CKEditor 5 plugin implementation. 13 15
CKEditor5PluginDefinition final class Drupal\ckeditor5\Plugin core/modules/ckeditor5/src/Plugin/CKEditor5PluginDefinition.php Provides an implementation of a CKEditor 5 plugin definition. 20
CKEditor5PluginElementsSubsetInterface interface Drupal\ckeditor5\Plugin core/modules/ckeditor5/src/Plugin/CKEditor5PluginElementsSubsetInterface.php Defines an interface for plugins that can support an elements subset. 7 8
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 7
CKEditor5PluginManagerTest class Drupal\Tests\ckeditor5\Kernel core/modules/ckeditor5/tests/src/Kernel/CKEditor5PluginManagerTest.php Tests different ways of enabling CKEditor 5 plugins.
Ckeditor5ReadOnlyModeHooks class Drupal\ckeditor5_read_only_mode\Hook core/modules/ckeditor5/tests/modules/ckeditor5_read_only_mode/src/Hook/Ckeditor5ReadOnlyModeHooks.php Hook implementations for ckeditor5_read_only_mode.
CKEditor5ReadOnlyModeTest class Drupal\Tests\ckeditor5\FunctionalJavascript core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5ReadOnlyModeTest.php Tests read-only mode for CKEditor 5.
CKEditor5StylesheetsMessage final class Drupal\ckeditor5 core/modules/ckeditor5/src/CKEditor5StylesheetsMessage.php Messaging for themes using the ckeditor_stylesheets setting.
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
Ckeditor5TestModuleAllowedImageHooks class Drupal\ckeditor5_test_module_allowed_image\Hook core/modules/ckeditor5/tests/modules/ckeditor5_test_module_allowed_image/src/Hook/Ckeditor5TestModuleAllowedImageHooks.php Hook implementations for ckeditor5_test_module_allowed_image.
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.
CKEditor5UpdateCodeBlockConfigurationTest class Drupal\Tests\ckeditor5\Functional\Update core/modules/ckeditor5/tests/src/Functional/Update/CKEditor5UpdateCodeBlockConfigurationTest.php @covers ckeditor5_post_update_code_block @group Update @group ckeditor5
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.
CKEditor5UpdateListMultiBlockTest class Drupal\Tests\ckeditor5\Functional\Update core/modules/ckeditor5/tests/src/Functional/Update/CKEditor5UpdateListMultiBlockTest.php @covers ckeditor5_post_update_list_multiblock @group Update @group ckeditor5
CKEditor5UpdateOlStartReversed class Drupal\Tests\ckeditor5\Functional\Update core/modules/ckeditor5/tests/src/Functional/Update/CKEditor5UpdateOlStartReversed.php @covers ckeditor5_post_update_list_start_reversed @group Update @group ckeditor5
CKEditor5UpdatePluginSettingsSortTest class Drupal\Tests\ckeditor5\Functional\Update core/modules/ckeditor5/tests/src/Functional/Update/CKEditor5UpdatePluginSettingsSortTest.php @covers ckeditor5_post_update_plugins_settings_export_order @group Update @group ckeditor5
CKEditor5ValidationTestTrait trait Drupal\Tests\ckeditor5\Kernel core/modules/ckeditor5/tests/src/Kernel/CKEditor5ValidationTestTrait.php Defines a trait for testing CKEditor 5 validity.
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.
CkeditorTestHooks class Drupal\ckeditor_test\Hook core/modules/ckeditor5/tests/modules/ckeditor_test/src/Hook/CkeditorTestHooks.php Hook implementations for ckeditor_test.
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.

Other projects


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