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
EntityTestLabel class Drupal\entity_test\Entity core/modules/system/tests/modules/entity_test/src/Entity/EntityTestLabel.php Test entity class. 6
EntityTestLabelJsonAnonTest class Drupal\Tests\entity_test\Functional\Rest core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestLabelJsonAnonTest.php Tests EntityTest Label Json Anon.
EntityTestLabelJsonBasicAuthTest class Drupal\Tests\entity_test\Functional\Rest core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestLabelJsonBasicAuthTest.php Tests EntityTest Label Json Basic Auth.
EntityTestLabelJsonCookieTest class Drupal\Tests\entity_test\Functional\Rest core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestLabelJsonCookieTest.php Tests EntityTest Label Json Cookie.
EntityTestLabelResourceTestBase abstract class Drupal\Tests\entity_test\Functional\Rest core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestLabelResourceTestBase.php Resource test base for the EntityTestLabel entity. 6
EntityTestLabelXmlAnonTest class Drupal\Tests\entity_test\Functional\Rest core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestLabelXmlAnonTest.php Tests EntityTest Label Xml Anon.
EntityTestLabelXmlBasicAuthTest class Drupal\Tests\entity_test\Functional\Rest core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestLabelXmlBasicAuthTest.php Tests EntityTest Label Xml Basic Auth.
EntityTestLabelXmlCookieTest class Drupal\Tests\entity_test\Functional\Rest core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestLabelXmlCookieTest.php Tests EntityTest Label Xml Cookie.
EntityTestListBuilder class Drupal\entity_test core/modules/system/tests/modules/entity_test/src/EntityTestListBuilder.php Defines a class to build a listing of entity test entities. 1 3
EntityTestLocalTasks class Drupal\entity_test\Plugin\Derivative core/modules/system/tests/modules/entity_test/src/Plugin/Derivative/EntityTestLocalTasks.php Defines the local tasks for all the entity_test entities. 1
EntityTestMapField class Drupal\entity_test\Entity core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMapField.php An entity used for testing map base field values. 3
EntityTestMapFieldJsonAnonTest class Drupal\Tests\entity_test\Functional\Rest core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestMapFieldJsonAnonTest.php Tests EntityTest Map Field Json Anon.
EntityTestMapFieldResourceTestBase abstract class Drupal\Tests\entity_test\Functional\Rest core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestMapFieldResourceTestBase.php Resource test base for the EntityTestMapField entity. 1
EntityTestMapFieldTest class Drupal\Tests\jsonapi\Functional core/modules/jsonapi/tests/src/Functional/EntityTestMapFieldTest.php JSON:API integration test for the "EntityTestMapField" content entity type.
EntityTestMul class Drupal\entity_test\Entity core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMul.php Defines the test entity class. 3 12
EntityTestMulBundle class Drupal\entity_test\Entity core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulBundle.php Defines the Test entity mul bundle configuration entity. 2
EntityTestMulChanged class Drupal\entity_test\Entity core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulChanged.php Defines the test entity class. 1 3
EntityTestMulDefaultValue class Drupal\entity_test\Entity core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulDefaultValue.php Defines the test entity class.
EntityTestMulLangcodeKey class Drupal\entity_test\Entity core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulLangcodeKey.php Defines a test entity class using a custom langcode entity key.
EntityTestMulRev class Drupal\entity_test\Entity core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulRev.php Defines the test entity class. 1 20
EntityTestMulRevChanged class Drupal\entity_test\Entity core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulRevChanged.php Defines the test entity class. 1 1
EntityTestMulRevChangedWithRevisionLog class Drupal\entity_test\Entity core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulRevChangedWithRevisionLog.php Defines the test entity class.
EntityTestMulRevPub class Drupal\entity_test\Entity core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulRevPub.php Defines the test entity class. 1 12
EntityTestMulRevPubStringId class Drupal\workspaces_test\Entity core/modules/workspaces/tests/modules/workspaces_test/src/Entity/EntityTestMulRevPubStringId.php Defines the test entity class.
EntityTestMultiValueBaseField class Drupal\entity_test\Entity core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMultiValueBaseField.php Defines an entity type with a multivalue base field. 1
EntityTestMulWithBundle class Drupal\entity_test\Entity core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulWithBundle.php Defines the multilingual test entity class with bundles.
EntityTestMulWithRevisionLog class Drupal\entity_test_revlog\Entity core/modules/system/tests/modules/entity_test_revlog/src/Entity/EntityTestMulWithRevisionLog.php Defines the test entity class. 2
EntityTestMulWithRevisionLogPub class Drupal\entity_test_revlog\Entity core/modules/system/tests/modules/entity_test_revlog/src/Entity/EntityTestMulWithRevisionLogPub.php Defines the test entity class.
EntityTestNew class Drupal\entity_test\Entity core/modules/system/tests/modules/entity_test/src/Entity/EntityTestNew.php Defines the test entity class for testing definition addition.
EntityTestNoBundle class Drupal\entity_test\Entity core/modules/system/tests/modules/entity_test/src/Entity/EntityTestNoBundle.php Test entity class with no bundle. 1
EntityTestNoBundleWithLabel class Drupal\entity_test\Entity core/modules/system/tests/modules/entity_test/src/Entity/EntityTestNoBundleWithLabel.php Test entity class with no bundle but with label. 1
EntityTestNoId class Drupal\entity_test\Entity core/modules/system/tests/modules/entity_test/src/Entity/EntityTestNoId.php Test entity class.
EntityTestNoIdBundle class Drupal\entity_test\Entity core/modules/system/tests/modules/entity_test/src/Entity/EntityTestNoIdBundle.php Defines the entity_test_no_id bundle configuration entity. 1
EntityTestNoLabel class Drupal\entity_test\Entity core/modules/system/tests/modules/entity_test/src/Entity/EntityTestNoLabel.php Test entity class. 1 2
EntityTestNoLoadStorage class Drupal\entity_test core/modules/system/tests/modules/entity_test/src/EntityTestNoLoadStorage.php Test storage class used to verify that no load operation is triggered.
EntityTestNoUuid class Drupal\entity_test\Entity core/modules/system/tests/modules/entity_test/src/Entity/EntityTestNoUuid.php Test entity class with revisions but without UUIDs. 1
EntityTestOperationHooks class Drupal\entity_test_operation\Hook core/modules/system/tests/modules/entity_test_operation/src/Hook/EntityTestOperationHooks.php Hook implementations for entity_test_operation.
EntityTestPermissions class Drupal\entity_test core/modules/system/tests/modules/entity_test/src/EntityTestPermissions.php Provides dynamic permissions for entity test.
EntityTestReferenceCustomCacheTagFormatter class Drupal\entity_test\Plugin\Field\FieldFormatter core/modules/system/tests/modules/entity_test/src/Plugin/Field/FieldFormatter/EntityTestReferenceCustomCacheTagFormatter.php Plugin implementation of the 'entity_reference_custom_cache_tag' formatter.
EntityTestResourceTestBase abstract class Drupal\Tests\entity_test\Functional\Rest core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestResourceTestBase.php Resource test base for the EntityTest entity. 12 3
EntityTestRev class Drupal\entity_test\Entity core/modules/system/tests/modules/entity_test/src/Entity/EntityTestRev.php Defines the test entity class. 2 25
EntityTestRevisionTest class Drupal\Tests\views\Functional\Wizard core/modules/views/tests/src/Functional/Wizard/EntityTestRevisionTest.php Tests wizard for generic revisionable entities.
EntityTestRevlogAccessControlHandler class Drupal\entity_test_revlog core/modules/system/tests/modules/entity_test_revlog/src/EntityTestRevlogAccessControlHandler.php Defines the access control handler for test entity types. 2
EntityTestRevPub class Drupal\entity_test\Entity core/modules/system/tests/modules/entity_test/src/Entity/EntityTestRevPub.php Defines the test entity class. 2
EntityTestRevPubWorkspaceHandler class Drupal\workspaces_test core/modules/workspaces/tests/modules/workspaces_test/src/EntityTestRevPubWorkspaceHandler.php Provides a custom workspace handler for testing purposes. 1
EntityTestRoutes class Drupal\entity_test\Routing core/modules/system/tests/modules/entity_test/src/Routing/EntityTestRoutes.php Subscriber for Entity Test routes.
EntityTestStringId class Drupal\entity_test\Entity core/modules/system/tests/modules/entity_test/src/Entity/EntityTestStringId.php Defines a test entity class with a string ID. 5
EntityTestSubdirBundleClass class Drupal\entity_test_attribute_bundle_class\Entity\Subdir core/modules/system/tests/modules/entity_test_attribute_bundle_class/src/Entity/Subdir/EntityTestSubdirBundleClass.php A bundle class that is in a subdirectory. 1
EntityTestTest class Drupal\Tests\jsonapi\Functional core/modules/jsonapi/tests/src/Functional/EntityTestTest.php JSON:API integration test for the "EntityTest" content entity type.
EntityTestTextItemNormalizerTest class Drupal\Tests\entity_test\Functional\Rest core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestTextItemNormalizerTest.php Tests EntityTest Text Item Normalizer.

Other projects


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