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

Namesort descending Type Namespace Location Description Direct uses Use statements Strings
AdminAjaxTest class Drupal\Tests\views_ui\FunctionalJavascript core/modules/views_ui/tests/src/FunctionalJavascript/AdminAjaxTest.php Tests the admin UI AJAX interactions.
AdminContext class Drupal\Core\Routing core/lib/Drupal/Core/Routing/AdminContext.php Provides a helper class to determine whether the route is an admin one. 4 2
AdminDemoNegotiator class Drupal\block\Theme core/modules/block/src/Theme/AdminDemoNegotiator.php Negotiates the theme for the block admin demo page via the URL. 2
AdminHtmlRouteProvider class Drupal\Core\Entity\Routing core/lib/Drupal/Core/Entity/Routing/AdminHtmlRouteProvider.php Provides HTML routes for entities with administrative add/edit/delete pages. 2 3
AdminMetaTagTest class Drupal\Tests\system\Functional\System core/modules/system/tests/src/Functional/System/AdminMetaTagTest.php Confirm that the fingerprinting meta tag appears as expected.
AdminNegotiator class Drupal\user\Theme core/modules/user/src/Theme/AdminNegotiator.php Sets the active theme on admin pages. 1 2
AdminNegotiatorTest class Drupal\Tests\user\Unit\Theme core/modules/user/tests/src/Unit/Theme/AdminNegotiatorTest.php Tests AdminNegotiator class.
AdminPathConfigEntityConverter class Drupal\Core\ParamConverter core/lib/Drupal/Core/ParamConverter/AdminPathConfigEntityConverter.php Makes sure the unmodified ConfigEntity is loaded on admin pages. 1 1 2
AdminPathConfigEntityConverter class Drupal\Core\ProxyClass\ParamConverter core/lib/Drupal/Core/ProxyClass/ParamConverter/AdminPathConfigEntityConverter.php Provides a proxy class for \Drupal\Core\ParamConverter\AdminPathConfigEntityConverter.
AdminPathEntityConverterLanguageTest class Drupal\Tests\language\Functional core/modules/language/tests/src/Functional/AdminPathEntityConverterLanguageTest.php Test administration path based conversion of entities. 1 1
AdminRouteSubscriber class Drupal\system\EventSubscriber core/modules/system/src/EventSubscriber/AdminRouteSubscriber.php Adds the _admin_route option to each admin HTML route. 1 2
AdminRouteSubscriberTest class Drupal\Tests\system\Unit\Routing core/modules/system/tests/src/Unit/Routing/AdminRouteSubscriberTest.php @coversDefaultClass \Drupal\system\EventSubscriber\AdminRouteSubscriber @group system
AdminTest class Drupal\Tests\system\Functional\System core/modules/system/tests/src/Functional/System/AdminTest.php Tests output on administrative pages and compact mode functionality.
AdvancedSettingsForm class Drupal\views_ui\Form core/modules/views_ui/src/Form/AdvancedSettingsForm.php Form builder for the advanced admin settings page. 1
AdvisoriesConfigSubscriber class Drupal\system\EventSubscriber core/modules/system/src/EventSubscriber/AdvisoriesConfigSubscriber.php Defines a config subscriber for changes to 'system.advisories'. 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.
AfterCommand class Drupal\Core\Ajax core/lib/Drupal/Core/Ajax/AfterCommand.php An AJAX command for calling the jQuery after() method. 2
Ajax class Drupal\Core\Render\Element core/lib/Drupal/Core/Render/Element/Ajax.php
AjaxBasePageNegotiator class Drupal\Core\Theme core/lib/Drupal/Core/Theme/AjaxBasePageNegotiator.php Defines a theme negotiator that deals with the active theme on ajax requests. 1 2
AjaxBasePageNegotiatorTest class Drupal\Tests\Core\Theme core/tests/Drupal/Tests/Core/Theme/AjaxBasePageNegotiatorTest.php @coversDefaultClass \Drupal\Core\Theme\AjaxBasePageNegotiator @group Theme
AjaxBlockTest class Drupal\Tests\layout_builder\FunctionalJavascript core/modules/layout_builder/tests/src/FunctionalJavascript/AjaxBlockTest.php Ajax blocks tests.
AjaxCallbacksTest class Drupal\FunctionalJavascriptTests\Ajax core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxCallbacksTest.php Tests Ajax callbacks on FAPI elements.
AjaxCommandsTest class Drupal\Tests\Core\Ajax core/tests/Drupal/Tests/Core/Ajax/AjaxCommandsTest.php Test coverage for various classes in the \Drupal\Core\Ajax namespace.
AjaxFileManagedMultipleTest class Drupal\Tests\file\FunctionalJavascript core/modules/file/tests/src/FunctionalJavascript/AjaxFileManagedMultipleTest.php Tests ajax upload to managed files.
AjaxFormCacheTest class Drupal\FunctionalJavascriptTests\Ajax core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormCacheTest.php Tests the usage of form caching for AJAX forms.
AjaxFormHelperTrait trait Drupal\Core\Ajax core/lib/Drupal/Core/Ajax/AjaxFormHelperTrait.php Provides a helper to for submitting an AJAX form. 5
AjaxFormImageButtonTest class Drupal\FunctionalJavascriptTests\Ajax core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormImageButtonTest.php Tests the Ajax image buttons work with key press events.
AjaxFormPageCacheTest class Drupal\FunctionalJavascriptTests\Ajax core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormPageCacheTest.php Performs tests on AJAX forms in cached pages.
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
AjaxHelperTrait trait Drupal\Core\Ajax core/lib/Drupal/Core/Ajax/AjaxHelperTrait.php Provides a helper to determine if the current request is via AJAX. 5
AjaxInGroupTest class Drupal\FunctionalJavascriptTests\Ajax core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxInGroupTest.php Tests that form elements in groups work correctly with AJAX.
AjaxMaintenanceModeTest class Drupal\FunctionalJavascriptTests\Ajax core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxMaintenanceModeTest.php Tests maintenance message during an AJAX call.
AjaxPageStateTest class Drupal\Tests\system\Functional\Render core/modules/system/tests/src/Functional/Render/AjaxPageStateTest.php Performs tests for the effects of the ajax_page_state query parameter.
AjaxRenderer class Drupal\Core\Render\MainContent core/lib/Drupal/Core/Render/MainContent/AjaxRenderer.php Default main content renderer for Ajax requests. 1 2
AjaxRendererTest class Drupal\Tests\Core\Controller core/tests/Drupal/Tests/Core/Controller/AjaxRendererTest.php @coversDefaultClass \Drupal\Core\Render\MainContent\AjaxRenderer @group Ajax
AjaxResponse class Drupal\Core\Ajax core/lib/Drupal/Core/Ajax/AjaxResponse.php JSON response object for AJAX requests. 2 40
AjaxResponseSubscriber class Drupal\Core\EventSubscriber core/lib/Drupal/Core/EventSubscriber/AjaxResponseSubscriber.php Response subscriber to handle AJAX responses. 4 2
AjaxResponseTest class Drupal\Tests\Core\Ajax core/tests/Drupal/Tests/Core/Ajax/AjaxResponseTest.php @coversDefaultClass \Drupal\Core\Ajax\AjaxResponse @group Ajax
AjaxTest class Drupal\FunctionalJavascriptTests\Ajax core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxTest.php Tests AJAX responses.
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

Pages

Other projects