Classes, traits, and interfaces - Drupal 11.1.x - Drupal Core
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 1518
Name | Deprecated | Object type | Namespace | File name | Summary | Direct uses | Use statements | Strings |
---|---|---|---|---|---|---|---|---|
Keys | class | Composer\SelfUpdate | vendor/ |
@author Jordi Boggiano <j.boggiano@seld.be> | 2 | |||
KeyValue | class | Opentelemetry\Proto\Common\V1 | vendor/ |
KeyValue is a key-value pair that is used to store Span attributes, Link attributes, etc. | 4 | |||
KeyValueContentEntityStorage | class | Drupal\Core\Entity\KeyValueStore | core/ |
Provides a key value backend for content entities. | ||||
KeyValueDatabaseExpirableFactory | class | Drupal\Core\KeyValueStore | core/ |
Defines the key/value store factory for the database backend. | 1 | |||
KeyValueDatabaseFactory | class | Drupal\Core\KeyValueStore | core/ |
Defines the key/value store factory for the database backend. | ||||
KeyValueEntityStorage | class | Drupal\Core\Entity\KeyValueStore | core/ |
Provides a key value backend for entities. | 1 | |||
KeyValueExpirableFactory | class | Drupal\Core\KeyValueStore | core/ |
Defines the key/value store factory. | ||||
KeyValueExpirableFactoryInterface | interface | Drupal\Core\KeyValueStore | core/ |
Defines the expirable key/value store factory interface. | 3 | 8 | ||
KeyValueFactory | class | Drupal\Core\KeyValueStore | core/ |
Defines the key/value store factory. | 1 | |||
KeyValueFactoryInterface | interface | Drupal\Core\KeyValueStore | core/ |
Defines the key/value store factory interface. | 3 | 19 | ||
KeyValueList | class | Opentelemetry\Proto\Common\V1 | vendor/ |
KeyValueList is a list of KeyValue messages. We need KeyValueList as a message since `oneof` in AnyValue does not allow repeated fields. Everywhere else where we need a list of KeyValue messages (e.g. in Span) we use `repeated KeyValue` directly… | 1 | |||
KeyValueMemoryFactory | class | Drupal\Core\KeyValueStore | core/ |
Defines the key/value store factory for the memory backend. | ||||
KeyValueNullExpirableFactory | class | Drupal\Core\KeyValueStore | core/ |
Defines the key/value store factory for the null backend. | ||||
KeyValueStoreExpirableInterface | interface | Drupal\Core\KeyValueStore | core/ |
Defines the interface for expiring data in a key/value store. | 2 | 7 | ||
KeyValueStoreInterface | interface | Drupal\Core\KeyValueStore | core/ |
Defines the interface for key/value store implementations. | 2 | 7 | ||
KeywordEmulator | abstract class | PhpParser\Lexer\TokenEmulator | vendor/ |
5 | ||||
KeywordPatch | class | Prophecy\Doubler\ClassPatch | vendor/ |
Remove method functionality from the double which will clash with php keywords. | ||||
KillSwitch | class | Drupal\Core\PageCache\ResponsePolicy | core/ |
A policy evaluating to static::DENY when the kill switch was triggered. | 1 | |||
Kind | class | Google\Protobuf\Field | vendor/ |
Basic field types. | ||||
Known | abstract class | PHPUnit\Framework\TestStatus | vendor/ |
@psalm-immutable | 9 | |||
Known | abstract class | SebastianBergmann\CodeCoverage\Test\TestSize | vendor/ |
@psalm-immutable | 3 | |||
Known | abstract class | SebastianBergmann\CodeCoverage\Test\TestStatus | vendor/ |
@psalm-immutable | 2 | |||
Known | abstract class | PHPUnit\Framework\TestSize | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | 3 | 1 | ||
KnownInstaller | class | Composer\Installers | vendor/ |
|||||
KnownValues | interface | OpenTelemetry\SDK\Common\Configuration | vendor/ |
"Known values" for OpenTelemetry configurataion variables. Notice: Values specific to the PHP SDK have been added | 7 | |||
KodiCMSInstaller | class | Composer\Installers | vendor/ |
|||||
KohanaInstaller | class | Composer\Installers | vendor/ |
|||||
Label | class | Drupal\Core\Render\Element | core/ |
Provides a render element for displaying the label for a form element. | ||||
Label | class | Google\Protobuf\Internal\FieldDescriptorProto | vendor/ |
Protobuf type <code>google.protobuf.FieldDescriptorProto.Label</code> | ||||
Label | class | PhpParser\Node\Stmt | vendor/ |
|||||
LabeledStatement | class | Peast\Syntax\Node | vendor/ |
A node that represents a labeled statement. | ||||
LabelOnlyResourceObject | final class | Drupal\jsonapi\JsonApiResource | core/ |
Value object decorating a ResourceObject; only its label is available. | 2 | |||
LabelTooLong | class | Egulias\EmailValidator\Result\Reason | vendor/ |
1 | ||||
LangcodeRequiredIfTranslatableValuesConstraint | class | Drupal\Core\Config\Plugin\Validation\Constraint | core/ |
|||||
LangcodeRequiredIfTranslatableValuesConstraintValidator | final class | Drupal\Core\Config\Plugin\Validation\Constraint | core/ |
Validates the LangcodeRequiredIfTranslatableValues constraint. | ||||
Language | class | Drupal\language\Plugin\Condition | core/ |
Provides a 'Language' condition. | ||||
Language | class | Drupal\Core\TypedData\Plugin\DataType | core/ |
Defines the 'language' data type. | ||||
Language | class | Drupal\Core\Language | core/ |
An object containing the information for an interface language. | 10 | |||
Language | class | Symfony\Component\Validator\Constraints | vendor/ |
Validates that a value is a valid language Unicode language identifier. | ||||
Language | class | Drupal\language\Plugin\migrate\source | core/ |
Drupal 6/7 language source from database. | ||||
Language | class | Drupal\ckeditor5\Plugin\CKEditor5Plugin | core/ |
CKEditor 5 Language plugin. | 1 | |||
LanguageAccessControlHandler | class | Drupal\language | core/ |
Defines the access control handler for the language entity type. | 1 | |||
LanguageAddForm | class | Drupal\language\Form | core/ |
Controller for language addition forms. | 1 | |||
LanguageArgument | class | Drupal\views\Plugin\views\argument | core/ |
Defines an argument handler to accept a language. | ||||
LanguageBlock | class | Drupal\language\Plugin\Derivative | core/ |
Provides language switcher block plugin definitions for all languages. | 1 | |||
LanguageBlock | class | Drupal\language\Plugin\Block | core/ |
Provides a 'Language switcher' block. | ||||
LanguageConfigCollectionNameTrait | trait | Drupal\language\Config | core/ |
Provides a common trait for working with language override collection names. | ||||
LanguageConfigFactoryOverride | class | Drupal\language\Config | core/ |
Provides language overrides for the configuration factory. | 2 | |||
LanguageConfigFactoryOverrideInterface | interface | Drupal\language\Config | core/ |
Defines the interface for a configuration factory language override object. | 1 | 1 | ||
LanguageConfigOverride | class | Drupal\language\Config | core/ |
Defines language configuration overrides. | 4 |