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
ThemeInstallerTest class Drupal\KernelTests\Core\Theme core/tests/Drupal/KernelTests/Core/Theme/ThemeInstallerTest.php Tests installing and uninstalling of themes.
ThemeLocalTask class Drupal\block\Plugin\Derivative core/modules/block/src/Plugin/Derivative/ThemeLocalTask.php Provides dynamic tabs based on active themes. 1
ThemeLocalTask class Drupal\system\Plugin\Derivative core/modules/system/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 46
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. 11 9
ThemeNegotiatorTest class Drupal\Tests\Core\Theme core/tests/Drupal/Tests/Core/Theme/ThemeNegotiatorTest.php Tests Drupal\Core\Theme\ThemeNegotiator.
ThemePageTestHooks class Drupal\theme_page_test\Hook core/modules/system/tests/modules/theme_page_test/src/Hook/ThemePageTestHooks.php Hook implementations for theme_page_test.
ThemePreprocess class Drupal\Core\Theme core/lib/Drupal/Core/Theme/ThemePreprocess.php Preprocess for common/core theme templates. 2 2
ThemeProceduralTest class Drupal\Tests\system\Functional\Theme core/modules/system/tests/src/Functional/Theme/ThemeProceduralTest.php Tests low-level theme functions.
ThemeRegionTest class Drupal\KernelTests\Core\Theme core/tests/Drupal/KernelTests/Core/Theme/ThemeRegionTest.php Tests theme region listing.
ThemeRegionTestThemeHooks class Drupal\theme_region_test\Hook core/modules/system/tests/modules/theme_region_test/src/Hook/ThemeRegionTestThemeHooks.php Hook implementations for theme_region_test.
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 Tests Drupal\Core\Template\Loader\ThemeRegistryLoader.
ThemeSettings

in drupal:11.3.0 and is removed from drupal:12.0.0. There is no replacement.

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\system\Plugin\migrate\source\d7 core/modules/system/src/Plugin/migrate/source/d7/ThemeSettings.php Drupal 7 theme settings source from database. 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.
ThemeSettingsProvider class Drupal\Core\Extension core/lib/Drupal/Core/Extension/ThemeSettingsProvider.php Default implementation of the theme settings provider service. 20
ThemeSettingsTest class Drupal\KernelTests\Core\Theme core/tests/Drupal/KernelTests/Core/Theme/ThemeSettingsTest.php Tests theme settings functionality.
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.
ThemeStream final class Drupal\Core\StreamWrapper core/lib/Drupal/Core/StreamWrapper/ThemeStream.php Defines the read-only theme:// stream wrapper for theme files. 1 2
ThemeSuggestionHooks class Drupal\admin\Hook core/themes/admin/src/Hook/ThemeSuggestionHooks.php Provides theme suggestion hook implementations.
ThemeSuggestionHooks class Drupal\default_admin\Hook core/themes/default_admin/src/Hook/ThemeSuggestionHooks.php Provides theme suggestion hook implementations.
ThemeSuggestionsAlterTest class Drupal\Tests\system\Functional\Theme core/modules/system/tests/src/Functional/Theme/ThemeSuggestionsAlterTest.php Tests theme suggestion alter hooks.
ThemeSuggestionsTestHooks class Drupal\theme_suggestions_test\Hook core/modules/system/tests/modules/theme_suggestions_test/src/Hook/ThemeSuggestionsTestHooks.php Hook implementations for theme_suggestions_test.
ThemeTest class Drupal\Tests\system\Kernel\Theme core/modules/system/tests/src/Kernel/Theme/ThemeTest.php Tests low-level theme functions.
ThemeTest class Drupal\Tests\system\Functional\System core/modules/system/tests/src/Functional/System/ThemeTest.php Tests the theme administration user interface.
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.
ThemeTestController class Drupal\theme_test core/modules/system/tests/modules/theme_test/src/ThemeTestController.php Controller routines for theme test routes.
ThemeTestHooks class Drupal\theme_test\Hook core/modules/system/tests/modules/theme_test/src/Hook/ThemeTestHooks.php Hook implementations for theme_test. 1
ThemeTestPreprocess class Drupal\theme_test core/modules/system/tests/modules/theme_test/src/ThemeTestPreprocess.php Class to test preprocess callbacks.
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.
ThemeUninstallConfirmForm class Drupal\system\Form core/modules/system/src/Form/ThemeUninstallConfirmForm.php Builds a confirmation form to uninstall a theme. 1
ThemeUninstallConfirmTest class Drupal\Tests\system\Functional\Theme core/modules/system/tests/src/Functional/Theme/ThemeUninstallConfirmTest.php Tests the theme uninstall confirmation form.
ThemeUpdateTest class Drupal\Tests\system\Functional\Theme core/modules/system/tests/src/Functional/Theme/ThemeUpdateTest.php Tests low-level theme functions.
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
ThirdPartyUninstallTest class Drupal\Tests\views\Kernel core/modules/views/tests/src/Kernel/ThirdPartyUninstallTest.php Tests proper removal of third-party settings from views.
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\views\Plugin\views\cache core/modules/views/src/Plugin/views/cache/Time.php Simple caching of query results for Views displays. 1

Other projects


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