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
Tables class Drupal\workspaces\EntityQuery core/modules/workspaces/src/EntityQuery/Tables.php Alters entity queries to use a workspace revision instead of the default one.
Tableselect class Drupal\Core\Render\Element core/lib/Drupal/Core/Render/Element/Tableselect.php Provides a form element for a table with radios or checkboxes in left column. 1
TableSelectTest class Drupal\Tests\Core\Render\Element core/tests/Drupal/Tests/Core/Render/Element/TableSelectTest.php Tests Drupal\Core\Render\Element\Tableselect.
TablesInterface interface Drupal\Core\Entity\Query\Sql core/lib/Drupal/Core/Entity/Query/Sql/TablesInterface.php Adds tables and fields to the SQL entity query. 1
TableSort class Drupal\Core\Utility core/lib/Drupal/Core/Utility/TableSort.php Provides a class for table sorting processing and rendering. 5
TableSortExtender class Drupal\Core\Database\Query core/lib/Drupal/Core/Database/Query/TableSortExtender.php Query extender class for tablesort queries. 1 4
TableSortExtender class Drupal\core_fake\Driver\Database\CoreFakeWithAllCustomClasses core/tests/fixtures/database_drivers/module/core_fake/src/Driver/Database/CoreFakeWithAllCustomClasses/TableSortExtender.php CoreFakeWithAllCustomClasses implementation of \Drupal\Core\Database\Query\TableSortExtender.
TableSortExtenderTest class Drupal\KernelTests\Core\Render\Element core/tests/Drupal/KernelTests/Core/Render/Element/TableSortExtenderTest.php Tests table sorting.
TableTest class Drupal\KernelTests\Core\Render\Element core/tests/Drupal/KernelTests/Core/Render/Element/TableTest.php Tests built-in table theme functions.
TableTest class Drupal\Tests\ckeditor5\FunctionalJavascript core/modules/ckeditor5/tests/src/FunctionalJavascript/TableTest.php For testing the table plugin.
Tag class Drupal\views\Plugin\views\cache core/modules/views/src/Plugin/views/cache/Tag.php Simple caching of query results for Views displays.
TaggedHandlersPass class Drupal\Core\DependencyInjection\Compiler core/lib/Drupal/Core/DependencyInjection/Compiler/TaggedHandlersPass.php Collects services to add/inject them into a consumer service. 2
TaggedHandlersPassTest class Drupal\Tests\Core\DependencyInjection\Compiler core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/TaggedHandlersPassTest.php Tests Drupal\Core\DependencyInjection\Compiler\TaggedHandlersPass.
TaggedWithTest class Drupal\Tests\views\Functional\Wizard core/modules/views/tests/src/Functional/Wizard/TaggedWithTest.php Tests the ability of the views wizard to create views filtered by taxonomy.
TaggingTest class Drupal\KernelTests\Core\Database core/tests/Drupal/KernelTests/Core/Database/TaggingTest.php Tests the tagging capabilities of the Select builder.
Tags class Drupal\Component\Utility core/lib/Drupal/Component/Utility/Tags.php Defines a class that can explode and implode tags. 8
TagsTest class Drupal\Tests\Core\Common core/tests/Drupal/Tests/Core/Common/TagsTest.php Tests explosion and implosion of autocomplete tags.
TagTest class Drupal\Tests\views_ui\Kernel core/modules/views_ui/tests/src/Kernel/TagTest.php Tests the views ui tagging functionality.
Tar

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

class Drupal\Core\Archiver core/lib/Drupal/Core/Archiver/Tar.php Defines an archiver implementation for .tar files. 1 2
Tar class Drupal\system\Plugin\Archiver core/modules/system/src/Plugin/Archiver/Tar.php Defines an archiver implementation for .tar files.
Target final class Drupal\Component\Annotation\Doctrine\Annotation core/lib/Drupal/Component/Annotation/Doctrine/Annotation/Target.php Annotation that can be used to signal to the parser to check the annotation target during the parsing process. 2
TargetBundle

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

