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
EntityTestBundleResourceTestBase abstract class Drupal\Tests\entity_test\Functional\Rest core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestBundleResourceTestBase.php Resource test base for the EntityTestBundle entity. 6
EntityTestBundleXmlAnonTest class Drupal\Tests\entity_test\Functional\Rest core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestBundleXmlAnonTest.php Tests EntityTest Bundle Xml Anon.
EntityTestBundleXmlBasicAuthTest class Drupal\Tests\entity_test\Functional\Rest core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestBundleXmlBasicAuthTest.php Tests EntityTest Bundle Xml Basic Auth.
EntityTestBundleXmlCookieTest class Drupal\Tests\entity_test\Functional\Rest core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestBundleXmlCookieTest.php Tests EntityTest Bundle Xml Cookie Auth.
EntityTestCache class Drupal\entity_test\Entity core/modules/system/tests/modules/entity_test/src/Entity/EntityTestCache.php Defines the test entity class.
EntityTestCompositeConstraint class Drupal\entity_test\Entity core/modules/system/tests/modules/entity_test/src/Entity/EntityTestCompositeConstraint.php Defines a test class for testing composite constraints. 1
EntityTestCompositeConstraint class Drupal\entity_test\Plugin\Validation\Constraint core/modules/system/tests/modules/entity_test/src/Plugin/Validation/Constraint/EntityTestCompositeConstraint.php Constraint with multiple fields. 1
EntityTestCompositeConstraintValidator class Drupal\entity_test\Plugin\Validation\Constraint core/modules/system/tests/modules/entity_test/src/Plugin/Validation/Constraint/EntityTestCompositeConstraintValidator.php Constraint validator for the EntityTestComposite constraint.
EntityTestComputedBundleField class Drupal\entity_test\Entity core/modules/system/tests/modules/entity_test/src/Entity/EntityTestComputedBundleField.php An entity used for testing computed bundle field values. 1
EntityTestComputedField class Drupal\entity_test\Entity core/modules/system/tests/modules/entity_test/src/Entity/EntityTestComputedField.php An entity used for testing computed field values. 6
EntityTestComputedFieldNormalizerTest class Drupal\Tests\entity_test\Functional\Rest core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestComputedFieldNormalizerTest.php Test normalization of computed field.
EntityTestComputedFieldTest class Drupal\Tests\jsonapi\Functional core/modules/jsonapi/tests/src/Functional/EntityTestComputedFieldTest.php JSON:API integration test for the "EntityTestComputedField" content entity type.
EntityTestConstraints class Drupal\entity_test\Entity core/modules/system/tests/modules/entity_test/src/Entity/EntityTestConstraints.php Defines a test class for testing the definition of entity level constraints. 1
EntityTestConstraintsHooks class Drupal\entity_test_constraints\Hook core/modules/system/tests/modules/entity_test_constraints/src/Hook/EntityTestConstraintsHooks.php Hook implementations for entity_test_constraints.
EntityTestConstraintViolation class Drupal\entity_test\Entity core/modules/system/tests/modules/entity_test/src/Entity/EntityTestConstraintViolation.php Defines the test entity class for testing entity constraint violations.
EntityTestContainerFactoryPlugin class Drupal\entity_test\Plugin\Validation\Constraint core/modules/system/tests/modules/entity_test/src/Plugin/Validation/Constraint/EntityTestContainerFactoryPlugin.php A dummy constraint for testing \Drupal\Core\Validation\ConstraintFactory.
EntityTestController class Drupal\entity_test\Controller core/modules/system/tests/modules/entity_test/src/Controller/EntityTestController.php Controller routines for entity_test routes.
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. 13
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. 22
EntityTestHelper class Drupal\entity_test core/modules/system/tests/modules/entity_test/src/EntityTestHelper.php Class for the entity API providing several entity types for testing. 62
EntityTestHooks class Drupal\entity_test\Hook core/modules/system/tests/modules/entity_test/src/Hook/EntityTestHooks.php Hook implementations for entity_test.
EntityTestJsonAnonTest class Drupal\Tests\entity_test\Functional\Rest core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestJsonAnonTest.php Tests EntityTest Json Anon.
EntityTestJsonBasicAuthTest class Drupal\Tests\entity_test\Functional\Rest core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestJsonBasicAuthTest.php Tests EntityTest Json Basic Auth.
EntityTestJsonCookieTest class Drupal\Tests\entity_test\Functional\Rest core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestJsonCookieTest.php Tests EntityTest Json Cookie.
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
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.

Other projects


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