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
GenericTest class Drupal\Tests\options\Functional core/modules/options/tests/src/Functional/GenericTest.php Generic module test for options.
GenericTest class Drupal\Tests\menu_link_content\Functional core/modules/menu_link_content/tests/src/Functional/GenericTest.php Generic module test for menu_link_content.
GenericTest class Drupal\Tests\menu_ui\Functional core/modules/menu_ui/tests/src/Functional/GenericTest.php Generic module test for menu_ui.
GenericTest class Drupal\Tests\workspaces\Functional core/modules/workspaces/tests/src/Functional/GenericTest.php Generic module test for workspaces.
GenericTest class Drupal\Tests\sqlite\Functional core/modules/sqlite/tests/src/Functional/GenericTest.php Generic module test for sqlite.
GenericTest class Drupal\Tests\file\Functional core/modules/file/tests/src/Functional/GenericTest.php Generic module test for file.
GenericTest class Drupal\Tests\locale\Functional core/modules/locale/tests/src/Functional/GenericTest.php Generic module test for locale.
GenericTest class Drupal\Tests\page_cache\Functional core/modules/page_cache/tests/src/Functional/GenericTest.php Generic module test for page_cache.
GenericTest class Drupal\Tests\responsive_image\Functional core/modules/responsive_image/tests/src/Functional/GenericTest.php Generic module test for responsive_image.
GenericTest class Drupal\Tests\migrate_drupal\Functional core/modules/migrate_drupal/tests/src/Functional/GenericTest.php Generic module test for migrate_drupal.
GenericTest class Drupal\Tests\navigation\Functional core/modules/navigation/tests/src/Functional/GenericTest.php Generic module test for navigation.
GenericTest class Drupal\Tests\dblog\Functional core/modules/dblog/tests/src/Functional/GenericTest.php Generic module test for dblog.
GenericTestExistsTest class Drupal\Tests\Core\Extension core/tests/Drupal/Tests/Core/Extension/GenericTestExistsTest.php Tests that the Generic module test exists for all modules.
Get class Drupal\migrate\Plugin\migrate\process core/modules/migrate/src/Plugin/migrate/process/Get.php Gets the source value. 3
GetDocumentFromResponseTrait trait Drupal\Tests\jsonapi\Traits core/modules/jsonapi/tests/src/Traits/GetDocumentFromResponseTrait.php Test trait for retrieving the JSON:API document from a response. 4
GetTest class Drupal\Tests\migrate\Unit\process core/modules/migrate/tests/src/Unit/process/GetTest.php Tests the get process plugin.
GetTestMethodCallerExtendsTest class Drupal\FunctionalTests core/tests/Drupal/FunctionalTests/GetTestMethodCallerExtendsTest.php Test for BrowserTestBase::getTestMethodCaller() in child classes.
GetTestMethodCallerTest class Drupal\FunctionalTests core/tests/Drupal/FunctionalTests/GetTestMethodCallerTest.php Explicit test for BrowserTestBase::getTestMethodCaller(). 1
Gettext class Drupal\locale core/modules/locale/src/Gettext.php Static class providing Drupal specific Gettext functionality. 1
Git class Drupal\Composer\Plugin\Scaffold composer/Plugin/Scaffold/Git.php Provide some Git utility operations.
GitExcluder final class Drupal\package_manager\PathExcluder core/modules/package_manager/src/PathExcluder/GitExcluder.php Excludes .git directories from stage operations. 1
GitExcluderTest class Drupal\Tests\package_manager\Kernel\PathExcluder core/modules/package_manager/tests/src/Kernel/PathExcluder/GitExcluderTest.php Tests Git Excluder.
GlobalAttribute class Drupal\ckeditor5\Plugin\CKEditor5Plugin core/modules/ckeditor5/src/Plugin/CKEditor5Plugin/GlobalAttribute.php CKEditor 5 Global Attribute for filter_html. 1
GlossaryTest class Drupal\Tests\views\Functional core/modules/views/tests/src/Functional/GlossaryTest.php Tests glossary functionality of views.
GlossaryViewTest class Drupal\Tests\views\FunctionalJavascript core/modules/views/tests/src/FunctionalJavascript/GlossaryViewTest.php Tests the basic AJAX functionality of the Glossary View.
Good class Drupal\Tests\Core\Foo core/tests/PHPStan/fixtures/test-classes-missing-attributes.php #[RunTestsInSeparateProcesses] #[Group('Test')]
GotoAction class Drupal\Core\Action\Plugin\Action core/lib/Drupal/Core/Action/Plugin/Action/GotoAction.php Redirects to a different URL. 1
GotoActionTest class Drupal\KernelTests\Core\Action core/tests/Drupal/KernelTests/Core/Action/GotoActionTest.php Tests Goto Action.
Graph class Drupal\Component\Graph core/lib/Drupal/Component/Graph/Graph.php Directed acyclic graph manipulation. 7
GraphTest class Drupal\Tests\Component\Graph core/tests/Drupal/Tests/Component/Graph/GraphTest.php Tests Drupal\Component\Graph\Graph.
Grid class Drupal\views\Plugin\views\style core/modules/views/src/Plugin/views/style/Grid.php Style plugin to render each item in a grid cell. 1
GridResponsive class Drupal\views\Plugin\views\style core/modules/views/src/Plugin/views/style/GridResponsive.php Style plugin to render each item in a responsive grid cell.
GroupByNumeric class Drupal\views\Plugin\views\sort core/modules/views/src/Plugin/views/sort/GroupByNumeric.php Handler for GROUP BY on simple numeric fields.
GroupByNumeric class Drupal\views\Plugin\views\filter core/modules/views/src/Plugin/views/filter/GroupByNumeric.php Simple filter to handle greater than/less than filters.
GroupByNumeric class Drupal\views\Plugin\views\argument core/modules/views/src/Plugin/views/argument/GroupByNumeric.php Simple handler for arguments using group by.
GroupByTest class Drupal\Tests\views_ui\Functional core/modules/views_ui/tests/src/Functional/GroupByTest.php Tests UI of aggregate functionality.
GroupedExposedFilterTest class Drupal\Tests\views\FunctionalJavascript\Plugin\views\Handler core/modules/views/tests/src/FunctionalJavascript/Plugin/views/Handler/GroupedExposedFilterTest.php Tests the grouped exposed filter admin UI.
GroupwiseMax class Drupal\views\Plugin\views\relationship core/modules/views/src/Plugin/views/relationship/GroupwiseMax.php The relationship handler for groupwise maximum queries.
HandleMultiplesTest class Drupal\Tests\migrate\Kernel\process core/modules/migrate/tests/src/Kernel/process/HandleMultiplesTest.php Tests process pipelines with scalar and multiple values handling.
Handler class Drupal\Composer\Plugin\Scaffold composer/Plugin/Scaffold/Handler.php Core class of the plugin. 2
HandlerAliasTest class Drupal\Tests\views\Kernel\Handler core/modules/views/tests/src/Kernel/Handler/HandlerAliasTest.php Tests handler table and field aliases.
HandlerAllTest class Drupal\Tests\views\Kernel\Handler core/modules/views/tests/src/Kernel/Handler/HandlerAllTest.php Tests instances of all handlers.
HandlerArgumentUserUidTest class Drupal\Tests\user\Kernel\Views core/modules/user/tests/src/Kernel/Views/HandlerArgumentUserUidTest.php Tests the handler of the user: uid Argument.
HandlerBase abstract class Drupal\views\Plugin\views core/modules/views/src/Plugin/views/HandlerBase.php Base class for Views handler plugins. 7 13
HandlerBaseTest class Drupal\Tests\views\Unit\Plugin core/modules/views/tests/src/Unit/Plugin/HandlerBaseTest.php Tests Drupal\views\Plugin\views\HandlerBase.
HandlerFieldFieldTest class Drupal\Tests\field\Kernel\Views core/modules/field/tests/src/Kernel/Views/HandlerFieldFieldTest.php Tests the field rendering in views.
HandlerFieldPermissionTest class Drupal\Tests\user\Kernel\Views core/modules/user/tests/src/Kernel/Views/HandlerFieldPermissionTest.php Tests the permission field handler.
HandlerFieldRoleTest class Drupal\Tests\user\Functional\Views core/modules/user/tests/src/Functional/Views/HandlerFieldRoleTest.php Tests the handler of the user: role field.
HandlerFieldUserNameTest class Drupal\Tests\user\Functional\Views core/modules/user/tests/src/Functional/Views/HandlerFieldUserNameTest.php Tests the handler of the user: name field.
HandlerFilterCurrentUserTest class Drupal\Tests\user\Kernel\Views core/modules/user/tests/src/Kernel/Views/HandlerFilterCurrentUserTest.php Tests the current user filter handler.

Other projects


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