class Drupal\taxonomy\Plugin\migrate\process core/modules/taxonomy/src/Plugin/migrate/process/TargetBundle.php Converts a Drupal 6 vocabulary ID to a target bundle array.
TargetIdResolver class Drupal\serialization\EntityResolver core/modules/serialization/src/EntityResolver/TargetIdResolver.php Resolves entities from data that contains an entity target ID. 2
TarTest class Drupal\KernelTests\Core\Archiver core/tests/Drupal/KernelTests/Core/Archiver/TarTest.php Tests Drupal\Core\Archiver\Tar.
Tasks class Drupal\mysqli\Driver\Database\mysqli\Install core/modules/mysqli/src/Driver/Database/mysqli/Install/Tasks.php Specifies installation tasks for MySQLi.
Tasks class Drupal\driver_missing_dependency_test\Driver\Database\MissingDependency\Install core/tests/Drupal/Tests/Core/Database/fixtures/core/modules/driver_missing_dependency_test/src/Driver/Database/MissingDependency/Install/Tasks.php Specifies fake installation tasks for test.
Tasks class Drupal\pgsql\Driver\Database\pgsql\Install core/modules/pgsql/src/Driver/Database/pgsql/Install/Tasks.php Specifies installation tasks for PostgreSQL databases. 1 1
Tasks class Drupal\core_fake\Driver\Database\CoreFake\Install core/tests/fixtures/database_drivers/module/core_fake/src/Driver/Database/CoreFake/Install/Tasks.php Specifies installation tasks for CoreFake.
Tasks class Drupal\core_fake\Driver\Database\CoreFakeWithAllCustomClasses\Install core/tests/fixtures/database_drivers/module/core_fake/src/Driver/Database/CoreFakeWithAllCustomClasses/Install/Tasks.php Specifies installation tasks for CoreFakeWithAllCustomClasses.
Tasks class Drupal\Core\Database\Driver\CoreFake\Install core/tests/fixtures/database_drivers/core/CoreFake/Install/Tasks.php The database installer structure for the fake database driver. 1 1
Tasks class Drupal\Driver\Database\CoreFake\Install core/tests/fixtures/database_drivers/custom/CoreFake/Install/Tasks.php The database installer structure for a custom database driver.
Tasks class Drupal\Driver\Database\fake\Install core/tests/fixtures/database_drivers/custom/fake/Install/Tasks.php A task for testing database drivers.
Tasks abstract class Drupal\Core\Database\Install core/lib/Drupal/Core/Database/Install/Tasks.php Database installer structure. 8 9
Tasks class Drupal\sqlite\Driver\Database\sqlite\Install core/modules/sqlite/src/Driver/Database/sqlite/Install/Tasks.php Specifies installation tasks for SQLite databases. 6
Tasks class Drupal\mysql\Driver\Database\mysql\Install core/modules/mysql/src/Driver/Database/mysql/Install/Tasks.php Specifies installation tasks for MySQL and equivalent databases. 4 5
Tasks class Drupal\dummydb\Driver\Database\dummydb\Install core/modules/system/tests/modules/dummydb/src/Driver/Database/dummydb/Install/Tasks.php Specifies installation tasks for DummyDB test database.
Tasks class Drupal\driver_test\Driver\Database\DriverTestMysql\Install core/modules/system/tests/modules/driver_test/src/Driver/Database/DriverTestMysql/Install/Tasks.php Specifies installation tasks for MySQL test databases.
Tasks class Drupal\driver_test\Driver\Database\DriverTestMysqlDeprecatedVersion\Install core/modules/system/tests/modules/driver_test/src/Driver/Database/DriverTestMysqlDeprecatedVersion/Install/Tasks.php Specifies installation tasks for MySQL test databases.
Tasks class Drupal\driver_test\Driver\Database\DriverTestPgsql\Install core/modules/system/tests/modules/driver_test/src/Driver/Database/DriverTestPgsql/Install/Tasks.php Specifies installation tasks for PostgreSQL databases.
Taxonomy class Drupal\taxonomy\Plugin\views\argument core/modules/taxonomy/src/Plugin/views/argument/Taxonomy.php Argument handler for basic taxonomy tid.
TaxonomyController class Drupal\taxonomy\Controller core/modules/taxonomy/src/Controller/TaxonomyController.php Provides route responses for taxonomy.module.
TaxonomyCrudHooks class Drupal\taxonomy_crud\Hook core/modules/taxonomy/tests/modules/taxonomy_crud/src/Hook/TaxonomyCrudHooks.php Hook implementations for taxonomy_crud.
TaxonomyDefaultArgumentTest class Drupal\Tests\taxonomy\Kernel\Views core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyDefaultArgumentTest.php Tests the representative node relationship for terms.
TaxonomyDefaultArgumentTest class Drupal\Tests\taxonomy\Functional\Views core/modules/taxonomy/tests/src/Functional/Views/TaxonomyDefaultArgumentTest.php Tests the representative node relationship for terms.
TaxonomyFieldAllTermsTest class Drupal\Tests\taxonomy\Functional\Views core/modules/taxonomy/tests/src/Functional/Views/TaxonomyFieldAllTermsTest.php Tests the "All terms" taxonomy term field handler.
TaxonomyFieldAllTermsTest class Drupal\Tests\taxonomy\Kernel\Views core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyFieldAllTermsTest.php Tests the "All terms" taxonomy term field handler.
TaxonomyFieldFilterTest class Drupal\Tests\taxonomy\Functional\Views core/modules/taxonomy/tests/src/Functional/Views/TaxonomyFieldFilterTest.php Tests taxonomy field filters with translations.
TaxonomyFieldHooks class Drupal\taxonomy\Hook core/modules/taxonomy/src/Hook/TaxonomyFieldHooks.php Field and Field UI hook implementations for Taxonomy module.
TaxonomyFieldTidTest class Drupal\Tests\taxonomy\Kernel\Views core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyFieldTidTest.php Tests the taxonomy term TID field handler.
TaxonomyFieldVidTest class Drupal\Tests\taxonomy\Kernel\Views core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyFieldVidTest.php Tests the taxonomy term VID field handler.

Other projects


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