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 Namespacesort descending Location Description Direct uses Use statements Strings
Drupal class core/lib/Drupal.php Static Service Container wrapper.
Entity class core/tests/Drupal/Tests/Component/Annotation/Doctrine/Ticket/DCOM58Entity.php This class is a near-copy of tests/Doctrine/Tests/Common/Annotations/Ticket/DCOM58Entity.php, which is part of the Doctrine project: <http://www.doctrine-project.org>. It was copied from version 1.2.7.
DiscoveryTest1 class com\example\PluginNamespace core/tests/Drupal/Tests/Component/Annotation/Fixtures/PluginNamespace/DiscoveryTest1.php Provides a custom test plugin.
AcceptHeaderRoutingTestServiceProvider class Drupal\accept_header_routing_test core/modules/system/tests/modules/accept_header_routing_test/src/AcceptHeaderRoutingTestServiceProvider.php Service provider for the accept_header_routing_test module.
AcceptHeaderMatcher class Drupal\accept_header_routing_test\Routing core/modules/system/tests/modules/accept_header_routing_test/src/Routing/AcceptHeaderMatcher.php Filters routes based on the media type specified in the HTTP Accept headers. 1 2
ActionAddForm class Drupal\action\Form core/modules/action/src/Form/ActionAddForm.php Provides a form for action add forms. 1
ActionAdminManageForm class Drupal\action\Form core/modules/action/src/Form/ActionAdminManageForm.php Provides a configuration form for configurable actions.
ActionDeleteForm class Drupal\action\Form core/modules/action/src/Form/ActionDeleteForm.php Builds a form to delete an action.
ActionEditForm class Drupal\action\Form core/modules/action/src/Form/ActionEditForm.php Provides a form for action edit forms. 1
ActionFormBase abstract class Drupal\action\Form core/modules/action/src/Form/ActionFormBase.php Provides a base form for action forms. 2
TestActionConfirmForm class Drupal\action_bulk_test\Form core/modules/views/tests/modules/action_bulk_test/src/Form/TestActionConfirmForm.php Confirmation form for 'test_action' action. 1
TestSystemLoggerChannel final class Drupal\advisory_feed_test core/modules/system/tests/modules/advisory_feed_test/src/TestSystemLoggerChannel.php Provides a decorator for the 'logger.channel.system' service for testing. 2
AdvisoryTestClientMiddleware class Drupal\advisory_feed_test core/modules/system/tests/modules/advisory_feed_test/src/AdvisoryTestClientMiddleware.php Overrides the User-Agent HTTP header for outbound HTTP requests. 1 2
AdvisoryTestController class Drupal\advisory_feed_test\Controller core/modules/system/tests/modules/advisory_feed_test/src/Controller/AdvisoryTestController.php Defines a controller to return JSON for security advisory tests.
Callbacks class Drupal\ajax_forms_test core/modules/system/tests/modules/ajax_forms_test/src/Callbacks.php Simple object for testing methods as Ajax callbacks. 3
DialogFormLink class Drupal\ajax_forms_test\Controller core/modules/system/tests/modules/ajax_forms_test/src/Controller/DialogFormLink.php Test class to create dialog form link.
AjaxFormsTestAjaxElementsForm class Drupal\ajax_forms_test\Form core/modules/system/tests/modules/ajax_forms_test/src/Form/AjaxFormsTestAjaxElementsForm.php Builds a form where each Form API element triggers a simple Ajax callback. 1
AjaxFormsTestCommandsForm class Drupal\ajax_forms_test\Form core/modules/system/tests/modules/ajax_forms_test/src/Form/AjaxFormsTestCommandsForm.php Form constructor for the Ajax Command display form. 1
AjaxFormsTestImageButtonForm class Drupal\ajax_forms_test\Form core/modules/system/tests/modules/ajax_forms_test/src/Form/AjaxFormsTestImageButtonForm.php Form builder: Builds a form that has image button with an ajax callback. 1
AjaxFormsTestLazyLoadForm class Drupal\ajax_forms_test\Form core/modules/system/tests/modules/ajax_forms_test/src/Form/AjaxFormsTestLazyLoadForm.php Form builder: Builds a form that triggers a simple AJAX callback. 1
AjaxFormsTestSimpleForm class Drupal\ajax_forms_test\Form core/modules/system/tests/modules/ajax_forms_test/src/Form/AjaxFormsTestSimpleForm.php Form builder: Builds a form that triggers a simple AJAX callback. 1
AjaxFormsTestValidationForm class Drupal\ajax_forms_test\Form core/modules/system/tests/modules/ajax_forms_test/src/Form/AjaxFormsTestValidationForm.php Form builder: Builds a form that triggers a simple AJAX callback. 1
AjaxTestCommandReturnPromise class Drupal\ajax_test\Ajax core/modules/system/tests/modules/ajax_test/src/Ajax/AjaxTestCommandReturnPromise.php Test Ajax command. 1
AjaxTestController class Drupal\ajax_test\Controller core/modules/system/tests/modules/ajax_test/src/Controller/AjaxTestController.php Provides content for dialog tests. 2
AjaxTestDialogForm class Drupal\ajax_test\Form core/modules/system/tests/modules/ajax_test/src/Form/AjaxTestDialogForm.php Dummy form for testing DialogRenderer with _form routes.
AjaxTestFocusFirstForm class Drupal\ajax_test\Form core/modules/system/tests/modules/ajax_test/src/Form/AjaxTestFocusFirstForm.php Form for testing AJAX FocusFirstCommand. 1
AjaxTestForm class Drupal\ajax_test\Form core/modules/system/tests/modules/ajax_test/src/Form/AjaxTestForm.php Dummy form for testing DialogRenderer with _form routes. 1
AjaxTestFormPromise class Drupal\ajax_test\Form core/modules/system/tests/modules/ajax_test/src/Form/AjaxTestFormPromise.php Test form for ajax_test_form_promise. 1
AjaxTestMessageCommandForm class Drupal\ajax_test\Form core/modules/system/tests/modules/ajax_test/src/Form/AjaxTestMessageCommandForm.php Form for testing AJAX MessageCommand. 1
RenderCallbacks final class Drupal\announcements_feed core/modules/announcements_feed/src/RenderCallbacks.php Defines a class for render callbacks. 1
AnnounceTestHttpClientMiddleware class Drupal\announce_feed_test core/modules/announcements_feed/tests/modules/announce_feed_test/src/AnnounceTestHttpClientMiddleware.php Overrides the requested endpoint when running tests. 1 2
AutomatedCron class Drupal\automated_cron\EventSubscriber core/modules/automated_cron/src/EventSubscriber/AutomatedCron.php A subscriber running cron after a response is sent. 2
TestInjection class Drupal\autowire_test core/modules/system/tests/modules/autowire_test/src/TestInjection.php A service that is autowired. 1
TestInjection2 class Drupal\autowire_test core/modules/system/tests/modules/autowire_test/src/TestInjection2.php A service that is autowired.
TestInjectionInterface interface Drupal\autowire_test core/modules/system/tests/modules/autowire_test/src/TestInjectionInterface.php An interface for a service that is autowired. 2
TestInjection3 class Drupal\autowire_test core/modules/system/tests/modules/autowire_test/src/TestInjection3.php A service that is autowired.
BanIpManager class Drupal\ban core/modules/ban/src/BanIpManager.php Ban IP manager. 1 2
BanIpManagerInterface interface Drupal\ban core/modules/ban/src/BanIpManagerInterface.php Provides an interface defining a BanIp manager. 1 3
BanMiddleware class Drupal\ban core/modules/ban/src/BanMiddleware.php Provides a HTTP middleware to implement IP based banning. 2
BanAdmin class Drupal\ban\Form core/modules/ban/src/Form/BanAdmin.php Displays banned IP addresses. 1
BanDelete class Drupal\ban\Form core/modules/ban/src/Form/BanDelete.php Provides a form to unban IP addresses. 1
BlockedIp class Drupal\ban\Plugin\migrate\destination core/modules/ban/src/Plugin/migrate/destination/BlockedIp.php 1
BlockedIps class Drupal\ban\Plugin\migrate\source\d7 core/modules/ban/src/Plugin/migrate/source/d7/BlockedIps.php Drupal 7 blocked IPs source from database.
DisallowBasicAuthRequests class Drupal\basic_auth\PageCache core/modules/basic_auth/src/PageCache/DisallowBasicAuthRequests.php Cache policy for pages served from basic auth. 2
BasicAuthTestController class Drupal\basic_auth_test core/modules/basic_auth/tests/modules/basic_auth_test/src/BasicAuthTestController.php
BatchTestController class Drupal\batch_test\Controller core/modules/system/tests/modules/batch_test/src/Controller/BatchTestController.php Controller routines for batch tests.
BatchTestChainedForm class Drupal\batch_test\Form core/modules/system/tests/modules/batch_test/src/Form/BatchTestChainedForm.php Generate form of id batch_test_chained_form. 1
BatchTestMockForm class Drupal\batch_test\Form core/modules/system/tests/modules/batch_test/src/Form/BatchTestMockForm.php Generate form of id batch_test_mock_form.
BatchTestMultiStepForm class Drupal\batch_test\Form core/modules/system/tests/modules/batch_test/src/Form/BatchTestMultiStepForm.php Generate form of id batch_test_multistep_form. 1
BatchTestSimpleForm class Drupal\batch_test\Form core/modules/system/tests/modules/batch_test/src/Form/BatchTestSimpleForm.php Generate form of id batch_test_simple_form. 1

Pages

Other projects