Classes, traits, and interfaces - main - 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 1529

Name Deprecated Object type Namespace File name Summary Direct uses Use statements Strings
Editor class Drupal\editor\Annotation core/modules/editor/src/Annotation/Editor.php Defines an Editor annotation object.
EditorAccessControlHandler class Drupal\editor core/modules/editor/src/EditorAccessControlHandler.php Defines the access control handler for the text editor entity type. 1
EditorAdminTest class Drupal\Tests\editor\FunctionalJavascript core/modules/editor/tests/src/FunctionalJavascript/EditorAdminTest.php Tests Editor Admin.
EditorAdminTest class Drupal\Tests\editor\Functional core/modules/editor/tests/src/Functional/EditorAdminTest.php Tests administration of text editors.
EditorBase abstract class Drupal\editor\Plugin core/modules/editor/src/Plugin/EditorBase.php Defines a base class from which other modules providing editors may extend. 3 3
EditorConfigEntityUnitTest class Drupal\Tests\editor\Unit core/modules/editor/tests/src/Unit/EditorConfigEntityUnitTest.php Tests Drupal\editor\Entity\Editor.
EditorConfigTranslationSubscriber class Drupal\editor\EventSubscriber core/modules/editor/src/EventSubscriber/EditorConfigTranslationSubscriber.php Adds configuration names to configuration mapper on POPULATE_MAPPER event. 2
EditorController class Drupal\editor core/modules/editor/src/EditorController.php Returns responses for Editor module routes.
EditorDialogSave class Drupal\editor\Ajax core/modules/editor/src/Ajax/EditorDialogSave.php Provides an AJAX command for saving the contents of an editor dialog. 1
EditorFileReference class Drupal\editor\Plugin\Filter core/modules/editor/src/Plugin/Filter/EditorFileReference.php Provides a filter to track images uploaded via a Text Editor.
EditorFileReferenceFilterTest class Drupal\Tests\editor\Kernel core/modules/editor/tests/src/Kernel/EditorFileReferenceFilterTest.php Tests Editor module's file reference filter.
EditorFileUsageTest class Drupal\Tests\editor\Kernel core/modules/editor/tests/src/Kernel/EditorFileUsageTest.php Tests tracking of file usage by the Text Editor module.
EditorFilterIntegrationTest class Drupal\Tests\editor\Kernel core/modules/editor/tests/src/Kernel/EditorFilterIntegrationTest.php Tests integration with filter module.
EditorHooks class Drupal\editor\Hook core/modules/editor/src/Hook/EditorHooks.php Hook implementations for editor. 1
EditorialContentEntityBase abstract class Drupal\Core\Entity core/lib/Drupal/Core/Entity/EditorialContentEntityBase.php Provides a base entity class with extended revision and publishing support. 5 5
EditorImageUploadSettings class Drupal\editor core/modules/editor/src/EditorImageUploadSettings.php Subform helper to configure the text editor's image upload settings. 3
EditorInterface interface Drupal\editor core/modules/editor/src/EditorInterface.php Provides an interface defining a text editor entity. 1 34
EditorJsonAnonTest class Drupal\Tests\editor\Functional\Rest core/modules/editor/tests/src/Functional/Rest/EditorJsonAnonTest.php Tests Editor Json Anon.
EditorJsonBasicAuthTest class Drupal\Tests\editor\Functional\Rest core/modules/editor/tests/src/Functional/Rest/EditorJsonBasicAuthTest.php Tests Editor Json Basic Auth.
EditorJsonCookieTest class Drupal\Tests\editor\Functional\Rest core/modules/editor/tests/src/Functional/Rest/EditorJsonCookieTest.php Tests Editor Json Cookie.
EditorLoadingTest class Drupal\Tests\editor\Functional core/modules/editor/tests/src/Functional/EditorLoadingTest.php Tests loading of text editors.
EditorManager class Drupal\editor\Plugin core/modules/editor/src/Plugin/EditorManager.php Configurable text editor manager. 1 2
EditorManagerTest class Drupal\Tests\editor\Kernel core/modules/editor/tests/src/Kernel/EditorManagerTest.php Tests detection of text editors and correct generation of attachments.
EditorPluginInterface interface Drupal\editor\Plugin core/modules/editor/src/Plugin/EditorPluginInterface.php Defines an interface for configurable text editors. 1 1
EditorPrivateFileReferenceFilterTest class Drupal\Tests\editor\Functional core/modules/editor/tests/src/Functional/EditorPrivateFileReferenceFilterTest.php Tests Editor module's file reference filter with private files.
EditorResourceTestBase abstract class Drupal\Tests\editor\Functional\Rest core/modules/editor/tests/src/Functional/Rest/EditorResourceTestBase.php Resource test base for Editor entity. 6
EditorSecurityTest class Drupal\Tests\editor\Functional core/modules/editor/tests/src/Functional/EditorSecurityTest.php Tests XSS protection for content creators when using text editors.
EditorTest class Drupal\Tests\jsonapi\Functional core/modules/jsonapi/tests/src/Functional/EditorTest.php JSON:API integration test for the "Editor" config entity type.
EditorTestHooks class Drupal\editor_test\Hook core/modules/editor/tests/modules/editor_test/src/Hook/EditorTestHooks.php Hook implementations for editor_test.
EditorTestTextLongItem class Drupal\editor_test\Plugin\Field\FieldType core/modules/editor/tests/modules/editor_test/src/Plugin/Field/FieldType/EditorTestTextLongItem.php Plugin implementation of the 'editor_test_text_long' field type.
EditorValidationTest class Drupal\Tests\editor\Kernel core/modules/editor/tests/src/Kernel/EditorValidationTest.php Tests validation of editor entities.
EditorXmlAnonTest class Drupal\Tests\editor\Functional\Rest core/modules/editor/tests/src/Functional/Rest/EditorXmlAnonTest.php Tests Editor Xml Anon.
EditorXmlBasicAuthTest class Drupal\Tests\editor\Functional\Rest core/modules/editor/tests/src/Functional/Rest/EditorXmlBasicAuthTest.php Tests Editor Xml Basic Auth.
EditorXmlCookieTest class Drupal\Tests\editor\Functional\Rest core/modules/editor/tests/src/Functional/Rest/EditorXmlCookieTest.php Tests Editor Xml Cookie.
EditorXssFilterInterface interface Drupal\editor core/modules/editor/src/EditorXssFilterInterface.php Defines an interface for text editor XSS (Cross-site scripting) filters. 2 2
Element abstract class Drupal\Core\Config\Schema core/lib/Drupal/Core/Config/Schema/Element.php Defines a generic configuration element. 3
Element class Drupal\editor core/modules/editor/src/Element.php Defines a service for Text Editor's render elements. 2
Element class Drupal\Core\Render core/lib/Drupal/Core/Render/Element.php Provides helper methods for Drupal render elements. 125
ElementInfoIntegrationTest class Drupal\KernelTests\Core\Render core/tests/Drupal/KernelTests/Core/Render/ElementInfoIntegrationTest.php Tests the element info.
ElementInfoManager class Drupal\Core\Render core/lib/Drupal/Core/Render/ElementInfoManager.php Provides a plugin manager for element plugins. 1 1 2
ElementInfoManagerInterface interface Drupal\Core\Render core/lib/Drupal/Core/Render/ElementInfoManagerInterface.php Collects available render array element types. 1 18
ElementInfoManagerTest class Drupal\Tests\Core\Render core/tests/Drupal/Tests/Core/Render/ElementInfoManagerTest.php Tests Drupal\Core\Render\ElementInfoManager.
ElementInfoTestHooks class Drupal\element_info_test\Hook core/modules/system/tests/modules/element_info_test/src/Hook/ElementInfoTestHooks.php Hook implementations for element_info_test.
ElementInfoTestNumberBuilder class Drupal\element_info_test core/modules/system/tests/modules/element_info_test/src/ElementInfoTestNumberBuilder.php Provides a trusted callback to alter the element_info_test number element. 2
ElementInterface interface Drupal\Core\Render\Element core/lib/Drupal/Core/Render/Element/ElementInterface.php Provides an interface for render element plugins. 2 1
ElementInterface interface Drupal\config_translation\FormElement core/modules/config_translation/src/FormElement/ElementInterface.php Provides an interface for configuration translation form elements. 2
ElementsAccessTest class Drupal\Tests\system\Functional\Form core/modules/system/tests/src/Functional/Form/ElementsAccessTest.php Tests access control for form elements.
ElementsContainerTest class Drupal\Tests\system\Functional\Form core/modules/system/tests/src/Functional/Form/ElementsContainerTest.php Tests the container form element for expected behavior.
ElementsContainerTest class Drupal\Tests\system\Kernel\Form core/modules/system/tests/src/Kernel/Form/ElementsContainerTest.php Tests the container form element for expected behavior.
ElementsFieldsetTest class Drupal\Tests\system\Kernel\Form core/modules/system/tests/src/Kernel/Form/ElementsFieldsetTest.php Tests fieldset element rendering and description placement.

Other projects


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