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
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.
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.
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.
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.
TaxonomyTermReference class Drupal\taxonomy\Plugin\migrate\field core/modules/taxonomy/src/Plugin/migrate/field/TaxonomyTermReference.php MigrateField Plugin for Drupal 6 & Drupal 7 taxonomy term reference fields. 1
TaxonomyTermReferenceFieldTest class Drupal\Tests\taxonomy\Unit\Plugin\migrate\field core/modules/taxonomy/tests/src/Unit/Plugin/migrate/field/TaxonomyTermReferenceFieldTest.php @coversDefaultClass \Drupal\taxonomy\Plugin\migrate\field\TaxonomyTermReference[[api-linebreak]] @group taxonomy
TaxonomyTermViewTest class Drupal\Tests\taxonomy\Functional\Views core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTermViewTest.php Tests the taxonomy term view page and its translation.
TaxonomyTestBase abstract class Drupal\Tests\taxonomy\Functional\Views core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTestBase.php Base class for all taxonomy tests. 10 1
TaxonomyTestBase abstract class Drupal\Tests\taxonomy\Kernel\Views core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyTestBase.php Base class for views kernel taxonomy tests. 9
TaxonomyTestBase abstract class Drupal\Tests\taxonomy\Functional core/modules/taxonomy/tests/src/Functional/TaxonomyTestBase.php Provides common helper methods for Taxonomy module tests. 19
TaxonomyTestTrait trait Drupal\Tests\taxonomy\Traits core/modules/taxonomy/tests/src/Traits/TaxonomyTestTrait.php Provides common helper methods for Taxonomy module tests. 23
TaxonomyTranslationTestTrait trait Drupal\Tests\taxonomy\Functional core/modules/taxonomy/tests/src/Functional/TaxonomyTranslationTestTrait.php Provides common testing base for translated taxonomy terms. 1
TaxonomyViewsArgumentTest class Drupal\taxonomy_test\Plugin\views\argument core/modules/taxonomy/tests/modules/taxonomy_test/src/Plugin/views/argument/TaxonomyViewsArgumentTest.php Test argument handler for testing deprecation in Taxonomy argument plugin. 1
TaxonomyViewsFieldAccessTest class Drupal\Tests\taxonomy\Kernel\Views core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyViewsFieldAccessTest.php Tests base field access in Views for the taxonomy entity.
TaxonomyVocabularyArgumentTest class Drupal\Tests\taxonomy\Functional\Views core/modules/taxonomy/tests/src/Functional/Views/TaxonomyVocabularyArgumentTest.php Tests the vocabulary argument.
Tel class Drupal\Core\Render\Element core/lib/Drupal/Core/Render/Element/Tel.php Provides a form element for entering a telephone number.
TelephoneDefaultWidget class Drupal\telephone\Plugin\Field\FieldWidget core/modules/telephone/src/Plugin/Field/FieldWidget/TelephoneDefaultWidget.php Plugin implementation of the 'telephone_default' widget.
TelephoneField class Drupal\telephone\Plugin\migrate\field\d7 core/modules/telephone/src/Plugin/migrate/field/d7/TelephoneField.php #[MigrateField(id: 'telephone', core: [ 7, ], source_module: 'telephone', destination_module: 'telephone')]
TelephoneFieldTest class Drupal\Tests\telephone\Functional core/modules/telephone/tests/src/Functional/TelephoneFieldTest.php Tests the creation of telephone fields.
TelephoneItem class Drupal\telephone\Plugin\Field\FieldType core/modules/telephone/src/Plugin/Field/FieldType/TelephoneItem.php Plugin implementation of the 'telephone' field type. 2
TelephoneItemTest class Drupal\Tests\telephone\Kernel core/modules/telephone/tests/src/Kernel/TelephoneItemTest.php Tests the new entity API for the telephone field type.
TelephoneLinkFormatter class Drupal\telephone\Plugin\Field\FieldFormatter core/modules/telephone/src/Plugin/Field/FieldFormatter/TelephoneLinkFormatter.php Plugin implementation of the 'telephone_link' formatter.
Template class Drupal\Tests\Component\Annotation\Doctrine\Fixtures\Annotation core/tests/Drupal/Tests/Component/Annotation/Doctrine/Fixtures/Annotation/Template.php
TemporaryArrayObjectThrowingExceptions class Drupal\jsonapi\Normalizer\Value core/modules/jsonapi/src/Normalizer/Value/TemporaryArrayObjectThrowingExceptions.php An \ArrayObject that throws an exception when used as an ArrayObject. 1
TemporaryJsonapiFileFieldUploader

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

