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
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.
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.
TaxonomyGlossaryTest class Drupal\Tests\views\Functional core/modules/views/tests/src/Functional/TaxonomyGlossaryTest.php Tests glossary functionality of taxonomy views.
TaxonomyHooks class Drupal\taxonomy\Hook core/modules/taxonomy/src/Hook/TaxonomyHooks.php Hook implementations for taxonomy.
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.
TaxonomyOverviewOverrideHooks class Drupal\taxonomy_overview_override_test\Hook core/modules/taxonomy/tests/modules/taxonomy_overview_override_test/src/Hook/TaxonomyOverviewOverrideHooks.php Hook implementations for taxonomy_overview_override_test.
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.
TaxonomyRevisionTest class Drupal\Tests\taxonomy\Functional core/modules/taxonomy/tests/src/Functional/TaxonomyRevisionTest.php Tests the new_revision setting of taxonomy vocabularies.
TaxonomyRevisionVersionHistoryTest class Drupal\Tests\taxonomy\Functional core/modules/taxonomy/tests/src/Functional/TaxonomyRevisionVersionHistoryTest.php Taxonomy term version history test.
TaxonomyTerm class Drupal\taxonomy\Plugin\views\wizard core/modules/taxonomy/src/Plugin/views/wizard/TaxonomyTerm.php Tests creating taxonomy views with the wizard.
TaxonomyTermArgumentDepthTest class Drupal\Tests\taxonomy\Kernel\Views core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyTermArgumentDepthTest.php Test the taxonomy term with depth argument.
TaxonomyTermArgumentDepthTest class Drupal\Tests\taxonomy\Functional\Views core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTermArgumentDepthTest.php Tests the taxonomy term with depth argument.
TaxonomyTermArgumentTidFromNodeTest class Drupal\Tests\taxonomy\Functional\Views core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTermArgumentTidFromNodeTest.php Tests the taxonomy term with argument from a node page.
TaxonomyTermContentModerationTest class Drupal\Tests\taxonomy\Functional core/modules/taxonomy/tests/src/Functional/TaxonomyTermContentModerationTest.php Tests taxonomy terms with Content Moderation.
TaxonomyTermDeriverTest class Drupal\Tests\taxonomy\Kernel\Migrate core/modules/taxonomy/tests/src/Kernel/Migrate/TaxonomyTermDeriverTest.php Tests d7 taxonomy term deriver.
TaxonomyTermDisplayConfigurableTestHooks class Drupal\taxonomy_term_display_configurable_test\Hook core/modules/taxonomy/tests/modules/taxonomy_term_display_configurable_test/src/Hook/TaxonomyTermDisplayConfigurableTestHooks.php Hook implementations for taxonomy_term_display_configurable_test.
TaxonomyTermFilterDepthTest class Drupal\Tests\taxonomy\Kernel\Views core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyTermFilterDepthTest.php Test the taxonomy term with depth filter.
TaxonomyTermHierarchyConstraint class Drupal\taxonomy\Plugin\Validation\Constraint core/modules/taxonomy/src/Plugin/Validation/Constraint/TaxonomyTermHierarchyConstraint.php Validation constraint for changing the term hierarchy in pending revisions.
TaxonomyTermHierarchyConstraintValidator class Drupal\taxonomy\Plugin\Validation\Constraint core/modules/taxonomy/src/Plugin/Validation/Constraint/TaxonomyTermHierarchyConstraintValidator.php Constraint validator for changing term parents in pending revisions. 1
TaxonomyTermIndentationTest class Drupal\Tests\taxonomy\Functional core/modules/taxonomy/tests/src/Functional/TaxonomyTermIndentationTest.php Ensure that the term indentation works properly.
TaxonomyTermModerationHandler class Drupal\content_moderation\Entity\Handler core/modules/content_moderation/src/Entity/Handler/TaxonomyTermModerationHandler.php Customizations for taxonomy term entities. 1
TaxonomyTermPagerTest class Drupal\Tests\taxonomy\Functional core/modules/taxonomy/tests/src/Functional/TaxonomyTermPagerTest.php Ensures that the term pager works properly.
TaxonomyTermPageVariableDeprecationTest class Drupal\Tests\taxonomy\Functional core/modules/taxonomy/tests/src/Functional/TaxonomyTermPageVariableDeprecationTest.php Tests page variable deprecation.

Other projects


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