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
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
TemplateProjectTestBase abstract class Drupal\Tests\package_manager\Build core/modules/package_manager/tests/src/Build/TemplateProjectTestBase.php Base class for tests which create a test site from a core project template. 4
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
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. 1 1
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\mysqli\Kernel\mysqli core/modules/mysqli/tests/src/Kernel/mysqli/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\Plugin\migrate\source\d6 core/modules/taxonomy/src/Plugin/migrate/source/d6/Term.php Drupal 6 taxonomy term source from database. 1 3
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 2
Term class Drupal\taxonomy\Entity core/modules/taxonomy/src/Entity/Term.php Defines the taxonomy term entity. 56
TermAccessControlHandler class Drupal\taxonomy core/modules/taxonomy/src/TermAccessControlHandler.php Defines the access control handler for the taxonomy term entity type. 1
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
TermCacheTagsTest class Drupal\Tests\taxonomy\Functional core/modules/taxonomy/tests/src/Functional/TermCacheTagsTest.php Tests the Taxonomy term entity's cache tags.
TermContextTest class Drupal\Tests\taxonomy\Kernel\ContextProvider core/modules/taxonomy/tests/src/Kernel/ContextProvider/TermContextTest.php Tests Drupal\taxonomy\ContextProvider\TermRouteContext.
TermContextualLinksTest class Drupal\Tests\taxonomy\Functional core/modules/taxonomy/tests/src/Functional/TermContextualLinksTest.php Tests views contextual links on terms.
TermContextualLinksTest class Drupal\Tests\taxonomy\Kernel core/modules/taxonomy/tests/src/Kernel/TermContextualLinksTest.php Tests views contextual links on terms.
TermDeleteForm class Drupal\taxonomy\Form core/modules/taxonomy/src/Form/TermDeleteForm.php Provides a deletion confirmation form for taxonomy term. 1
TermDisplayConfigurableTest class Drupal\Tests\taxonomy\Functional\Views core/modules/taxonomy/tests/src/Functional/Views/TermDisplayConfigurableTest.php Tests making taxonomy term base fields' displays configurable.
TermDisplayConfigurableTest class Drupal\Tests\taxonomy\Kernel\Views core/modules/taxonomy/tests/src/Kernel/Views/TermDisplayConfigurableTest.php Tests making taxonomy term base fields' displays configurable.
TermEntityQueryTest class Drupal\Tests\taxonomy\Kernel core/modules/taxonomy/tests/src/Kernel/TermEntityQueryTest.php Verifies operation of a taxonomy-based Entity Query.
TermEntityReferenceTest class Drupal\Tests\taxonomy\Kernel core/modules/taxonomy/tests/src/Kernel/TermEntityReferenceTest.php Tests the settings of restricting term selection to a single vocabulary.
TermEntityTranslation class Drupal\taxonomy\Plugin\migrate\source\d7 core/modules/taxonomy/src/Plugin/migrate/source/d7/TermEntityTranslation.php Drupal 7 taxonomy term entity translation source plugin. 1
TermEntityTranslationTest class Drupal\Tests\taxonomy\Kernel\Plugin\migrate\source\d7 core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/TermEntityTranslationTest.php Tests taxonomy term entity translation source plugin.
TermForm class Drupal\taxonomy core/modules/taxonomy/src/TermForm.php Base for handler for taxonomy term edit forms. 1
TermHierarchyTest class Drupal\Tests\taxonomy\Kernel core/modules/taxonomy/tests/src/Kernel/TermHierarchyTest.php Tests term hierarchy.
TermHierarchyValidationTest class Drupal\Tests\taxonomy\Kernel core/modules/taxonomy/tests/src/Kernel/TermHierarchyValidationTest.php Tests handling of pending revisions.
TermIndexTest class Drupal\Tests\taxonomy\Functional core/modules/taxonomy/tests/src/Functional/TermIndexTest.php Tests the hook implementations that maintain the taxonomy index.
TermInterface interface Drupal\taxonomy core/modules/taxonomy/src/TermInterface.php Provides an interface defining a taxonomy term entity. 1 18
TermJsonAnonTest class Drupal\Tests\taxonomy\Functional\Rest core/modules/taxonomy/tests/src/Functional/Rest/TermJsonAnonTest.php Tests Term Json Anon.
TermJsonBasicAuthTest class Drupal\Tests\taxonomy\Functional\Rest core/modules/taxonomy/tests/src/Functional/Rest/TermJsonBasicAuthTest.php Tests Term Json Basic Auth.
TermJsonCookieTest class Drupal\Tests\taxonomy\Functional\Rest core/modules/taxonomy/tests/src/Functional/Rest/TermJsonCookieTest.php Tests Term Json Cookie.
TermKernelTest class Drupal\Tests\taxonomy\Kernel core/modules/taxonomy/tests/src/Kernel/TermKernelTest.php Kernel tests for taxonomy term functions.
TermLanguageTest class Drupal\Tests\taxonomy\Functional core/modules/taxonomy/tests/src/Functional/TermLanguageTest.php Tests the language functionality for the taxonomy terms.
TermLocalizedTranslation class Drupal\taxonomy\Plugin\migrate\source\d6 core/modules/taxonomy/src/Plugin/migrate/source/d6/TermLocalizedTranslation.php Drupal 6 i18n taxonomy terms source from database. 1
TermLocalizedTranslation class Drupal\taxonomy\Plugin\migrate\source\d7 core/modules/taxonomy/src/Plugin/migrate/source/d7/TermLocalizedTranslation.php Drupal 7 i18n taxonomy terms source from database. 1
TermLocalizedTranslationTest class Drupal\Tests\taxonomy\Kernel\Plugin\migrate\source\d6 core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/TermLocalizedTranslationTest.php Tests D6 i18n term localized source plugin.
TermLocalizedTranslationTest class Drupal\Tests\taxonomy\Kernel\Plugin\migrate\source\d7 core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/TermLocalizedTranslationTest.php Tests D7 i18n term localized source plugin.
TermName class Drupal\taxonomy\Plugin\views\argument_validator core/modules/taxonomy/src/Plugin/views/argument_validator/TermName.php Validates whether a term name is a valid term argument.
TermName class Drupal\taxonomy\Plugin\views\field core/modules/taxonomy/src/Plugin/views/field/TermName.php Displays taxonomy term names and allows converting spaces to hyphens.
TermNameFieldTest class Drupal\Tests\taxonomy\Functional\Views core/modules/taxonomy/tests/src/Functional/Views/TermNameFieldTest.php Tests the term_name field handler.

Other projects


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