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
TextItem class Drupal\text\Plugin\Field\FieldType core/modules/text/src/Plugin/Field/FieldType/TextItem.php Plugin implementation of the 'text' field type. 1
TextItemBase abstract class Drupal\text\Plugin\Field\FieldType core/modules/text/src/Plugin/Field/FieldType/TextItemBase.php Base class for 'text' configurable field types. 3 3
TextItemBaseTest class Drupal\Tests\text\Kernel core/modules/text/tests/src/Kernel/TextItemBaseTest.php Tests TextItemBase.
TextItemSillyNormalizer class Drupal\field_normalization_test\Normalization core/modules/serialization/tests/modules/field_normalization_test/src/Normalization/TextItemSillyNormalizer.php A test TextItem normalizer to test denormalization. 2
TextLongItem class Drupal\text\Plugin\Field\FieldType core/modules/text/src/Plugin/Field/FieldType/TextLongItem.php Plugin implementation of the 'text_long' field type. 1 1
TextProcessed class Drupal\text core/modules/text/src/TextProcessed.php A computed property for processing text with a format. 2
TextProcessedAttachmentsTest class Drupal\Tests\text\Kernel core/modules/text/tests/src/Kernel/TextProcessedAttachmentsTest.php Tests that TextProcessed::getAttachments() bubbles filter attachments.
TextProcessedTest class Drupal\Tests\text\Unit core/modules/text/tests/src/Unit/TextProcessedTest.php Tests TextProcessed with AttachmentsInterface.
TextSummary class Drupal\text core/modules/text/src/TextSummary.php Summary generator for text fields. 4
TextSummaryNodeFieldsTokenTest class Drupal\Tests\text\Functional core/modules/text/tests/src/Functional/TextSummaryNodeFieldsTokenTest.php Tests replacement of Views tokens supplied by the Node module.
TextSummaryOrTrimmedFormatter class Drupal\text\Plugin\Field\FieldFormatter core/modules/text/src/Plugin/Field/FieldFormatter/TextSummaryOrTrimmedFormatter.php Plugin implementation of the 'text_summary_or_trimmed' formatter.
TextSummaryTest class Drupal\Tests\text\Kernel core/modules/text/tests/src/Kernel/TextSummaryTest.php Tests TextSummary::generate() with different strings and lengths.
TextSummaryTestHooks class Drupal\text_summary_test\Hook core/modules/text/tests/modules/text_summary_test/src/Hook/TextSummaryTestHooks.php Hook implementations for text_summary_test.
TextTestHooks class Drupal\text_test\Hook core/modules/text/tests/modules/text_test/src/Hook/TextTestHooks.php Hook implementations for text_test.
TextTrimmedFormatter class Drupal\text\Plugin\Field\FieldFormatter core/modules/text/src/Plugin/Field/FieldFormatter/TextTrimmedFormatter.php Plugin implementation of the 'text_trimmed' formatter. 2 1
TextWithSummaryFileUsageTest class Drupal\Tests\editor\Kernel core/modules/editor/tests/src/Kernel/TextWithSummaryFileUsageTest.php Tests tracking of file usage by the Text Editor module.
TextWithSummaryItem class Drupal\text\Plugin\Field\FieldType core/modules/text/src/Plugin/Field/FieldType/TextWithSummaryItem.php Plugin implementation of the 'text_with_summary' field type.
TextWithSummaryItemTest class Drupal\Tests\text\Kernel core/modules/text/tests/src/Kernel/TextWithSummaryItemTest.php Tests using entity fields of the text summary field type.
TextWithSummaryTokenReplaceTest class Drupal\Tests\node\Kernel core/modules/node/tests/src/Kernel/TextWithSummaryTokenReplaceTest.php Tests node token replacement for text_with_summary.
TextWithSummaryUpdatePathTest class Drupal\Tests\system\Functional\Update core/modules/system/tests/src/Functional/Update/TextWithSummaryUpdatePathTest.php Tests the update path for the removed text_with_summary field type.
Theme class Drupal\Core\Extension core/lib/Drupal/Core/Extension/Theme.php The Theme extension object. 3
ThemeAccessCheck class Drupal\Core\Theme core/lib/Drupal/Core/Theme/ThemeAccessCheck.php Provides access checking for themes for routing and theme negotiation. 2 2
ThemeAdminForm class Drupal\system\Form core/modules/system/src/Form/ThemeAdminForm.php Form to select the administration theme.
ThemeCacheContext class Drupal\Core\Cache\Context core/lib/Drupal/Core/Cache/Context/ThemeCacheContext.php Defines the ThemeCacheContext service, for "per theme" caching. 2
ThemeCommonElements class Drupal\Core\Theme core/lib/Drupal/Core/Theme/ThemeCommonElements.php Provide common theme render elements. 1
ThemeController class Drupal\system\Controller core/modules/system/src/Controller/ThemeController.php Controller for theme handling.
ThemeDeprecationTest class Drupal\Tests\system\Kernel\Theme core/modules/system/tests/src/Kernel/Theme/ThemeDeprecationTest.php Tests theme file extension deprecations.
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. 1 2
ThemeEngineExtensionListTest class Drupal\KernelTests\Core\Extension core/tests/Drupal/KernelTests/Core/Extension/ThemeEngineExtensionListTest.php Tests Drupal\Core\Extension\ThemeEngineExtensionList.
ThemeEngineInterface interface Drupal\Core\Theme core/lib/Drupal/Core/Theme/ThemeEngineInterface.php Defines an interface for a theme engine. 2 2
ThemeEngineTest class Drupal\Tests\system\Kernel\Theme core/modules/system/tests/src/Kernel/Theme/ThemeEngineTest.php Tests theme engine functionality.
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 32 2
ThemeExtensionListTest class Drupal\KernelTests\Core\Extension core/tests/Drupal/KernelTests/Core/Extension/ThemeExtensionListTest.php Tests Drupal\Core\Extension\ThemeExtensionList.
ThemeExtensionListTest class Drupal\Tests\Core\Extension core/tests/Drupal/Tests/Core/Extension/ThemeExtensionListTest.php Tests Drupal\Core\Extension\ThemeExtensionList.
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 62
ThemeHandlerTest class Drupal\Tests\Core\Extension core/tests/Drupal/Tests/Core/Extension/ThemeHandlerTest.php Tests Drupal\Core\Extension\ThemeHandler.
ThemeHookCollectorPass class Drupal\Core\Hook core/lib/Drupal/Core/Hook/ThemeHookCollectorPass.php Collects and registers hook implementations. 2
ThemeHookCollectorPassTest class Drupal\KernelTests\Core\Hook core/tests/Drupal/KernelTests/Core/Hook/ThemeHookCollectorPassTest.php Tests Drupal\Core\Hook\ThemeHookCollectorPass.
ThemeHooks class Drupal\admin\Hook core/themes/admin/src/Hook/ThemeHooks.php Provides theme related hook implementations.
ThemeHooks class Drupal\default_admin\Hook core/themes/default_admin/src/Hook/ThemeHooks.php Provides theme related hook implementations.
ThemeHookTest class Drupal\Tests\system\Kernel\Theme core/modules/system/tests/src/Kernel/Theme/ThemeHookTest.php Tests low-level theme functions.
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 6
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 24

Other projects


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