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
HandlerFilterPermissionTest class Drupal\Tests\user\Kernel\Views core/modules/user/tests/src/Kernel/Views/HandlerFilterPermissionTest.php Tests the permissions filter handler.
HandlerFilterRolesTest class Drupal\Tests\user\Kernel\Views core/modules/user/tests/src/Kernel/Views/HandlerFilterRolesTest.php Tests the roles filter handler.
HandlerFilterUserNameTest class Drupal\Tests\user\Functional\Views core/modules/user/tests/src/Functional/Views/HandlerFilterUserNameTest.php Tests the handler of the user: name filter.
HandlerInterface interface Drupal\Tests\Core\DependencyInjection\Compiler core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/TaggedHandlersPassTest.php Interface for test handlers. 1
HandlerStackConfigurator class Drupal\Core\Http core/lib/Drupal/Core/Http/HandlerStackConfigurator.php Defines a class for configuring middlewares on the http handler stack. 2
HandlerTest class Drupal\Tests\views_ui\Functional core/modules/views_ui/tests/src/Functional/HandlerTest.php Tests handler UI for views.
HandlerTest class Drupal\Tests\views\Functional\Handler core/modules/views/tests/src/Functional/Handler/HandlerTest.php Tests abstract handler definitions.
HandlerTestTrait trait Drupal\Tests\views\Unit\Plugin core/modules/views/tests/src/Unit/Plugin/HandlerTestTrait.php Test trait to mock dependencies of a handler. 1
HeadersCacheContext class Drupal\Core\Cache\Context core/lib/Drupal/Core/Cache/Context/HeadersCacheContext.php Defines the HeadersCacheContext service, for "per header" caching. 1 2
HeadersCacheContextTest class Drupal\Tests\Core\Cache\Context core/tests/Drupal/Tests/Core/Cache/Context/HeadersCacheContextTest.php Tests Drupal\Core\Cache\Context\HeadersCacheContext.
Heading class Drupal\ckeditor5\Plugin\CKEditor5Plugin core/modules/ckeditor5/src/Plugin/CKEditor5Plugin/Heading.php CKEditor 5 Heading plugin. 6 1
HeadingPluginTest class Drupal\Tests\ckeditor5\Unit core/modules/ckeditor5/tests/src/Unit/HeadingPluginTest.php Tests Drupal\ckeditor5\Plugin\CKEditor5Plugin\Language.
HelpBlock class Drupal\help\Plugin\Block core/modules/help/src/Plugin/Block/HelpBlock.php Provides a 'Help' block.
HelpBlockTest class Drupal\Tests\help\Functional core/modules/help/tests/src/Functional/HelpBlockTest.php Tests display of help block.
HelpBreadcrumbBuilder class Drupal\help core/modules/help/src/HelpBreadcrumbBuilder.php Provides a breadcrumb builder for help topic pages. 2
HelpController class Drupal\help\Controller core/modules/help/src/Controller/HelpController.php Controller routines for help routes.
HelpEmptyPageTest class Drupal\Tests\help\Kernel core/modules/help/tests/src/Kernel/HelpEmptyPageTest.php Tests the empty HTML page.
Helper final class Drupal\admin core/themes/admin/src/Helper.php Admin helper methods. 4
Helper final class Drupal\default_admin core/themes/default_admin/src/Helper.php Admin helper methods. 4
HelpHooks class Drupal\help\Hook core/modules/help/src/Hook/HelpHooks.php Hook implementations for help.
HelpPageOrderTest class Drupal\Tests\help\Functional core/modules/help/tests/src/Functional/HelpPageOrderTest.php Verify the order of the help page. 1
HelpPageReverseOrderTest class Drupal\Tests\help\Functional core/modules/help/tests/src/Functional/HelpPageReverseOrderTest.php Verify the order of the help page with an alter hook.
HelpPageTestController class Drupal\help_page_test core/modules/help/tests/modules/help_page_test/src/HelpPageTestController.php Provides controllers for testing the help block.
HelpPageTestHooks class Drupal\help_page_test\Hook core/modules/help/tests/modules/help_page_test/src/Hook/HelpPageTestHooks.php Hook implementations for help_page_test.
HelpSearch class Drupal\help\Plugin\Search core/modules/help/src/Plugin/Search/HelpSearch.php Handles searching for help using the Search module index. 1
HelpSearchPluginTest class Drupal\Tests\help\Kernel core/modules/help/tests/src/Kernel/HelpSearchPluginTest.php Tests search plugin behaviors.
HelpSection class Drupal\help\Attribute core/modules/help/src/Attribute/HelpSection.php Defines a HelpSection attribute object for plugin discovery. 5
HelpSection class Drupal\help\Annotation core/modules/help/src/Annotation/HelpSection.php Defines a Plugin annotation object for help page section plugins.
HelpSectionManager class Drupal\help core/modules/help/src/HelpSectionManager.php Manages help page section plugins. 2 2
HelpSectionPluginBase abstract class Drupal\help\Plugin\HelpSection core/modules/help/src/Plugin/HelpSection/HelpSectionPluginBase.php Provides a base class for help section plugins. 4 2
HelpSectionPluginInterface interface Drupal\help core/modules/help/src/HelpSectionPluginInterface.php Provides an interface for a plugin for a section of the /admin/help page. 1 1
HelpTest class Drupal\Tests\help\Functional core/modules/help/tests/src/Functional/HelpTest.php Verify help display and user access to help based on permissions.
HelpTestHooks class Drupal\help_test\Hook core/modules/help/tests/modules/help_test/src/Hook/HelpTestHooks.php Hook implementations for help_test.
HelpTestTwigExtension class Drupal\help_topics_twig_tester core/modules/help/tests/modules/help_topics_twig_tester/src/HelpTestTwigExtension.php Defines and registers Drupal Twig extensions for testing help topics. 2
HelpTestTwigNodeVisitor class Drupal\help_topics_twig_tester core/modules/help/tests/modules/help_topics_twig_tester/src/HelpTestTwigNodeVisitor.php Defines a Twig node visitor for testing help topics. 1
HelpThemeHooks class Drupal\help\Hook core/modules/help/src/Hook/HelpThemeHooks.php Hook implementations for help.
HelpTopicDiscovery class Drupal\help core/modules/help/src/HelpTopicDiscovery.php Discovers help topic plugins from Twig files in help_topics directories. 2
HelpTopicDiscoveryTest class Drupal\Tests\help\Unit core/modules/help/tests/src/Unit/HelpTopicDiscoveryTest.php Tests Drupal\help\HelpTopicDiscovery.
HelpTopicPluginBase abstract class Drupal\help core/modules/help/src/HelpTopicPluginBase.php Base class for help topic plugins. 2 1
HelpTopicPluginController class Drupal\help\Controller core/modules/help/src/Controller/HelpTopicPluginController.php Controller for help topic plugins.
HelpTopicPluginInterface interface Drupal\help core/modules/help/src/HelpTopicPluginInterface.php Defines an interface for help topic plugin classes. 1 1
HelpTopicPluginManager class Drupal\help core/modules/help/src/HelpTopicPluginManager.php Provides the default help_topic manager. 2
HelpTopicPluginManagerInterface interface Drupal\help core/modules/help/src/HelpTopicPluginManagerInterface.php Defines an interface for managing help topics and storing their definitions. 1 2
HelpTopicSearchTest class Drupal\Tests\help\Functional core/modules/help/tests/src/Functional/HelpTopicSearchTest.php Verifies help topic search.
HelpTopicSection class Drupal\help\Plugin\HelpSection core/modules/help/src/Plugin/HelpSection/HelpTopicSection.php Provides the help topics list section for the help page.
HelpTopicsSyntaxTest class Drupal\Tests\help\Functional core/modules/help/tests/src/Functional/HelpTopicsSyntaxTest.php Verifies that all core Help topics can be rendered and comply with standards.
HelpTopicsTestController class Drupal\help_topics_test\Controller core/modules/help/tests/modules/help_topics_test/src/Controller/HelpTopicsTestController.php Returns the response for help_topics_test routes.
HelpTopicsTestHooks class Drupal\help_topics_test\Hook core/modules/help/tests/modules/help_topics_test/src/Hook/HelpTopicsTestHooks.php Hook implementations for help_topics_test.
HelpTopicTest class Drupal\Tests\help\Functional core/modules/help/tests/src/Functional/HelpTopicTest.php Verifies help topic display and user access to help based on permissions.
HelpTopicTranslatedTestBase abstract class Drupal\Tests\help\Functional core/modules/help/tests/src/Functional/HelpTopicTranslatedTestBase.php Provides a base class for functional help topic tests that use translation. 2

Other projects


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