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
DbLogTest class Drupal\Tests\dblog\Functional core/modules/dblog/tests/src/Functional/DbLogTest.php Verifies log entries and user access based on permissions. 1
DblogTypes class Drupal\dblog\Plugin\views\filter core/modules/dblog/src/Plugin/views/filter/DblogTypes.php Exposes log types to views module.
DblogViewsHooks class Drupal\dblog\Hook core/modules/dblog/src/Hook/DblogViewsHooks.php Hook implementations for dblog.
DbLogViewsTest class Drupal\Tests\dblog\Functional core/modules/dblog/tests/src/Functional/DbLogViewsTest.php Verifies user access to log reports based on permissions.
DbToolsApplication class Drupal\Core\Command core/lib/Drupal/Core/Command/DbToolsApplication.php Provides a command to import a database generation script. 2
DbToolsApplicationTest class Drupal\Tests\system\Kernel\Scripts core/modules/system/tests/src/Kernel/Scripts/DbToolsApplicationTest.php Test that the DbToolsApplication works correctly.
DbUpdateAccessCheck class Drupal\system\Access core/modules/system/src/Access/DbUpdateAccessCheck.php Access check for database update routes. 2
DbUpdateController class Drupal\system\Controller core/modules/system/src/Controller/DbUpdateController.php Controller routines for database update routes.
DbUpdateNegotiator class Drupal\system\Theme core/modules/system/src/Theme/DbUpdateNegotiator.php Sets the active theme for the database update pages. 2
DCOM58Test class Drupal\Tests\Component\Annotation\Doctrine\Ticket core/tests/Drupal/Tests/Component/Annotation/Doctrine/Ticket/DCOM58Test.php This class is a near-copy of \Doctrine\Tests\Common\Annotations\Ticket\DCOM58Test, which is part of the Doctrine project: <http://www.doctrine-project.org>. It was copied from version 1.2.7.
DebugDump final class Drupal\TestTools\Extension\Dump core/tests/Drupal/TestTools/Extension/Dump/DebugDump.php Drupal's extension for printing dump() output results. 6
DebugExtension final class Drupal\Core\Template core/lib/Drupal/Core/Template/DebugExtension.php A class providing Drupal Twig Debug extension. 2
DecimalData class Drupal\Core\TypedData\Plugin\DataType core/lib/Drupal/Core/TypedData/Plugin/DataType/DecimalData.php The decimal data type. 1
DecimalFormatter class Drupal\Core\Field\Plugin\Field\FieldFormatter core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/DecimalFormatter.php Plugin implementation of the 'number_decimal' formatter.
DecimalInterface interface Drupal\Core\TypedData\Type core/lib/Drupal/Core/TypedData/Type/DecimalInterface.php Interface for decimal numbers. 1 3
DecimalItem class Drupal\Core\Field\Plugin\Field\FieldType core/lib/Drupal/Core/Field/Plugin/Field/FieldType/DecimalItem.php Defines the 'decimal' field type.
DecoratedServiceTest class Drupal\Tests\system\Kernel core/modules/system/tests/src/Kernel/DecoratedServiceTest.php Test handling of decorated services with the reverse container.
DecoupledMenusTestHooks class Drupal\decoupled_menus_test\Hook core/modules/system/tests/modules/decoupled_menus_test/src/Hook/DecoupledMenusTestHooks.php Hook implementations for decoupled_menus_test.
DefaultAccessCheck class Drupal\Core\Access core/lib/Drupal/Core/Access/DefaultAccessCheck.php Allows access to routes to be controlled by an '_access' boolean parameter. 2 2
DefaultAccessCheckTest class Drupal\Tests\Core\Access core/tests/Drupal/Tests/Core/Access/DefaultAccessCheckTest.php Tests Drupal\Core\Access\DefaultAccessCheck.
DefaultConfigTest class Drupal\Tests\Core\Extension core/tests/Drupal/Tests/Core/Extension/DefaultConfigTest.php Tests default configuration of the Extension system.
DefaultConfigTest class Drupal\KernelTests\Config core/tests/Drupal/KernelTests/Config/DefaultConfigTest.php Tests that the installed config matches the default config.
DefaultContentFilesAccessTest class Drupal\Tests\demo_umami_content\Functional core/profiles/demo_umami/modules/demo_umami_content/tests/src/Functional/DefaultContentFilesAccessTest.php Tests that files provided by demo_umami_content are not accessible.
DefaultContentSubscriber class Drupal\media\EventSubscriber core/modules/media/src/EventSubscriber/DefaultContentSubscriber.php Subscribes to default content-related events.
DefaultContentSubscriber class Drupal\file\EventSubscriber core/modules/file/src/EventSubscriber/DefaultContentSubscriber.php Subscribes to default content-related events.
DefaultContentSubscriber class Drupal\content_moderation\EventSubscriber core/modules/content_moderation/src/EventSubscriber/DefaultContentSubscriber.php Subscribes to default content-related events.
DefaultContentSubscriber class Drupal\layout_builder\EventSubscriber core/modules/layout_builder/src/EventSubscriber/DefaultContentSubscriber.php Subscribes to default content-related events.
DefaultContentSubscriber final class Drupal\menu_link_content\EventSubscriber core/modules/menu_link_content/src/EventSubscriber/DefaultContentSubscriber.php Subscribes to default content-related events. 1
DefaultContentSubscriber class Drupal\link\EventSubscriber core/modules/link/src/EventSubscriber/DefaultContentSubscriber.php Subscribes to default content-related events.
DefaultContentSubscriber class Drupal\path\EventSubscriber core/modules/path/src/EventSubscriber/DefaultContentSubscriber.php Subscribes to default content-related events.
DefaultContentTest class Drupal\Tests\menu_link_content\Kernel core/modules/menu_link_content/tests/src/Kernel/DefaultContentTest.php Tests exporting menu links in YAML format.
DefaultDisplay class Drupal\views\Plugin\views\display core/modules/views/src/Plugin/views/display/DefaultDisplay.php A plugin to handle defaults on a view. 3
DefaultDisplayExtender class Drupal\views\Plugin\views\display_extender core/modules/views/src/Plugin/views/display_extender/DefaultDisplayExtender.php Default display extender plugin; does nothing.
DefaultExceptionHtmlSubscriber class Drupal\Core\EventSubscriber core/lib/Drupal/Core/EventSubscriber/DefaultExceptionHtmlSubscriber.php Exception subscriber for handling core default HTML error pages. 1 2
DefaultExceptionSubscriber class Drupal\jsonapi\EventSubscriber core/modules/jsonapi/src/EventSubscriber/DefaultExceptionSubscriber.php Serializes exceptions in compliance with the JSON:API specification. 2
DefaultExceptionSubscriber class Drupal\serialization\EventSubscriber core/modules/serialization/src/EventSubscriber/DefaultExceptionSubscriber.php Handles default error responses in serialization formats. 1 2 2
DefaultExceptionSubscriberTest class Drupal\Tests\serialization\Unit\EventSubscriber core/modules/serialization/tests/src/Unit/EventSubscriber/DefaultExceptionSubscriberTest.php Tests Drupal\serialization\EventSubscriber\DefaultExceptionSubscriber.
DefaultFactory class Drupal\Component\Plugin\Factory core/lib/Drupal/Component/Plugin/Factory/DefaultFactory.php Default plugin factory. 2 13
DefaultFactoryTest class Drupal\Tests\Component\Plugin core/tests/Drupal/Tests/Component/Plugin/DefaultFactoryTest.php Tests Drupal\Component\Plugin\Factory\DefaultFactory.
DefaultFileFormatter class Drupal\file\Plugin\Field\FieldFormatter core/modules/file/src/Plugin/Field/FieldFormatter/DefaultFileFormatter.php Formatter for a text field on a file entity that links the field to the file.
DefaultFormatTest class Drupal\FunctionalTests\Routing core/tests/Drupal/FunctionalTests/Routing/DefaultFormatTest.php Tests Default Format.
DefaultFormatTestController class Drupal\default_format_test core/modules/system/tests/modules/default_format_test/src/DefaultFormatTestController.php Controller for testing default route format.
DefaultHtmlRouteProvider class Drupal\Core\Entity\Routing core/lib/Drupal/Core/Entity/Routing/DefaultHtmlRouteProvider.php Provides HTML routes for entities. 3 25
DefaultHtmlRouteProviderTest class Drupal\Tests\Core\Entity\Routing core/tests/Drupal/Tests/Core/Entity/Routing/DefaultHtmlRouteProviderTest.php Tests Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider.
DefaultLangcode class Drupal\language\Plugin\migrate\destination core/modules/language/src/Plugin/migrate/destination/DefaultLangcode.php Provides a destination plugin for the default langcode config.
DefaultLanguageItem class Drupal\language core/modules/language/src/DefaultLanguageItem.php Alternative plugin implementation of the 'language' field type.
DefaultLanguageRenderer class Drupal\views\Entity\Render core/modules/views/src/Entity/Render/DefaultLanguageRenderer.php Renders entities in their default language.
DefaultLazyPluginCollection class Drupal\Core\Plugin core/lib/Drupal/Core/Plugin/DefaultLazyPluginCollection.php Provides a default plugin collection for a plugin type. 5 8
DefaultLazyPluginCollectionTest class Drupal\Tests\Core\Plugin core/tests/Drupal/Tests/Core/Plugin/DefaultLazyPluginCollectionTest.php Tests Drupal\Core\Plugin\DefaultLazyPluginCollection.
DefaultMenuLinkTreeManipulators class Drupal\Core\Menu core/lib/Drupal/Core/Menu/DefaultMenuLinkTreeManipulators.php Provides a couple of menu link tree manipulators. 1 2

Other projects


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