Classes, traits, and interfaces - 9.5.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 1523

Name Deprecated Object type Namespace File name Summary Direct uses Use statements Strings
ItemStorageSchema class Drupal\aggregator core/modules/aggregator/src/ItemStorageSchema.php Defines the item schema handler.
ItemTest class Drupal\Tests\aggregator\Functional\Jsonapi core/modules/aggregator/tests/src/Functional/Jsonapi/ItemTest.php JSON:API integration test for the "Item" content entity type.
ItemViewBuilder class Drupal\aggregator core/modules/aggregator/src/ItemViewBuilder.php View builder handler for aggregator feed items.
ItemWithoutFeedTest class Drupal\Tests\aggregator\Kernel core/modules/aggregator/tests/src/Kernel/ItemWithoutFeedTest.php Tests clean handling of an item with a missing feed ID.
ItemXmlAnonTest class Drupal\Tests\aggregator\Functional\Rest core/modules/aggregator/tests/src/Functional/Rest/ItemXmlAnonTest.php @group rest @group legacy
ItemXmlBasicAuthTest class Drupal\Tests\aggregator\Functional\Rest core/modules/aggregator/tests/src/Functional/Rest/ItemXmlBasicAuthTest.php @group rest @group legacy
ItemXmlCookieTest class Drupal\Tests\aggregator\Functional\Rest core/modules/aggregator/tests/src/Functional/Rest/ItemXmlCookieTest.php @group rest @group legacy
JavascriptDeprecationTest class Drupal\FunctionalJavascriptTests core/tests/Drupal/FunctionalJavascriptTests/JavascriptDeprecationTest.php Tests Javascript deprecation notices.
JavascriptErrorsSuppressionTest class Drupal\FunctionalJavascriptTests core/tests/Drupal/FunctionalJavascriptTests/JavascriptErrorsSuppressionTest.php Tests that Drupal.throwError can be suppressed to allow a test to pass.
JavascriptErrorsTest class Drupal\FunctionalJavascriptTests core/tests/Drupal/FunctionalJavascriptTests/JavascriptErrorsTest.php Tests that Drupal.throwError will cause a deprecation warning.
JavascriptGetDrupalSettingsTest class Drupal\FunctionalJavascriptTests core/tests/Drupal/FunctionalJavascriptTests/JavascriptGetDrupalSettingsTest.php Tests Drupal settings retrieval in WebDriverTestBase tests.
JavascriptStatesForm class Drupal\form_test\Form core/modules/system/tests/modules/form_test/src/Form/JavascriptStatesForm.php Builds a simple form to test states. 1
JavascriptStatesTest class Drupal\FunctionalJavascriptTests\Core\Form core/tests/Drupal/FunctionalJavascriptTests/Core/Form/JavascriptStatesTest.php Tests the state of elements based on another elements.
JoinPluginBase class Drupal\views\Plugin\views\join core/modules/views/src/Plugin/views/join/JoinPluginBase.php Represents a join and creates the SQL necessary to implement the join. 4 4
JoinPluginInterface interface Drupal\views\Plugin\views\join core/modules/views/src/Plugin/views/join/JoinPluginInterface.php Represents a join and creates the SQL necessary to implement the join. 1
JoinTest class Drupal\Tests\views\Kernel\Plugin core/modules/views/tests/src/Kernel/Plugin/JoinTest.php Tests the join plugin.
JoinTest class Drupal\views_test_data\Plugin\views\join core/modules/views/tests/modules/views_test_data/src/Plugin/views/join/JoinTest.php Defines a join test plugin. 1
JqueryUiLibraryAssetsTest class Drupal\FunctionalTests\Libraries core/tests/Drupal/FunctionalTests/Libraries/JqueryUiLibraryAssetsTest.php Tests the loading of jQuery UI CSS and JS assets.
JqueryUiTestAssetsController class Drupal\jqueryui_library_assets_test\Controller core/modules/system/tests/modules/jqueryui_library_assets_test/src/Controller/JqueryUiTestAssetsController.php Controller for testing jQuery UI asset loading order.
JsAjaxTestCommand class Drupal\js_ajax_test\Ajax core/modules/system/tests/modules/js_ajax_test/src/Ajax/JsAjaxTestCommand.php Test Ajax command. 1
JsAjaxTestForm class Drupal\js_ajax_test\Form core/modules/system/tests/modules/js_ajax_test/src/Form/JsAjaxTestForm.php Test form for js_ajax_test. 1
JsCollectionGrouper class Drupal\Core\Asset core/lib/Drupal/Core/Asset/JsCollectionGrouper.php Groups JavaScript assets. 2
JsCollectionOptimizer class Drupal\Core\Asset core/lib/Drupal/Core/Asset/JsCollectionOptimizer.php Optimizes JavaScript assets. 2
JsCollectionRenderer class Drupal\Core\Asset core/lib/Drupal/Core/Asset/JsCollectionRenderer.php Renders JavaScript assets. 2
JsCookieTestController class Drupal\js_cookie_test\Controller core/modules/system/tests/modules/js_cookie_test/src/Controller/JsCookieTestController.php Test controller to assert js-cookie library integration.
JsDeprecationTestController class Drupal\js_deprecation_test\Controller core/modules/system/tests/modules/js_deprecation_test/src/Controller/JsDeprecationTestController.php Test Controller to show message links.
JsErrorsTestController class Drupal\js_errors_test\Controller core/modules/system/tests/modules/js_errors_test/src/Controller/JsErrorsTestController.php Test Controller loading js_errors_test/errors_test library.
JSInteractionTest class Drupal\FunctionalJavascriptTests\Tests core/tests/Drupal/FunctionalJavascriptTests/Tests/JSInteractionTest.php Tests fault tolerant interactions.
JSInteractionTestForm class Drupal\js_interaction_test\Controller core/modules/system/tests/modules/js_interaction_test/src/Controller/JSInteractionTestForm.php Controller for testing fault tolerant JavaScript interactions. 1
JsMessageTest class Drupal\FunctionalJavascriptTests\Core core/tests/Drupal/FunctionalJavascriptTests/Core/JsMessageTest.php Tests core/drupal.message library. 1 1
JSMessageTestController class Drupal\js_message_test\Controller core/modules/system/tests/modules/js_message_test/src/Controller/JSMessageTestController.php Test Controller to show message links. 2
Json class Drupal\Component\Serialization core/lib/Drupal/Component/Serialization/Json.php Default serialization for JSON. 95 3
JsonApiDocumentTopLevel class Drupal\jsonapi\JsonApiResource core/modules/jsonapi/src/JsonApiResource/JsonApiDocumentTopLevel.php Represents a JSON:API document's "top level". 9
JsonApiDocumentTopLevelNormalizer class Drupal\jsonapi\Normalizer core/modules/jsonapi/src/Normalizer/JsonApiDocumentTopLevelNormalizer.php Normalizes the top-level document according to the JSON:API specification. 1 2
JsonApiDocumentTopLevelNormalizerTest class Drupal\Tests\jsonapi\Unit\Normalizer core/modules/jsonapi/tests/src/Unit/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php @coversDefaultClass \Drupal\jsonapi\Normalizer\JsonApiDocumentTopLevelNormalizer[[api-linebreak]] @group jsonapi
JsonApiDocumentTopLevelNormalizerTest class Drupal\Tests\jsonapi\Kernel\Normalizer core/modules/jsonapi/tests/src/Kernel/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php @coversDefaultClass \Drupal\jsonapi\Normalizer\JsonApiDocumentTopLevelNormalizer[[api-linebreak]] @group jsonapi
JsonApiFunctionalDateFieldTest class Drupal\Tests\jsonapi\Functional core/modules/jsonapi/tests/src/Functional/JsonApiFunctionalDateFieldTest.php JSON:API integration test for the "Date" field.
JsonApiFunctionalMultilingualTest class Drupal\Tests\jsonapi\Functional core/modules/jsonapi/tests/src/Functional/JsonApiFunctionalMultilingualTest.php Tests JSON:API multilingual support.
JsonApiFunctionalTest class Drupal\Tests\jsonapi\Functional core/modules/jsonapi/tests/src/Functional/JsonApiFunctionalTest.php General functional test class.
JsonApiFunctionalTestBase abstract class Drupal\Tests\jsonapi\Functional core/modules/jsonapi/tests/src/Functional/JsonApiFunctionalTestBase.php Provides helper methods for the JSON:API module's functional tests. 5 1
JsonapiKernelTestBase abstract class Drupal\Tests\jsonapi\Kernel core/modules/jsonapi/tests/src/Kernel/JsonapiKernelTestBase.php Contains shared test utility methods. 11 11
JsonapiMaintenanceModeSubscriber class Drupal\jsonapi\EventSubscriber core/modules/jsonapi/src/EventSubscriber/JsonapiMaintenanceModeSubscriber.php Maintenance mode subscriber for JSON:API requests. 2
JsonApiRegressionTest class Drupal\Tests\jsonapi\Functional core/modules/jsonapi/tests/src/Functional/JsonApiRegressionTest.php JSON:API regression tests.
JsonApiRegressionTest class Drupal\Tests\rdf\Functional\Jsonapi core/modules/rdf/tests/src/Functional/Jsonapi/JsonApiRegressionTest.php JSON:API regression tests.
JsonApiRequestTestTrait trait Drupal\Tests\jsonapi\Functional core/modules/jsonapi/tests/src/Functional/JsonApiRequestTestTrait.php Boilerplate for JSON:API Functional tests' HTTP requests. 1
JsonApiRequestValidator class Drupal\jsonapi\EventSubscriber core/modules/jsonapi/src/EventSubscriber/JsonApiRequestValidator.php Request subscriber that validates a JSON:API request. 2
JsonapiServiceProvider class Drupal\jsonapi core/modules/jsonapi/src/JsonapiServiceProvider.php Adds 'api_json' as known format and prevents its use in the REST module.
JsonApiSettingsForm class Drupal\jsonapi\Form core/modules/jsonapi/src/Form/JsonApiSettingsForm.php Configure JSON:API settings for this site. 1
JsonApiSpec class Drupal\jsonapi core/modules/jsonapi/src/JsonApiSpec.php Defines constants used for compliance with the JSON:API specification. 7
JsonApiSpecTest class Drupal\Tests\jsonapi\Unit core/modules/jsonapi/tests/src/Unit/JsonApiSpecTest.php @coversDefaultClass \Drupal\jsonapi\JsonApiSpec[[api-linebreak]] @group jsonapi

Other projects


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