class Drupal\jsonapi\Controller core/modules/jsonapi/src/Controller/TemporaryJsonapiFileFieldUploader.php Reads data from an upload stream and creates a corresponding file entity.
TemporaryQueryGuard class Drupal\jsonapi\Access core/modules/jsonapi/src/Access/TemporaryQueryGuard.php Adds sufficient access control to collection queries. 1
TemporaryQueryTest class Drupal\Tests\mysql\Kernel\mysql core/modules/mysql/tests/src/Kernel/mysql/TemporaryQueryTest.php Tests the temporary query functionality.
TemporaryQueryTest class Drupal\Tests\sqlite\Kernel\sqlite core/modules/sqlite/tests/src/Kernel/sqlite/TemporaryQueryTest.php Tests the temporary query functionality.
TemporaryQueryTest class Drupal\Tests\pgsql\Kernel\pgsql core/modules/pgsql/tests/src/Kernel/pgsql/TemporaryQueryTest.php Tests the temporary query functionality.
TemporaryQueryTestBase abstract class Drupal\KernelTests\Core\Database core/tests/Drupal/KernelTests/Core/Database/TemporaryQueryTestBase.php Tests the temporary query functionality. 3 3
TemporaryStream class Drupal\Core\StreamWrapper core/lib/Drupal/Core/StreamWrapper/TemporaryStream.php Defines a Drupal temporary (temporary://) stream wrapper class. 2
TempStoreDatabaseTest class Drupal\KernelTests\Core\TempStore core/tests/Drupal/KernelTests/Core/TempStore/TempStoreDatabaseTest.php Tests the temporary object storage system.
TempStoreException class Drupal\Core\TempStore core/lib/Drupal/Core/TempStore/TempStoreException.php Thrown by SharedTempStore and PrivateTempStore if they cannot acquire a lock. 2
TempStoreIdentifierInterface interface Drupal\layout_builder core/modules/layout_builder/src/TempStoreIdentifierInterface.php Provides an interface that allows an object to provide its own tempstore key. 1 1
Term class Drupal\taxonomy\Entity core/modules/taxonomy/src/Entity/Term.php Defines the taxonomy term entity. 61
Term class Drupal\taxonomy\Plugin\migrate\source\d6 core/modules/taxonomy/src/Plugin/migrate/source/d6/Term.php Drupal 6 taxonomy term source from database. 1 1
Term class Drupal\taxonomy\Plugin\migrate\source\d7 core/modules/taxonomy/src/Plugin/migrate/source/d7/Term.php Drupal 7 taxonomy term source from database. 2 1
TermAccessControlHandler class Drupal\taxonomy core/modules/taxonomy/src/TermAccessControlHandler.php Defines the access control handler for the taxonomy term entity type.
TermAccessTest class Drupal\Tests\taxonomy\Functional core/modules/taxonomy/tests/src/Functional/TermAccessTest.php Tests the taxonomy term access permissions.
TermAutocompleteTest class Drupal\Tests\taxonomy\Functional core/modules/taxonomy/tests/src/Functional/TermAutocompleteTest.php Tests the autocomplete implementation of the taxonomy class.
TermBreadcrumbBuilder class Drupal\taxonomy core/modules/taxonomy/src/TermBreadcrumbBuilder.php Provides a custom taxonomy breadcrumb builder that uses the term hierarchy. 2

Other projects


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