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
Tags class Drupal\Component\Utility core/lib/Drupal/Component/Utility/Tags.php Defines a class that can explode and implode tags. 10
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 class Drupal\system\Plugin\Archiver core/modules/system/src/Plugin/Archiver/Tar.php Defines an archiver implementation for .tar files.
Tar class Drupal\Core\Archiver core/lib/Drupal/Core/Archiver/Tar.php Defines an archiver implementation for .tar files. 1 3
TargetBundle 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 @coversDefaultClass \Drupal\Core\Archiver\Tar[[api-linebreak]] @group tar
Tasks

in drupal:9.4.0 and is removed from drupal:11.0.0. The SQLite database driver has been moved to the sqlite module.

class Drupal\Core\Database\Driver\sqlite\Install core/lib/Drupal/Core/Database/Driver/sqlite/Install/Tasks.php Specifies installation tasks for SQLite databases. 1
Tasks

in drupal:9.4.0 and is removed from drupal:11.0.0. The MySQL database driver has been moved to the mysql module.

class Drupal\Core\Database\Driver\mysql\Install core/lib/Drupal/Core/Database/Driver/mysql/Install/Tasks.php Specifies installation tasks for MySQL and equivalent databases. 1
Tasks

in drupal:9.4.0 and is removed from drupal:11.0.0. The PostgreSQL database driver has been moved to the pgsql module.

class Drupal\Core\Database\Driver\pgsql\Install core/lib/Drupal/Core/Database/Driver/pgsql/Install/Tasks.php Specifies installation tasks for PostgreSQL databases. 1
Tasks abstract class Drupal\Core\Database\Install core/lib/Drupal/Core/Database/Install/Tasks.php Database installer structure. 8 9
Tasks class Drupal\Core\Database\Driver\CoreFake\Install core/tests/fixtures/database_drivers/core/CoreFake/Install/Tasks.php 1 1
Tasks class Drupal\Driver\Database\CoreFake\Install core/tests/fixtures/database_drivers/custom/CoreFake/Install/Tasks.php 1
Tasks class Drupal\Driver\Database\fake\Install core/tests/fixtures/database_drivers/custom/fake/Install/Tasks.php 1
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\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\mysql\Driver\Database\mysql\Install core/modules/mysql/src/Driver/Database/mysql/Install/Tasks.php Specifies installation tasks for MySQL and equivalent databases. 4 6
Tasks class Drupal\sqlite\Driver\Database\sqlite\Install core/modules/sqlite/src/Driver/Database/sqlite/Install/Tasks.php Specifies installation tasks for SQLite databases. 2 6
Tasks class Drupal\pgsql\Driver\Database\pgsql\Install core/modules/pgsql/src/Driver/Database/pgsql/Install/Tasks.php Specifies installation tasks for PostgreSQL databases. 3 3
Tasks

in drupal:10.1.0 and is removed from drupal:11.0.0. There is no replacement.

class Drupal\database_statement_monitoring_test\sqlite\Install core/modules/system/tests/modules/database_statement_monitoring_test/src/sqlite/Install/Tasks.php
Tasks

in drupal:10.1.0 and is removed from drupal:11.0.0. There is no replacement.

class Drupal\database_statement_monitoring_test\mysql\Install core/modules/system/tests/modules/database_statement_monitoring_test/src/mysql/Install/Tasks.php
Tasks

in drupal:10.1.0 and is removed from drupal:11.0.0. There is no replacement.

class Drupal\database_statement_monitoring_test\pgsql\Install core/modules/system/tests/modules/database_statement_monitoring_test/src/pgsql/Install/Tasks.php
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. 1
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. 1 1
TaxonomyController class Drupal\taxonomy\Controller core/modules/taxonomy/src/Controller/TaxonomyController.php Provides route responses for taxonomy.module.
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.
TaxonomyFieldFilterTest class Drupal\Tests\taxonomy\Functional\Views core/modules/taxonomy/tests/src/Functional/Views/TaxonomyFieldFilterTest.php Tests taxonomy field filters with translations.
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.
TaxonomyGlossaryTest class Drupal\Tests\views\Functional core/modules/views/tests/src/Functional/TaxonomyGlossaryTest.php Tests glossary functionality of taxonomy views.
TaxonomyImageTest class Drupal\Tests\taxonomy\Functional core/modules/taxonomy/tests/src/Functional/TaxonomyImageTest.php Tests image upload on taxonomy terms.
TaxonomyIndexDepthQueryTrait trait Drupal\taxonomy core/modules/taxonomy/src/TaxonomyIndexDepthQueryTrait.php Builds a performant depth subquery and adds it as a join to the query. 2
TaxonomyIndexTid class Drupal\taxonomy\Plugin\views\field core/modules/taxonomy/src/Plugin/views/field/TaxonomyIndexTid.php Field handler to display all taxonomy terms of a node.
TaxonomyIndexTid class Drupal\taxonomy\Plugin\views\filter core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php Filter by term id. 1
TaxonomyIndexTidDepth class Drupal\taxonomy\Plugin\views\filter core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTidDepth.php Filter handler for taxonomy terms with depth.
TaxonomyIndexTidFilterTest class Drupal\Tests\taxonomy\Kernel\Views core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyIndexTidFilterTest.php Test the taxonomy term index filter.
TaxonomyIndexTidUiTest class Drupal\Tests\taxonomy\Functional\Views core/modules/taxonomy/tests/src/Functional/Views/TaxonomyIndexTidUiTest.php Tests the taxonomy index filter handler UI.
TaxonomyLocalTasksTest class Drupal\Tests\taxonomy\Unit\Menu core/modules/taxonomy/tests/src/Unit/Menu/TaxonomyLocalTasksTest.php Tests existence of taxonomy local tasks.
TaxonomyParentUITest class Drupal\Tests\taxonomy\Functional\Views core/modules/taxonomy/tests/src/Functional/Views/TaxonomyParentUITest.php Tests views taxonomy parent plugin UI.
TaxonomyPermissions class Drupal\taxonomy core/modules/taxonomy/src/TaxonomyPermissions.php Provides dynamic permissions of the taxonomy module.
TaxonomyQueryAlterTest class Drupal\Tests\taxonomy\Kernel core/modules/taxonomy/tests/src/Kernel/TaxonomyQueryAlterTest.php Tests that appropriate query tags are added.
TaxonomyRelationshipTest class Drupal\Tests\taxonomy\Functional\Views core/modules/taxonomy/tests/src/Functional/Views/TaxonomyRelationshipTest.php Tests taxonomy relationships with parent term and node.
TaxonomyRevisionDeleteTest class Drupal\Tests\taxonomy\Functional core/modules/taxonomy/tests/src/Functional/TaxonomyRevisionDeleteTest.php Taxonomy term revision delete form test.
TaxonomyRevisionRevertTest class Drupal\Tests\taxonomy\Functional core/modules/taxonomy/tests/src/Functional/TaxonomyRevisionRevertTest.php Taxonomy term revision form test.

Other projects


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