Classes, traits, and interfaces - 10.3.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 1518

Name Deprecated Object type Namespace File name Summary Direct uses Use statements Strings
ThemeCacheContext class Drupal\Core\Cache\Context core/lib/Drupal/Core/Cache/Context/ThemeCacheContext.php Defines the ThemeCacheContext service, for "per theme" caching. 2
ThemeClass class Drupal\test_theme core/modules/system/tests/themes/test_theme/src/ThemeClass.php Represents a random class, used to test if themes can provide classes.
ThemeController class Drupal\system\Controller core/modules/system/src/Controller/ThemeController.php Controller for theme handling.
ThemeEarlyInitializationTest class Drupal\Tests\system\Functional\Theme core/modules/system/tests/src/Functional/Theme/ThemeEarlyInitializationTest.php Tests theme system initialization early in the page request.
ThemeEngineExtensionList class Drupal\Core\Extension core/lib/Drupal/Core/Extension/ThemeEngineExtensionList.php Provides a list of available theme engines. 2 3 2
ThemeEngineExtensionListTest class Drupal\KernelTests\Core\Extension core/tests/Drupal/KernelTests/Core/Extension/ThemeEngineExtensionListTest.php @coversDefaultClass \Drupal\Core\Extension\ThemeEngineExtensionList[[api-linebreak]] @group Extension
ThemeExperimentalConfirmForm class Drupal\system\Form core/modules/system/src/Form/ThemeExperimentalConfirmForm.php Builds a confirmation form for enabling experimental themes. 1
ThemeExtensionList class Drupal\Core\Extension core/lib/Drupal/Core/Extension/ThemeExtensionList.php Provides a list of available themes. 2 18 2
ThemeExtensionListTest class Drupal\KernelTests\Core\Extension core/tests/Drupal/KernelTests/Core/Extension/ThemeExtensionListTest.php @coversDefaultClass \Drupal\Core\Extension\ThemeExtensionList[[api-linebreak]] @group Extension
ThemeExtensionListTest class Drupal\Tests\Core\Extension core/tests/Drupal/Tests/Core/Extension/ThemeExtensionListTest.php @coversDefaultClass \Drupal\Core\Extension\ThemeExtensionList[[api-linebreak]] @group Extension
ThemeHandler class Drupal\Core\Extension core/lib/Drupal/Core/Extension/ThemeHandler.php Default theme handler using the config system to store installation statuses. 1 1 2
ThemeHandlerInterface interface Drupal\Core\Extension core/lib/Drupal/Core/Extension/ThemeHandlerInterface.php Manages the list of available themes. 1 39
ThemeHandlerTest class Drupal\Tests\Core\Extension core/tests/Drupal/Tests/Core/Extension/ThemeHandlerTest.php @coversDefaultClass \Drupal\Core\Extension\ThemeHandler[[api-linebreak]] @group Extension
ThemeInfoTest class Drupal\Tests\system\Functional\Theme core/modules/system/tests/src/Functional/Theme/ThemeInfoTest.php Tests processing of theme .info.yml properties.
ThemeInitialization class Drupal\Core\Theme core/lib/Drupal/Core/Theme/ThemeInitialization.php Provides the theme initialization logic. 2
ThemeInitializationInterface interface Drupal\Core\Theme core/lib/Drupal/Core/Theme/ThemeInitializationInterface.php Defines an interface which contain theme initialization logic. 1 1
ThemeInstallController class Drupal\nightwatch_theme_install_utility\Controller core/modules/system/tests/modules/nightwatch_theme_install_utility/src/Controller/ThemeInstallController.php Provides an easier way for Nightwatch tests to install themes.
ThemeInstaller class Drupal\Core\Extension core/lib/Drupal/Core/Extension/ThemeInstaller.php Manages theme installation/uninstallation. 2
ThemeInstallerInterface interface Drupal\Core\Extension core/lib/Drupal/Core/Extension/ThemeInstallerInterface.php Manages theme installation/uninstallation. 1 5
ThemeInstallerTest class Drupal\KernelTests\Core\Theme core/tests/Drupal/KernelTests/Core/Theme/ThemeInstallerTest.php Tests installing and uninstalling of themes.
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 25
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[[api-linebreak]] @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[[api-linebreak]] @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\Core\Theme core/lib/Drupal/Core/Theme/ThemeSettings.php Provides a configuration API wrapper for runtime merged theme settings. 1
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\system\Plugin\migrate\source\d7 core/modules/system/src/Plugin/migrate/source/d7/ThemeSettings.php Drupal 7 theme settings source from database.
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\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.
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.
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

Other projects


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