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 |
---|---|---|---|---|---|---|---|---|
MessagePart | class | Symfony\Component\Mime\Part | vendor/ |
@final | 1 | |||
MessagePlugin | class | Drupal\Composer\Plugin\ProjectMessage | composer/ |
A Composer plugin to display a message after creating a project. | ||||
Messages | class | Drupal\views\Plugin\views\area | core/ |
Provides an area for messages. | ||||
MessagesBlockPluginInterface | interface | Drupal\Core\Block | core/ |
The interface for "messages" (#type => status_messages) blocks. | 1 | 2 | ||
MessageTrait | trait | GuzzleHttp\Psr7 | vendor/ |
Trait implementing functionality common to requests and responses. | ||||
MessageTSniff | class | DrupalPractice\Sniffs\FunctionCalls | vendor/ |
Verifies that messages passed to drupal_set_message() run through t(). | ||||
MessageViewBuilder | class | Drupal\contact | core/ |
Render controller for contact messages. | 1 | |||
Messenger | class | Drupal\Core\Messenger | core/ |
The messenger service. | ||||
MessengerInterface | interface | Drupal\Core\Messenger | core/ |
Stores runtime messages sent out to individual users on the page. | 1 | 38 | ||
MessengerTrait | trait | Drupal\Core\Messenger | core/ |
Provides a trait for the messenger service. | 8 | |||
MessengerTransportListener | final class | Symfony\Component\Mailer\EventListener | vendor/ |
Allows messages to be sent to specific Messenger transports via the "X-Bus-Transport" MIME header. | ||||
Metadata | abstract class | PHPUnit\Metadata | vendor/ |
@psalm-immutable | 44 | 2 | ||
Metadata | final class | OpenTelemetry\API\Baggage | vendor/ |
1 | ||||
MetadataAwareNameConverter | final class | Symfony\Component\Serializer\NameConverter | vendor/ |
@author Fabien Bourigault <bourigaultfabien@gmail.com> | ||||
MetadataBag | class | Symfony\Component\HttpFoundation\Session\Storage | vendor/ |
Metadata container. | 1 | 3 | ||
MetadataBag | class | Drupal\Core\Session | core/ |
Provides a container for application specific session metadata. | 1 | |||
MetadataBubblingUrlGenerator | class | Drupal\Core\Render | core/ |
Decorator for the URL generator, which bubbles bubbleable URL metadata. | ||||
MetadataCollection | final class | PHPUnit\Metadata | vendor/ |
@template-implements IteratorAggregate<int, Metadata> | 8 | |||
MetadataCollectionIterator | final class | PHPUnit\Metadata | vendor/ |
@template-implements Iterator<int, Metadata> | ||||
MetadataFactoryInterface | interface | Symfony\Component\Validator\Mapping\Factory | vendor/ |
Returns {@link MetadataInterface} instances for values. | 3 | 6 | ||
MetadataHeader | final class | Symfony\Component\Mailer\Header | vendor/ |
@author Kevin Bond <kevinbond@gmail.com> | ||||
MetadataInterface | interface | Symfony\Component\Validator\Mapping | vendor/ |
A container for validation metadata. | 4 | 12 | ||
MetadataInterface | interface | OpenTelemetry\API\Baggage | vendor/ |
1 | ||||
MetadataMinifier | class | Composer\MetadataMinifier | vendor/ |
1 | 1 | |||
MetadataMinifier | Use Composer\MetadataMinifier\MetadataMinifier instead |
class | Composer\Util | vendor/ |
||||
MetapackageInstaller | class | Composer\Installer | vendor/ |
Metapackage installation manager. | ||||
MetaProperty | class | Peast\Syntax\Node | vendor/ |
A node that represents a meta property. For example: new.target | ||||
Meter | final class | OpenTelemetry\SDK\Metrics | vendor/ |
@internal | ||||
MeterConfig | class | OpenTelemetry\SDK\Metrics | vendor/ |
1 | ||||
MeterInstruments | final class | OpenTelemetry\SDK\Metrics | vendor/ |
@internal | ||||
MeterInterface | interface | OpenTelemetry\API\Metrics | vendor/ |
3 | 8 | |||
MeterProvider | final class | OpenTelemetry\SDK\Metrics | vendor/ |
|||||
MeterProviderBuilder | class | OpenTelemetry\SDK\Metrics | vendor/ |
|||||
MeterProviderFactory | class | OpenTelemetry\SDK\Metrics | vendor/ |
1 | ||||
MeterProviderInterface | interface | OpenTelemetry\API\Metrics | vendor/ |
3 | 13 | |||
MeterProviderInterface | interface | OpenTelemetry\SDK\Metrics | vendor/ |
2 | 4 | |||
Method | final class | SebastianBergmann\CodeCoverage\Report\Xml | vendor/ |
@internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage | ||||
Method | trait | PHPUnit\Framework\MockObject | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | 1 | |||
Method | final class | phpDocumentor\Reflection\DocBlock\Tags | vendor/ |
Reflection class for an {method in a Docblock. | 5 | |||
Method | class | PhpParser\Node\Scalar\MagicConst | vendor/ |
|||||
Method | class | PhpParser\Builder | vendor/ |
|||||
Method | class | Google\Protobuf | vendor/ |
Method represents a method of an API interface. | ||||
MethodCall | class | PhpParser\Node\Expr | vendor/ |
18 | ||||
MethodCallExpression | class | Twig\Node\Expression | vendor/ |
2 | ||||
MethodCannotBeConfiguredException | final class | PHPUnit\Framework\MockObject | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | 1 | |||
MethodDeclarationSniff | class | Drupal\Sniffs\Methods | vendor/ |
Checks that the method declaration is correct. | ||||
MethodDeclarationSniff | class | PHP_CodeSniffer\Standards\PSR2\Sniffs\Methods | vendor/ |
1 | 1 | |||
MethodDefinition | class | Peast\Syntax\Node | vendor/ |
A node that represents a method declaration in classes and object literals. | ||||
MethodDescriptorProto | class | Google\Protobuf\Internal | vendor/ |
Describes a method of a service. | ||||
MethodFactory | final class | phpDocumentor\Reflection\DocBlock\Tags\Factory | vendor/ |
@internal This class is not part of the BC promise of this library. | 1 |