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
HelpSearchPluginTest class Drupal\Tests\help_topics\Kernel core/modules/help_topics/tests/src/Kernel/HelpSearchPluginTest.php Tests search plugin behaviors.
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. 1 3 2
HelpSectionManager class Drupal\help_topics core/modules/help_topics/src/HelpSectionManager.php Decorates the Help Section plugin manager to provide help topic search. 2
HelpSectionPluginBase abstract class Drupal\help\Plugin\HelpSection core/modules/help/src/Plugin/HelpSection/HelpSectionPluginBase.php Provides a base class for help section plugins. 5 4
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.
HelpTestTwigExtension class Drupal\help_topics_twig_tester core/modules/help_topics/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_topics/tests/modules/help_topics_twig_tester/src/HelpTestTwigNodeVisitor.php Defines a Twig node visitor for testing help topics. 1
HelpTopicDiscovery class Drupal\help_topics core/modules/help_topics/src/HelpTopicDiscovery.php Discovers help topic plugins from Twig files in help_topics directories. 2
HelpTopicDiscoveryTest class Drupal\Tests\help_topics\Unit core/modules/help_topics/tests/src/Unit/HelpTopicDiscoveryTest.php @coversDefaultClass \Drupal\help_topics\HelpTopicDiscovery[[api-linebreak]] @group help_topics
HelpTopicPluginBase abstract class Drupal\help_topics core/modules/help_topics/src/HelpTopicPluginBase.php Base class for help topic plugins. 2 1
HelpTopicPluginController class Drupal\help_topics\Controller core/modules/help_topics/src/Controller/HelpTopicPluginController.php Controller for help topic plugins.
HelpTopicPluginInterface interface Drupal\help_topics core/modules/help_topics/src/HelpTopicPluginInterface.php Defines an interface for help topic plugin classes. 1 1
HelpTopicPluginManager class Drupal\help_topics core/modules/help_topics/src/HelpTopicPluginManager.php Provides the default help_topic manager. 2
HelpTopicPluginManagerInterface interface Drupal\help_topics core/modules/help_topics/src/HelpTopicPluginManagerInterface.php Defines an interface for managing help topics and storing their definitions. 1 2
HelpTopicSearchTest class Drupal\Tests\help_topics\Functional core/modules/help_topics/tests/src/Functional/HelpTopicSearchTest.php Verifies help topic search.
HelpTopicSection class Drupal\help_topics\Plugin\HelpSection core/modules/help_topics/src/Plugin/HelpSection/HelpTopicSection.php Provides the help topics list section for the help page.
HelpTopicsSyntaxTest class Drupal\Tests\help_topics\Functional core/modules/help_topics/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_topics/tests/modules/help_topics_test/src/Controller/HelpTopicsTestController.php Returns the response for help_topics_test routes.
HelpTopicTest class Drupal\Tests\help_topics\Functional core/modules/help_topics/tests/src/Functional/HelpTopicTest.php Verifies help topic display and user access to help based on permissions.
HelpTopicTranslatedTestBase abstract class Drupal\Tests\help_topics\Functional core/modules/help_topics/tests/src/Functional/HelpTopicTranslatedTestBase.php Provides a base class for functional help topic tests that use translation. 2
HelpTopicTranslationTest class Drupal\Tests\help_topics\Functional core/modules/help_topics/tests/src/Functional/HelpTopicTranslationTest.php Verifies help topic translations.
HelpTopicTwig class Drupal\help_topics core/modules/help_topics/src/HelpTopicTwig.php Represents a help topic plugin whose definition comes from a Twig file. 2
HelpTopicTwigLoader class Drupal\help_topics core/modules/help_topics/src/HelpTopicTwigLoader.php Loads help topic Twig files from the filesystem. 1 2
HelpTopicTwigLoaderTest class Drupal\Tests\help_topics\Unit core/modules/help_topics/tests/src/Unit/HelpTopicTwigLoaderTest.php Unit test for the HelpTopicTwigLoader class.
HelpTopicTwigTest class Drupal\Tests\help_topics\Unit core/modules/help_topics/tests/src/Unit/HelpTopicTwigTest.php Unit test for the HelpTopicTwig class.
HelpTwigExtension class Drupal\help_topics core/modules/help_topics/src/HelpTwigExtension.php Defines and registers Drupal Twig extensions for rendering help topics. 2
Hidden class Drupal\Core\Render\Element core/lib/Drupal/Core/Render/Element/Hidden.php Provides a form element for an HTML 'hidden' input element. 1
HiddenFieldSelector class Drupal\Tests core/tests/Drupal/Tests/HiddenFieldSelector.php Extends PartialNamedSelector to allow retrieval of hidden fields.
HiddenTaxonomyTermReferenceFieldWizardTest class Drupal\Tests\node\Functional\Views\Wizard core/modules/node/tests/src/Functional/Views/Wizard/HiddenTaxonomyTermReferenceFieldWizardTest.php Tests node wizard and content type with hidden Taxonomy Term Reference field.
HiddenTestItem class Drupal\field_test\Plugin\Field\FieldType core/modules/field/tests/modules/field_test/src/Plugin/Field/FieldType/HiddenTestItem.php Defines the 'hidden_test' entity field item.
HighestIdInterface interface Drupal\migrate\Audit core/modules/migrate/src/Audit/HighestIdInterface.php Defines an interface for destination and ID maps which track a highest ID. 2 2
HighlightCommand class Drupal\views\Ajax core/modules/views/src/Ajax/HighlightCommand.php Provides an AJAX command for highlighting a certain new piece of html. 1
HighPriorityThemeNegotiator class Drupal\theme_test\Theme core/modules/system/tests/modules/theme_test/src/Theme/HighPriorityThemeNegotiator.php Implements a test theme negotiator which was configured with a high priority. 2
HighWaterNotJoinableTest class Drupal\Tests\migrate\Kernel core/modules/migrate/tests/src/Kernel/HighWaterNotJoinableTest.php Tests the high water handling.
HighWaterTest class Drupal\Tests\migrate\Kernel core/modules/migrate/tests/src/Kernel/HighWaterTest.php Tests migration high water property.
HighWaterTest class Drupal\migrate_high_water_test\Plugin\migrate\source core/modules/migrate/tests/modules/migrate_high_water_test/src/Plugin/migrate/source/HighWaterTest.php Source plugin for migration high water tests.
HistoryController class Drupal\history\Controller core/modules/history/src/Controller/HistoryController.php Returns responses for History module routes.
HistoryRenderCallback class Drupal\history core/modules/history/src/HistoryRenderCallback.php Render callback object.
HistoryTest class Drupal\Tests\history\Functional core/modules/history/tests/src/Functional/HistoryTest.php Tests the History endpoints.
HistoryTimestampTest class Drupal\Tests\history\Kernel\Views core/modules/history/tests/src/Kernel/Views/HistoryTimestampTest.php Tests the history timestamp handlers.
HistoryUserTimestamp class Drupal\history\Plugin\views\field core/modules/history/src/Plugin/views/field/HistoryUserTimestamp.php Field handler to display the marker for new content.
HistoryUserTimestamp class Drupal\history\Plugin\views\filter core/modules/history/src/Plugin/views/filter/HistoryUserTimestamp.php Filter for new content.
HoldTestSubscriber class Drupal\hold_test\EventSubscriber core/modules/system/tests/modules/hold_test/src/EventSubscriber/HoldTestSubscriber.php Response subscriber to test hold. 1 2
HookDiscovery class Drupal\Core\Plugin\Discovery core/lib/Drupal/Core/Plugin/Discovery/HookDiscovery.php Provides a hook-based plugin discovery class. 1
HookDiscoveryTest class Drupal\Tests\Core\Plugin\Discovery core/tests/Drupal/Tests/Core/Plugin/Discovery/HookDiscoveryTest.php @coversDefaultClass \Drupal\Core\Plugin\Discovery\HookDiscovery[[api-linebreak]] @group Plugin
HookHelpSection class Drupal\help\Plugin\HelpSection core/modules/help/src/Plugin/HelpSection/HookHelpSection.php Provides the module topics list section for the help page.
HookRequirementsTest class Drupal\Tests\system\Functional\Module core/modules/system/tests/src/Functional/Module/HookRequirementsTest.php Attempts enabling a module that fails hook_requirements('install').
HtaccessTest class Drupal\Tests\system\Functional\System core/modules/system/tests/src/Functional/System/HtaccessTest.php Tests .htaccess is working correctly.

Other projects


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