Classes, traits, and interfaces - 8.9.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 1511
Name | Deprecated | Object type | Namespace | File name | Summary | Direct uses | Use statements | Strings |
---|---|---|---|---|---|---|---|---|
AliasManagerTest | class | Drupal\Tests\path_alias\Unit | core/ |
@coversDefaultClass \Drupal\path_alias\AliasManager @group path_alias | ||||
AliasPathProcessor | class | Drupal\path_alias\PathProcessor | core/ |
Processes the inbound path using path alias lookups. | 4 | 2 | ||
AliasPathProcessorTest | class | Drupal\Tests\path_alias\Unit\PathProcessor | core/ |
@coversDefaultClass \Drupal\path_alias\PathProcessor\AliasPathProcessor @group PathProcessor @group path_alias | ||||
AliasRepository | class | Drupal\path_alias | core/ |
Provides the default path alias lookup operations. | 1 | 1 | 2 | |
AliasRepository | in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal\path_alias\AliasRepository instead. |
class | Drupal\Core\Path | core/ |
Provides the default path alias lookup operations. | 1 | 2 | |
AliasRepositoryInterface | in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal\path_alias\AliasRepositoryInterface. |
interface | Drupal\Core\Path | core/ |
Provides an interface for path alias lookup operations. | 2 | 1 | |
AliasRepositoryInterface | interface | Drupal\path_alias | core/ |
Provides an interface for path alias lookup operations. | 1 | 2 | ||
AliasStorage | \Drupal\Core\Path\AliasStorage is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use the "path_alias.repository" service instead, or the entity storage handler for the "path_alias" entity type for CRUD methods. |
class | Drupal\Core\Path | core/ |
Provides a class for CRUD operations on path aliases. | 2 | ||
AliasStorageInterface | \Drupal\Core\Path\AliasStorage is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use the "path_alias.repository" service instead, or the entity storage handler for the "path_alias" entity type for CRUD methods. |
interface | Drupal\Core\Path | core/ |
Provides a class for CRUD operations on path aliases. | 1 | ||
AliasTest | class | Drupal\Tests\path_alias\Kernel | core/ |
Tests path alias CRUD and lookup functionality. | ||||
AliasWhitelist | class | Drupal\path_alias | core/ |
Extends CacheCollector to build the path alias whitelist over time. | 2 | 2 | ||
AliasWhitelist | in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal\path_alias\AliasWhitelist instead. |
class | Drupal\Core\Path | core/ |
Extends CacheCollector to build the path alias whitelist over time. | 1 | 3 | |
AliasWhitelistInterface | in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal\path_alias\AliasWhitelistInterface. |
interface | Drupal\Core\Path | core/ |
Cache the alias whitelist. | 2 | 1 | |
AliasWhitelistInterface | interface | Drupal\path_alias | core/ |
Cache the alias whitelist. | 1 | 1 | ||
AllowedPackages | class | Drupal\Composer\Plugin\Scaffold | composer/ |
Determine recursively which packages have been allowed to scaffold files. | ||||
AllowedTagsXssTrait | in drupal:8.0.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Field\FieldFilteredMarkup instead. |
trait | Drupal\Core\Field | core/ |
Useful methods when dealing with displaying allowed tags. | 8 | ||
AllowedTagsXssTraitDeprecateTest | class | Drupal\Tests\Core\Field | core/ |
Tests AllowedTagsXssTrait. | ||||
AllowedValuesConstraint | class | Drupal\Core\Validation\Plugin\Validation\Constraint | core/ |
Checks for the value being allowed. | 1 | |||
AllowedValuesConstraintValidator | class | Drupal\Core\Validation\Plugin\Validation\Constraint | core/ |
Validates the AllowedValues constraint. | ||||
AllowedValuesConstraintValidatorTest | class | Drupal\KernelTests\Core\TypedData | core/ |
Tests AllowedValues validation constraint with both valid and invalid values. | ||||
AllowToolbarPath | class | Drupal\toolbar\PageCache | core/ |
Cache policy for the toolbar page cache service. | 1 | 2 | ||
AllowToolbarPathTest | class | Drupal\Tests\toolbar\Unit\PageCache | core/ |
@coversDefaultClass \Drupal\toolbar\PageCache\AllowToolbarPath @group toolbar | ||||
AlreadyInstalledException | class | Drupal\Core\Installer\Exception | core/ |
Exception thrown if Drupal is installed already. | 1 | |||
AlterableInterface | interface | Drupal\Core\Database\Query | core/ |
Interface for a query that can be manipulated via an alter hook. | 2 | 13 | ||
AlterTest | class | Drupal\KernelTests\Core\Database | core/ |
Tests the hook_query_alter capabilities of the Select builder. | ||||
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(). | ||||
AmbiguousEntityClassException | class | Drupal\Core\Entity\Exception | core/ |
Exception thrown if multiple entity types exist for an entity class. | 2 | |||
Analyze | class | Drupal\views_ui\Form\Ajax | core/ |
Displays analysis information for a view. | ||||
Analyzer | class | Drupal\views | core/ |
This tool is a small plugin manager to perform analysis on a view and report results to the user. This tool is meant to let modules that provide data to Views also help users properly use that data by detecting invalid configurations. Views itself… | 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 | 8 | ||
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 @group Annotation @runTestsInSeparateProcesses | ||||
AnnotatedClassDiscoveryTest | class | Drupal\Tests\Component\Annotation | core/ |
@coversDefaultClass \Drupal\Component\Annotation\Plugin\Discovery\AnnotatedClassDiscovery @group Annotation @runTestsInSeparateProcesses | ||||
AnnotatedClassDiscoveryTest | class | Drupal\Tests\Component\Plugin\Discovery | core/ |
@coversDefaultClass \Drupal\Component\Annotation\Plugin\Discovery\AnnotatedClassDiscovery | ||||
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 | ||
AnnotationBaseStub | class | Drupal\Tests\Component\Annotation | core/ |
|||||
AnnotationBaseTest | class | Drupal\Tests\Component\Annotation | core/ |
@coversDefaultClass \Drupal\Component\Annotation\AnnotationBase @group Annotation | ||||
AnnotationBridgeDecorator | class | Drupal\Component\Annotation\Plugin\Discovery | core/ |
Ensures that all definitions are run through the annotation process. | 2 | |||
AnnotationBridgeDecoratorTest | class | Drupal\Tests\Component\Annotation\Plugin\Discovery | core/ |
@coversDefaultClass \Drupal\Component\Annotation\Plugin\Discovery\AnnotationBridgeDecorator @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. | 4 | 5 | ||
AnnotationTargetAll | class | Drupal\Tests\Component\Annotation\Doctrine\Fixtures | core/ |
Plugin annotation @Target("ALL"); | 1 | 1 |
Pagination
- Previous page
- Page 5
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.