Classes, traits, and interfaces - 9.5.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 1523

Name Deprecated Object type Namespace File name Summary Direct uses Use statements Strings
EntityTestDateonlyTest class Drupal\Tests\datetime\Functional\EntityResource\EntityTest core/modules/datetime/tests/src/Functional/EntityResource/EntityTest/EntityTestDateonlyTest.php Tests the datetime field constraint with 'date' items.
EntityTestDateRangeTest class Drupal\Tests\datetime_range\Functional\EntityResource\EntityTest core/modules/datetime_range/tests/src/Functional/EntityResource/EntityTest/EntityTestDateRangeTest.php Tests the 'daterange' field's normalization.
EntityTestDatetimeTest class Drupal\Tests\datetime\Functional\EntityResource\EntityTest core/modules/datetime/tests/src/Functional/EntityResource/EntityTest/EntityTestDatetimeTest.php Tests the datetime field constraint with 'datetime' items.
EntityTestDefaultAccess class Drupal\entity_test\Entity core/modules/system/tests/modules/entity_test/src/Entity/EntityTestDefaultAccess.php Defines a test entity class with no access control handler. 1
EntityTestDefaultPlugin class Drupal\entity_test\Plugin\Validation\Constraint core/modules/system/tests/modules/entity_test/src/Plugin/Validation/Constraint/EntityTestDefaultPlugin.php A dummy constraint for testing \Drupal\Core\Validation\ConstraintFactory.
EntityTestDefaultValue class Drupal\entity_test\Entity core/modules/system/tests/modules/entity_test/src/Entity/EntityTestDefaultValue.php Defines a test entity class for testing default values.
EntityTestDefinitionSubscriber class Drupal\entity_test core/modules/system/tests/modules/entity_test/src/EntityTestDefinitionSubscriber.php Test entity type and field storage definition event subscriber. 2
EntityTestDeleteForm class Drupal\entity_test core/modules/system/tests/modules/entity_test/src/EntityTestDeleteForm.php Provides the entity_test delete form.
EntityTestDestination class Drupal\Tests\migrate\Unit\Plugin\migrate\destination core/modules/migrate/tests/src/Unit/Plugin/migrate/destination/EntityContentBaseTest.php Stub class for testing EntityContentBase methods.
EntityTestEntityLevel class Drupal\entity_test\Plugin\Validation\Constraint core/modules/system/tests/modules/entity_test/src/Plugin/Validation/Constraint/EntityTestEntityLevel.php Constraint on entity level.
EntityTestEntityLevelValidator class Drupal\entity_test\Plugin\Validation\Constraint core/modules/system/tests/modules/entity_test/src/Plugin/Validation/Constraint/EntityTestEntityLevelValidator.php Constraint validator for the EntityTestEntityLevel constraint.
EntityTestExternal class Drupal\entity_test\Entity core/modules/system/tests/modules/entity_test/src/Entity/EntityTestExternal.php Test entity class. 1
EntityTestFieldMethods class Drupal\entity_test\Entity core/modules/system/tests/modules/entity_test/src/Entity/EntityTestFieldMethods.php Defines the test entity class.
EntityTestFieldOverride class Drupal\entity_test\Entity core/modules/system/tests/modules/entity_test/src/Entity/EntityTestFieldOverride.php Defines a test entity class for testing default values.
EntityTestForm class Drupal\entity_test core/modules/system/tests/modules/entity_test/src/EntityTestForm.php Form controller for the test entity edit forms.
EntityTestHalJsonAnonTest class Drupal\Tests\hal\Functional\entity_test core/modules/hal/tests/src/Functional/entity_test/EntityTestHalJsonAnonTest.php @group hal @group legacy 3
EntityTestHalJsonBasicAuthTest class Drupal\Tests\hal\Functional\entity_test core/modules/hal/tests/src/Functional/entity_test/EntityTestHalJsonBasicAuthTest.php @group hal @group legacy
EntityTestHalJsonCookieTest class Drupal\Tests\hal\Functional\entity_test core/modules/hal/tests/src/Functional/entity_test/EntityTestHalJsonCookieTest.php @group hal @group legacy
EntityTestHalJsonInternalPropertyNormalizerTest class Drupal\Tests\hal\Functional\entity_test core/modules/hal/tests/src/Functional/entity_test/EntityTestHalJsonInternalPropertyNormalizerTest.php Test that internal properties are not exposed in the 'hal_json' format.
EntityTestJsonAnonTest class Drupal\Tests\entity_test\Functional\Rest core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestJsonAnonTest.php @group rest
EntityTestJsonBasicAuthTest class Drupal\Tests\entity_test\Functional\Rest core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestJsonBasicAuthTest.php @group rest
EntityTestJsonCookieTest class Drupal\Tests\entity_test\Functional\Rest core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestJsonCookieTest.php @group rest
EntityTestJsonInternalPropertyNormalizerTest class Drupal\Tests\entity_test\Functional\Rest core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestJsonInternalPropertyNormalizerTest.php Test that internal properties are not exposed in the 'json' format.
EntityTestLabel class Drupal\entity_test\Entity core/modules/system/tests/modules/entity_test/src/Entity/EntityTestLabel.php Test entity class. 6
EntityTestLabelHalJsonAnonTest class Drupal\Tests\hal\Functional\entity_test core/modules/hal/tests/src/Functional/entity_test/EntityTestLabelHalJsonAnonTest.php @group hal @group legacy 2
EntityTestLabelHalJsonBasicAuthTest class Drupal\Tests\hal\Functional\entity_test core/modules/hal/tests/src/Functional/entity_test/EntityTestLabelHalJsonBasicAuthTest.php @group hal @group legacy
EntityTestLabelHalJsonCookieTest class Drupal\Tests\hal\Functional\entity_test core/modules/hal/tests/src/Functional/entity_test/EntityTestLabelHalJsonCookieTest.php @group hal @group legacy
EntityTestLabelJsonAnonTest class Drupal\Tests\entity_test\Functional\Rest core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestLabelJsonAnonTest.php @group rest
EntityTestLabelJsonBasicAuthTest class Drupal\Tests\entity_test\Functional\Rest core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestLabelJsonBasicAuthTest.php @group rest
EntityTestLabelJsonCookieTest class Drupal\Tests\entity_test\Functional\Rest core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestLabelJsonCookieTest.php @group rest
EntityTestLabelResourceTestBase abstract class Drupal\Tests\entity_test\Functional\Rest core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestLabelResourceTestBase.php 7 1
EntityTestLabelXmlAnonTest class Drupal\Tests\entity_test\Functional\Rest core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestLabelXmlAnonTest.php @group rest
EntityTestLabelXmlBasicAuthTest class Drupal\Tests\entity_test\Functional\Rest core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestLabelXmlBasicAuthTest.php @group rest
EntityTestLabelXmlCookieTest class Drupal\Tests\entity_test\Functional\Rest core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestLabelXmlCookieTest.php @group rest
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 1
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
EntityTestMapFieldHalJsonAnonTest class Drupal\Tests\hal\Functional\entity_test core/modules/hal/tests/src/Functional/entity_test/EntityTestMapFieldHalJsonAnonTest.php @group hal @group legacy
EntityTestMapFieldJsonAnonTest class Drupal\Tests\entity_test\Functional\Rest core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestMapFieldJsonAnonTest.php @group rest
EntityTestMapFieldResourceTestBase abstract class Drupal\Tests\entity_test\Functional\Rest core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestMapFieldResourceTestBase.php 2 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 11
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. 1
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 18
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. 8

Other projects


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