Classes, traits, and interfaces - 9.5.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 1523
Name | Deprecated | Object type | Namespace | File name | Summary | Direct uses | Use statements | Strings |
---|---|---|---|---|---|---|---|---|
AlterTest | class | Drupal\Tests\system\Functional\Form | core/ |
Tests hook_form_alter() and hook_form_FORM_ID_alter(). | ||||
AlterTest | class | Drupal\Tests\system\Functional\Common | core/ |
Tests alteration of arguments passed to \Drupal::moduleHandler->alter(). | ||||
AmbiguousBundleClassException | class | Drupal\Core\Entity\Exception | core/ |
Exception thrown if a bundle class is defined for multiple bundles. | 3 | |||
AmbiguousEntityClassException | class | Drupal\Core\Entity\Exception | core/ |
Exception thrown if multiple entity types exist for an entity class. | 1 | 2 | ||
AmbiguousEntityClassException | class | Drupal\Core\Entity\Exception | core/ |
Exception thrown if multiple entity types exist for an entity class. | 1 | 2 | ||
Analyze | class | Drupal\views_ui\Form\Ajax | core/ |
Displays analysis information for a view. | ||||
Analyzer | class | Drupal\views | core/ |
View analyzer plugin manager. | 3 | 2 | ||
Analyzer | class | Drupal\views | core/ |
View analyzer plugin manager. | 3 | 2 | ||
AnalyzeTest | class | Drupal\Tests\views_ui\Functional | core/ |
Tests the views analyze system. | ||||
AnnotatedClassDiscovery | class | Drupal\Core\Plugin\Discovery | core/ |
Defines a discovery mechanism to find annotated plugins in PSR-4 namespaces. | 1 | 9 | ||
AnnotatedClassDiscovery | class | Drupal\Core\Plugin\Discovery | core/ |
Defines a discovery mechanism to find annotated plugins in PSR-4 namespaces. | 1 | 9 | ||
AnnotatedClassDiscovery | class | Drupal\Component\Annotation\Plugin\Discovery | core/ |
Defines a discovery mechanism to find annotated plugins in PSR-4 namespaces. | 1 | 4 | ||
AnnotatedClassDiscovery | class | Drupal\Component\Annotation\Plugin\Discovery | core/ |
Defines a discovery mechanism to find annotated plugins in PSR-4 namespaces. | 1 | 4 | ||
AnnotatedClassDiscoveryAutomatedProviders | class | Drupal\migrate\Plugin\Discovery | core/ |
Determines providers based on a class's and its parent's namespaces. | 1 | |||
AnnotatedClassDiscoveryCachedTest | class | Drupal\Tests\Component\Annotation | core/ |
@coversDefaultClass \Drupal\Component\Annotation\Plugin\Discovery\AnnotatedClassDiscovery[[api-linebreak]] @group Annotation @runTestsInSeparateProcesses | ||||
AnnotatedClassDiscoveryTest | class | Drupal\Tests\Component\Annotation | core/ |
@coversDefaultClass \Drupal\Component\Annotation\Plugin\Discovery\AnnotatedClassDiscovery[[api-linebreak]] @group Annotation @runTestsInSeparateProcesses | ||||
AnnotatedClassDiscoveryTest | class | Drupal\Tests\Component\Plugin\Discovery | core/ |
@coversDefaultClass \Drupal\Component\Annotation\Plugin\Discovery\AnnotatedClassDiscovery[[api-linebreak]] | ||||
AnnotatedClassDiscoveryTest | class | Drupal\KernelTests\Core\Plugin\Discovery | core/ |
Tests that plugins are correctly discovered using annotated classes. | ||||
AnnotationBase | abstract class | Drupal\Component\Annotation | core/ |
Provides a base class for classed annotations. | 5 | 4 | ||
AnnotationBase | abstract class | Drupal\Component\Annotation | core/ |
Provides a base class for classed annotations. | 5 | 4 | ||
AnnotationBaseStub | class | Drupal\Tests\Component\Annotation | core/ |
|||||
AnnotationBaseTest | class | Drupal\Tests\Component\Annotation | core/ |
@coversDefaultClass \Drupal\Component\Annotation\AnnotationBase[[api-linebreak]] @group Annotation | ||||
AnnotationBridgeDecorator | class | Drupal\Component\Annotation\Plugin\Discovery | core/ |
Ensures that all definitions are run through the annotation process. | 3 | |||
AnnotationBridgeDecoratorTest | class | Drupal\Tests\Component\Annotation\Plugin\Discovery | core/ |
@coversDefaultClass \Drupal\Component\Annotation\Plugin\Discovery\AnnotationBridgeDecorator[[api-linebreak]] @group Plugin | ||||
AnnotationEnum | final class | Drupal\Tests\Component\Annotation\Doctrine\Fixtures | core/ |
Plugin annotation @Target("ALL"); | ||||
AnnotationEnumInvalid | final class | Drupal\Tests\Component\Annotation\Doctrine\Fixtures | core/ |
Plugin annotation @Target("ALL"); | ||||
AnnotationEnumLiteral | final class | Drupal\Tests\Component\Annotation\Doctrine\Fixtures | core/ |
Plugin annotation @Target("ALL"); | 1 | |||
AnnotationEnumLiteralInvalid | final class | Drupal\Tests\Component\Annotation\Doctrine\Fixtures | core/ |
Plugin annotation @Target("ALL"); | ||||
AnnotationExtendsAnnotationTargetAll | class | Drupal\Tests\Component\Annotation\Doctrine | core/ |
|||||
AnnotationInterface | interface | Drupal\Component\Annotation | core/ |
Defines a common interface for classed annotations. | 3 | 4 | ||
AnnotationInterface | interface | Drupal\Component\Annotation | core/ |
Defines a common interface for classed annotations. | 3 | 4 | ||
AnnotationTargetAll | class | Drupal\Tests\Component\Annotation\Doctrine\Fixtures | core/ |
Plugin annotation @Target("ALL"); | 1 | 1 | ||
AnnotationTargetAll | class | Drupal\Tests\Component\Annotation\Doctrine\Fixtures | core/ |
Plugin annotation @Target("ALL"); | 1 | 1 | ||
AnnotationTargetAnnotation | final class | Drupal\Tests\Component\Annotation\Doctrine\Fixtures | core/ |
Plugin annotation @Target({ "ANNOTATION" }) | 1 | |||
AnnotationTargetClass | final class | Drupal\Tests\Component\Annotation\Doctrine\Fixtures | core/ |
Plugin annotation @Target("CLASS"); | 3 | |||
AnnotationTargetPropertyMethod | final class | Drupal\Tests\Component\Annotation\Doctrine\Fixtures | core/ |
Plugin annotation @Target({ "METHOD", "PROPERTY" }) | 2 | |||
AnnotationWithAttributes | final class | Drupal\Tests\Component\Annotation\Doctrine\Fixtures | core/ |
Plugin annotation @Target("ALL") @Attributes({ @Attribute("mixed", type = "mixed"), @Attribute("boolean", type = "boolean"), @Attribute("bool", type = "bool"), @Attribute("float", … | ||||
AnnotationWithConstants | final class | Drupal\Tests\Component\Annotation\Doctrine\Fixtures | core/ |
Plugin annotation @Target("ALL"); | 1 | |||
AnnotationWithInvalidTargetDeclaration | class | Drupal\Tests\Component\Annotation\Doctrine | core/ |
Plugin annotation @Target("Foo"); | ||||
AnnotationWithRequiredAttributes | final class | Drupal\Tests\Component\Annotation\Doctrine\Fixtures | core/ |
Plugin annotation @Target("ALL") @Attributes({ @Attribute("value", required = true , type = "string"), @Attribute("annot", required = true , type =… | ||||
AnnotationWithRequiredAttributesWithoutContructor | final class | Drupal\Tests\Component\Annotation\Doctrine\Fixtures | core/ |
Plugin annotation @Target("ALL"); | ||||
AnnotationWithTargetEmpty | class | Drupal\Tests\Component\Annotation\Doctrine | core/ |
@Target | ||||
AnnotationWithTargetSyntaxError | final class | Drupal\Tests\Component\Annotation\Doctrine\Fixtures | core/ |
Plugin annotation @Target(@) | ||||
AnnotationWithVarType | final class | Drupal\Tests\Component\Annotation\Doctrine\Fixtures | core/ |
Plugin annotation @Target("ALL"); | ||||
AnnotWithDefaultValue | class | Drupal\Tests\Component\Annotation\Doctrine\Fixtures\Annotation | core/ |
|||||
AnnounceCommand | class | Drupal\Core\Ajax | core/ |
AJAX command for a JavaScript Drupal.announce() call. | 3 | |||
AnonResourceTestTrait | trait | Drupal\Tests\rest\Functional | core/ |
Trait for ResourceTestBase subclasses testing $auth=NULL, i.e. authless/anon. | 162 | |||
AnonymousPrivateTempStoreTest | class | Drupal\KernelTests\Core\TempStore | core/ |
Tests the PrivateTempStore for anonymous users. | ||||
AnonymousUserResponseSubscriber | class | Drupal\Core\EventSubscriber | core/ |
Response subscriber to handle finished responses for the anonymous user. | 2 | |||
AnonymousUserResponseSubscriber | class | Drupal\Core\EventSubscriber | core/ |
Response subscriber to handle finished responses for the anonymous user. | 2 |
Pagination
- Previous page
- Page 7
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.