You are here

Classes, traits, and interfaces in Drupal 9

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
ThemeLocalTask class Drupal\system\Plugin\Derivative core/modules/system/src/Plugin/Derivative/ThemeLocalTask.php Provides dynamic tabs based on active themes. 1
ThemeLocalTask class Drupal\block\Plugin\Derivative core/modules/block/src/Plugin/Derivative/ThemeLocalTask.php Provides dynamic tabs based on active themes. 1
ThemeManager class Drupal\Core\Theme core/lib/Drupal/Core/Theme/ThemeManager.php Provides the default implementation of a theme manager. 2
ThemeManagerInterface interface Drupal\Core\Theme core/lib/Drupal/Core/Theme/ThemeManagerInterface.php Provides a high level access to the active theme and methods to use it. 1 18
ThemeNegotiator class Drupal\Core\Theme core/lib/Drupal/Core/Theme/ThemeNegotiator.php Provides a class which determines the active theme of the page. 1 2
ThemeNegotiatorInterface interface Drupal\Core\Theme core/lib/Drupal/Core/Theme/ThemeNegotiatorInterface.php Defines an interface for classes which determine the active theme. 10 8
ThemeNegotiatorTest class Drupal\Tests\Core\Theme core/tests/Drupal/Tests/Core/Theme/ThemeNegotiatorTest.php @coversDefaultClass \Drupal\Core\Theme\ThemeNegotiator @group Theme
ThemeRegistry class Drupal\Core\Utility core/lib/Drupal/Core/Utility/ThemeRegistry.php Builds the run-time theme registry. 2
ThemeRegistryLoader class Drupal\Core\Template\Loader core/lib/Drupal/Core/Template/Loader/ThemeRegistryLoader.php Loads templates based on information from the Drupal theme registry. 1 2
ThemeRegistryLoaderTest class Drupal\Tests\Core\Template\Loader core/tests/Drupal/Tests/Core/Template/Loader/ThemeRegistryLoaderTest.php @coversDefaultClass \Drupal\Core\Template\Loader\ThemeRegistryLoader @group Template
ThemeRenderAndAutoescapeTest class Drupal\KernelTests\Core\Theme core/tests/Drupal/KernelTests/Core/Theme/ThemeRenderAndAutoescapeTest.php Tests the theme_render_and_autoescape() function.
ThemeSettings class Drupal\system\Plugin\migrate\source\d7 core/modules/system/src/Plugin/migrate/source/d7/ThemeSettings.php Drupal 7 theme settings source from database.
ThemeSettings class Drupal\system\Plugin\migrate\destination\d7 core/modules/system/src/Plugin/migrate/destination/d7/ThemeSettings.php Persist theme settings to the config system. 1
ThemeSettings class Drupal\Core\Theme core/lib/Drupal/Core/Theme/ThemeSettings.php Provides a configuration API wrapper for runtime merged theme settings. 1
ThemeSettingsForm class Drupal\system\Form core/modules/system/src/Form/ThemeSettingsForm.php Displays theme configuration for entire site and individual themes. 1
ThemeSettingsFormTest class Drupal\Tests\system\FunctionalJavascript core/modules/system/tests/src/FunctionalJavascript/ThemeSettingsFormTest.php Tests that theme form settings works correctly.
ThemeSettingsTest class Drupal\Tests\system\Kernel\Plugin\migrate\source\d7 core/modules/system/tests/src/Kernel/Plugin/migrate/source/d7/ThemeSettingsTest.php Tests D7 theme settings source plugin.
ThemeSettingsTest class Drupal\KernelTests\Core\Theme core/tests/Drupal/KernelTests/Core/Theme/ThemeSettingsTest.php Tests theme settings functionality.
ThemeSuggestionsAlterTest class Drupal\Tests\system\Functional\Theme core/modules/system/tests/src/Functional/Theme/ThemeSuggestionsAlterTest.php Tests theme suggestion alter hooks.
ThemeTest class Drupal\Tests\system\Functional\System core/modules/system/tests/src/Functional/System/ThemeTest.php Tests the theme interface functionality by enabling and switching themes, and using an administration theme.
ThemeTest class Drupal\Tests\system\Functional\Theme core/modules/system/tests/src/Functional/Theme/ThemeTest.php Tests low-level theme functions.
ThemeTest class Drupal\Tests\taxonomy\Functional core/modules/taxonomy/tests/src/Functional/ThemeTest.php Verifies that various taxonomy pages use the expected theme.
ThemeTest class Drupal\Tests\system\Kernel\Theme core/modules/system/tests/src/Kernel/Theme/ThemeTest.php Tests low-level theme functions.
ThemeTestController class Drupal\theme_legacy_test core/modules/system/tests/modules/theme_legacy_test/src/ThemeTestController.php Controller routines for test routes for legacy theme functions.
ThemeTestController class Drupal\theme_test core/modules/system/tests/modules/theme_test/src/ThemeTestController.php Controller routines for theme test routes.
ThemeTestSubscriber class Drupal\theme_test\EventSubscriber core/modules/system/tests/modules/theme_test/src/EventSubscriber/ThemeTestSubscriber.php Theme test subscriber for controller requests. 2
ThemeTokenTest class Drupal\Tests\system\Functional\Theme core/modules/system/tests/src/Functional/Theme/ThemeTokenTest.php Tests the generation of 'theme_token' key in Drupal settings.
ThemeUiTest class Drupal\Tests\system\Functional\Theme core/modules/system/tests/src/Functional/Theme/ThemeUiTest.php Tests the theme UI.
ThirdPartySettingsInterface interface Drupal\Core\Config\Entity core/lib/Drupal/Core/Config/Entity/ThirdPartySettingsInterface.php Interface for configuration entities to store third party information. 4 5
Thread class Drupal\comment\Plugin\views\sort core/modules/comment/src/Plugin/views/sort/Thread.php Sort handler for ordering by thread.
ThreeColumnLayout class Drupal\layout_builder\Plugin\Layout core/modules/layout_builder/src/Plugin/Layout/ThreeColumnLayout.php Configurable three column layout plugin class. 1
ThrobberTest class Drupal\FunctionalJavascriptTests\Ajax core/tests/Drupal/FunctionalJavascriptTests/Ajax/ThrobberTest.php Tests the throbber.
ThumbnailDownloader class Drupal\media\Plugin\QueueWorker core/modules/media/src/Plugin/QueueWorker/ThumbnailDownloader.php Process a queue of media items to fetch their thumbnails.
Tid class Drupal\taxonomy\Plugin\views\argument_default core/modules/taxonomy/src/Plugin/views/argument_default/Tid.php Taxonomy tid default argument.
Time class Drupal\Component\Datetime core/lib/Drupal/Component/Datetime/Time.php Provides a class for obtaining system time. 1 2 2
Time class Drupal\views\Plugin\views\cache core/modules/views/src/Plugin/views/cache/Time.php Simple caching of query results for Views displays. 1
TimeInterface interface Drupal\Component\Datetime core/lib/Drupal/Component/Datetime/TimeInterface.php Defines an interface for obtaining system time. 1 18
TimeInterval class Drupal\views\Plugin\views\field core/modules/views/src/Plugin/views/field/TimeInterval.php A handler to provide proper displays for time intervals.
Timer class Drupal\Component\Utility core/lib/Drupal/Component/Utility/Timer.php Provides helpers to use timers throughout a request. 4
TimerTest class Drupal\Tests\Component\Utility core/tests/Drupal/Tests/Component/Utility/TimerTest.php Tests the Timer system.
TimeSpan class Drupal\Core\TypedData\Plugin\DataType core/lib/Drupal/Core/TypedData/Plugin/DataType/TimeSpan.php The time span data type represents durations as number of seconds.
Timestamp class Drupal\Core\TypedData\Plugin\DataType core/lib/Drupal/Core/TypedData/Plugin/DataType/Timestamp.php The timestamp data type. 5 1
TimestampAgoFormatter class Drupal\Core\Field\Plugin\Field\FieldFormatter core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/TimestampAgoFormatter.php Plugin implementation of the 'timestamp' formatter as time ago. 1 1
TimestampAgoFormatterTest class Drupal\FunctionalTests\Datetime core/tests/Drupal/FunctionalTests/Datetime/TimestampAgoFormatterTest.php Tests the functionality of TimestampAgoFormatter core field formatter.
TimestampDatetimeWidget class Drupal\Core\Datetime\Plugin\Field\FieldWidget core/lib/Drupal/Core/Datetime/Plugin/Field/FieldWidget/TimestampDatetimeWidget.php Plugin implementation of the 'datetime timestamp' widget.
TimestampFormatter class Drupal\Core\Field\Plugin\Field\FieldFormatter core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/TimestampFormatter.php Plugin implementation of the 'timestamp' formatter.
TimestampFormatterTest class Drupal\Tests\field\Kernel\Timestamp core/modules/field/tests/src/Kernel/Timestamp/TimestampFormatterTest.php Tests the timestamp formatters.
TimestampItem class Drupal\Core\Field\Plugin\Field\FieldType core/lib/Drupal/Core/Field/Plugin/Field/FieldType/TimestampItem.php Defines the 'timestamp' entity field type. 1 4
TimestampItemNormalizer class Drupal\serialization\Normalizer core/modules/serialization/src/Normalizer/TimestampItemNormalizer.php Converts values for TimestampItem to and from common formats. 1 2
TimestampItemNormalizer class Drupal\hal\Normalizer core/modules/hal/src/Normalizer/TimestampItemNormalizer.php Converts values for TimestampItem to and from common formats for hal. 2

Pages

Other projects