Classes, traits, and interfaces - 10.3.x - drupal
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 |
---|---|---|---|---|---|---|---|---|
Connection | class | Drupal\Driver\Database\fake | core/ |
A fake Connection class for testing purposes. | 3 | 3 | ||
Connection | in drupal:9.4.0 and is removed from drupal:11.0.0. The SQLite database driver has been moved to the sqlite module. |
class | Drupal\Core\Database\Driver\sqlite | core/ |
SQLite implementation of \Drupal\Core\Database\Connection. | 1 | ||
Connection | in drupal:9.4.0 and is removed from drupal:11.0.0. The MySQL database driver has been moved to the mysql module. |
class | Drupal\Core\Database\Driver\mysql | core/ |
MySQL implementation of \Drupal\Core\Database\Connection. | 1 | ||
Connection | in drupal:9.4.0 and is removed from drupal:11.0.0. The PostgreSQL database driver has been moved to the pgsql module. |
class | Drupal\Core\Database\Driver\pgsql | core/ |
PostgreSQL implementation of \Drupal\Core\Database\Connection. | 1 | ||
Connection | abstract class | Drupal\Core\Database | core/ |
Base Database API class. | 5 | 137 | 3 | |
Connection | class | Drupal\mysql\Driver\Database\mysql | core/ |
MySQL implementation of \Drupal\Core\Database\Connection. | 4 | 8 | ||
Connection | class | Drupal\sqlite\Driver\Database\sqlite | core/ |
SQLite implementation of \Drupal\Core\Database\Connection. | 2 | 8 | ||
ConnectionFailureTest | class | Drupal\Tests\dblog\Kernel | core/ |
Tests logging of connection failures. | ||||
ConnectionNotDefinedException | class | Drupal\Core\Database | core/ |
Exception thrown if an undefined database connection is requested. | 7 | |||
ConnectionTest | class | Drupal\Tests\Core\Database | core/ |
Tests the Connection class. | ||||
ConnectionTest | class | Drupal\KernelTests\Core\Database | core/ |
Tests of the core database system. | ||||
ConnectionTest | class | Drupal\Tests\sqlite\Unit | core/ |
@coversDefaultClass \Drupal\sqlite\Driver\Database\sqlite\Connection @group Database | ||||
ConnectionTest | class | Drupal\Tests\sqlite\Kernel\sqlite | core/ |
SQLite-specific connection tests. | ||||
ConnectionTest | class | Drupal\Tests\mysql\Unit | core/ |
Tests MySQL database connections. | ||||
ConnectionTest | class | Drupal\Tests\mysql\Kernel\mysql | core/ |
MySQL-specific connection tests. | ||||
ConnectionUnitTest | class | Drupal\Tests\mysql\Kernel\mysql | core/ |
MySQL-specific connection unit tests. | ||||
ConnectionUnitTest | class | Drupal\Tests\pgsql\Kernel\pgsql | core/ |
PostgreSQL-specific connection unit tests. | ||||
Constraint | class | Drupal\Core\Validation\Attribute | core/ |
Defines a Constraint attribute object. | 85 | |||
Constraint | class | Drupal\Core\Validation\Annotation | core/ |
Defines a validation constraint annotation object. | ||||
Constraint | class | Drupal\Component\Version | core/ |
A value object representing a Drupal version constraint. | 3 | |||
ConstraintFactory | class | Drupal\Core\Validation | core/ |
Constraint plugin factory. | ||||
ConstraintFactoryTest | class | Drupal\KernelTests\Core\Validation | core/ |
@coversDefaultClass \Drupal\Core\Validation\ConstraintFactory | ||||
ConstraintManager | class | Drupal\Core\Validation | core/ |
Constraint plugin manager. | 8 | 2 | ||
ConstraintsTest | class | Drupal\KernelTests\Core\Validation | core/ |
Tests various low level constrains provided by core. | ||||
ConstraintTest | class | Drupal\Tests\Component\Version | core/ |
@coversDefaultClass \Drupal\Component\Version\Constraint @group Version | ||||
ConstraintValidatorFactory | class | Drupal\Core\Validation | core/ |
Defines a constraint validator factory that works with container injection. | 2 | |||
ConstraintViolationBuilder | class | Drupal\Core\Validation | core/ |
A constraint violation builder for the basic Symfony validator. | 1 | 1 | ||
ConstraintViolationBuilder | class | Drupal\Core\TypedData\Validation | core/ |
Defines a constraint violation builder for the Typed Data validator. | ||||
ContactCategory | class | Drupal\contact\Plugin\migrate\source | core/ |
Drupal 6/7 contact category source from database. | ||||
ContactCategoryTest | class | Drupal\Tests\contact\Kernel\Plugin\migrate\source | core/ |
Tests D6 contact category source plugin. | ||||
ContactController | class | Drupal\contact\Controller | core/ |
Controller routines for contact routes. | ||||
ContactFieldsTest | class | Drupal\Tests\contact\Kernel\Views | core/ |
Tests that no storage is created for the contact_message entity. | ||||
ContactForm | class | Drupal\contact\Entity | core/ |
Defines the contact form entity. | 15 | |||
ContactFormAccessControlHandler | class | Drupal\contact | core/ |
Defines the access control handler for the contact form entity type. | ||||
ContactFormEditForm | class | Drupal\contact | core/ |
Base form for contact form edit forms. | ||||
ContactFormInterface | interface | Drupal\contact | core/ |
Provides an interface defining a contact form entity. | 1 | 5 | ||
ContactFormJsonAnonTest | class | Drupal\Tests\contact\Functional\Rest | core/ |
@group rest | ||||
ContactFormJsonBasicAuthTest | class | Drupal\Tests\contact\Functional\Rest | core/ |
@group rest | ||||
ContactFormJsonCookieTest | class | Drupal\Tests\contact\Functional\Rest | core/ |
@group rest | ||||
ContactFormListBuilder | class | Drupal\contact | core/ |
Defines a class to build a listing of contact form entities. | ||||
ContactFormResourceTestBase | abstract class | Drupal\Tests\contact\Functional\Rest | core/ |
6 | ||||
ContactFormTest | class | Drupal\Tests\jsonapi\Functional | core/ |
JSON:API integration test for the "ContactForm" config entity type. | ||||
ContactFormValidationTest | class | Drupal\Tests\contact\Kernel | core/ |
Tests validation of contact_form entities. | ||||
ContactFormXmlAnonTest | class | Drupal\Tests\contact\Functional\Rest | core/ |
@group rest | ||||
ContactFormXmlBasicAuthTest | class | Drupal\Tests\contact\Functional\Rest | core/ |
@group rest | ||||
ContactFormXmlCookieTest | class | Drupal\Tests\contact\Functional\Rest | core/ |
@group rest | ||||
ContactLanguageTest | class | Drupal\Tests\contact\Functional | core/ |
Tests contact messages with language module. | ||||
ContactLink | class | Drupal\contact\Plugin\views\field | core/ |
Defines a field that links to the user contact page, if access is permitted. | 1 | |||
ContactLinkTest | class | Drupal\Tests\contact\Unit | core/ |
@coversDefaultClass \Drupal\contact\Plugin\views\field\ContactLink @group contact | ||||
ContactLinkTest | class | Drupal\Tests\contact\Functional\Views | core/ |
Tests the contact link field. |
Pagination
- Previous page
- Page 34
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.