Classes, traits, and interfaces - main - drupal

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 1529

Name Deprecated Object type Namespace File name Summary Direct uses Use statements Strings
ProfileFieldTranslationTest class Drupal\Tests\config_translation\Kernel\Plugin\migrate\source\d6 core/modules/config_translation/tests/src/Kernel/Plugin/migrate/source/d6/ProfileFieldTranslationTest.php Tests the i18nProfileField source plugin.
ProfileFieldValues class Drupal\user\Plugin\migrate\source\d6 core/modules/user/src/Plugin/migrate/source/d6/ProfileFieldValues.php Drupal 6 profile fields values source from database. 1
ProfileFieldValuesTest class Drupal\Tests\user\Kernel\Plugin\migrate\source\d6 core/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/ProfileFieldValuesTest.php Tests the d6_profile_field_values source plugin.
ProfileForm class Drupal\user core/modules/user/src/ProfileForm.php Form handler for the profile forms. 1
ProfileInstallRequirementsRequirements class Drupal\profile_install_requirements\Install\Requirements core/profiles/tests/profile_install_requirements/src/Install/Requirements/ProfileInstallRequirementsRequirements.php Provides method for checking requirements during install time.
ProfileRequirementsTest class Drupal\FunctionalTests\Installer core/tests/Drupal/FunctionalTests/Installer/ProfileRequirementsTest.php Tests installing a profile that implements InstallRequirementsInterface.
ProfileTranslationHandler class Drupal\user core/modules/user/src/ProfileTranslationHandler.php Defines the translation handler for users. 1
ProfileValues class Drupal\user\Plugin\migrate core/modules/user/src/Plugin/migrate/ProfileValues.php Plugin class for user migrations dealing with profile values. 1
ProgrammaticTest class Drupal\Tests\system\Kernel\Form core/modules/system/tests/src/Kernel/Form/ProgrammaticTest.php Tests the programmatic form submission behavior.
ProjectCoreCompatibility final class Drupal\update core/modules/update/src/ProjectCoreCompatibility.php Utility class to set core compatibility messages for project releases. 2
ProjectCoreCompatibilityTest class Drupal\Tests\update\Unit core/modules/update/tests/src/Unit/ProjectCoreCompatibilityTest.php Tests Drupal\update\ProjectCoreCompatibility.
ProjectInfo final class Drupal\package_manager core/modules/package_manager/src/ProjectInfo.php Retrieves project information from the Update Status module. 2
ProjectInfo class Drupal\Core\Utility core/lib/Drupal/Core/Utility/ProjectInfo.php Performs operations on drupal.org project data. 4
ProjectInfoTest class Drupal\Tests\package_manager\Kernel core/modules/package_manager/tests/src/Kernel/ProjectInfoTest.php Tests Drupal\package_manager\ProjectInfo.
ProjectRelease final class Drupal\update core/modules/update/src/ProjectRelease.php Provides a project release value object. 4
ProjectReleaseTest class Drupal\Tests\update\Unit core/modules/update/tests/src/Unit/ProjectReleaseTest.php Tests Drupal\update\ProjectRelease.
ProjectSecurityData final class Drupal\update core/modules/update/src/ProjectSecurityData.php Calculates a project's security coverage information. 1
ProjectSecurityRequirement final class Drupal\update core/modules/update/src/ProjectSecurityRequirement.php Class for generating a project's security requirement. 1
PromoteNode class Drupal\node\Plugin\Action core/modules/node/src/Plugin/Action/PromoteNode.php Promotes a node.
ProtectedDirectory class Drupal\Core\File core/lib/Drupal/Core/File/ProtectedDirectory.php A value object representing a protected directory.
ProtectedUserFieldConstraint class Drupal\user\Plugin\Validation\Constraint core/modules/user/src/Plugin/Validation/Constraint/ProtectedUserFieldConstraint.php Checks if the plain text password is provided for editing a protected field. 1
ProtectedUserFieldConstraintValidator class Drupal\user\Plugin\Validation\Constraint core/modules/user/src/Plugin/Validation/Constraint/ProtectedUserFieldConstraintValidator.php Validates the ProtectedUserFieldConstraint constraint. 1
ProtectedUserFieldConstraintValidatorTest class Drupal\Tests\user\Unit\Plugin\Validation\Constraint core/modules/user/tests/src/Unit/Plugin/Validation/Constraint/ProtectedUserFieldConstraintValidatorTest.php Tests Drupal\user\Plugin\Validation\Constraint\ProtectedUserFieldConstraintValidator.
ProtocolVersionCacheContext class Drupal\Core\Cache\Context core/lib/Drupal/Core/Cache/Context/ProtocolVersionCacheContext.php Defines the ProtocolVersionCacheContext service, for "per protocol" caching. 1 2
ProtocolVersionCacheContextTest class Drupal\Tests\Core\Cache\Context core/tests/Drupal/Tests/Core/Cache/Context/ProtocolVersionCacheContextTest.php Tests Drupal\Core\Cache\Context\ProtocolVersionCacheContext.
Provider class Drupal\media\OEmbed core/modules/media/src/OEmbed/Provider.php Value object for oEmbed providers. 7
ProviderException class Drupal\media\OEmbed core/modules/media/src/OEmbed/ProviderException.php Exception thrown if an oEmbed provider causes an error. 3
ProviderFilterDecorator class Drupal\migrate\Plugin\Discovery core/modules/migrate/src/Plugin/Discovery/ProviderFilterDecorator.php Remove plugin definitions with non-existing providers. 2
ProviderRepository class Drupal\media\OEmbed core/modules/media/src/OEmbed/ProviderRepository.php Retrieves and caches information about oEmbed providers. 1 3 2
ProviderRepository class Drupal\media_test_oembed core/modules/media/tests/modules/media_test_oembed/src/ProviderRepository.php Overrides the oEmbed provider repository service for testing purposes.
ProviderRepositoryInterface interface Drupal\media\OEmbed core/modules/media/src/OEmbed/ProviderRepositoryInterface.php Defines an interface for a collection of oEmbed provider information. 1 2
ProviderRepositoryTest class Drupal\Tests\media\Unit core/modules/media/tests/src/Unit/ProviderRepositoryTest.php Tests Drupal\media\OEmbed\ProviderRepository.
ProviderRepositoryTest class Drupal\Tests\media\Kernel core/modules/media/tests/src/Kernel/ProviderRepositoryTest.php Tests the oEmbed provider repository.
ProxyBuilder class Drupal\Core\ProxyBuilder core/lib/Drupal/Core/ProxyBuilder/ProxyBuilder.php Extend the component proxy builder by using the DependencySerializationTrait. 2
ProxyBuilder class Drupal\Component\ProxyBuilder core/lib/Drupal/Component/ProxyBuilder/ProxyBuilder.php Generates the string representation of the proxy service. 1 5
ProxyBuilderTest class Drupal\Tests\Core\ProxyBuilder core/tests/Drupal/Tests/Core/ProxyBuilder/ProxyBuilderTest.php Tests Drupal\Core\ProxyBuilder\ProxyBuilder.
ProxyBuilderTest class Drupal\Tests\Component\ProxyBuilder core/tests/Drupal/Tests/Component/ProxyBuilder/ProxyBuilderTest.php Tests Drupal\Component\ProxyBuilder\ProxyBuilder.
ProxyServicesPass class Drupal\Core\DependencyInjection\Compiler core/lib/Drupal/Core/DependencyInjection/Compiler/ProxyServicesPass.php Replaces all services with a lazy flag. 2
ProxyServicesPassTest class Drupal\Tests\Core\DependencyInjection\Compiler core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/ProxyServicesPassTest.php Tests Drupal\Core\DependencyInjection\Compiler\ProxyServicesPass.
Psr7RequestValueResolver final class Drupal\Core\Controller\ArgumentResolver core/lib/Drupal/Core/Controller/ArgumentResolver/Psr7RequestValueResolver.php Yields a PSR7 request object based on the request object passed along. 2
PsrResponseSubscriber class Drupal\Core\EventSubscriber core/lib/Drupal/Core/EventSubscriber/PsrResponseSubscriber.php Response subscriber for handling PSR-7 responses. 1 2
PsrResponseSubscriberTest class Drupal\Tests\Core\EventSubscriber core/tests/Drupal/Tests/Core/EventSubscriber/PsrResponseSubscriberTest.php Tests Drupal\Core\EventSubscriber\PsrResponseSubscriber.
PublicStream class Drupal\Core\StreamWrapper core/lib/Drupal/Core/StreamWrapper/PublicStream.php Defines a Drupal public (public://) stream wrapper class. 2 21 2
PublishAction class Drupal\Core\Action\Plugin\Action core/lib/Drupal/Core/Action/Plugin/Action/PublishAction.php Publishes an entity. 1 2
PublishActionTest class Drupal\KernelTests\Core\Action core/tests/Drupal/KernelTests/Core/Action/PublishActionTest.php Tests Publish Action.
Qualified final class Drupal\Tests\Component\Annotation\Doctrine\Fixtures\Attribute core/tests/Drupal/Tests/Component/Annotation/Doctrine/Fixtures/Attribute/Qualified.php #[ExtraAttributes\ExampleAttribute]
Query abstract class Drupal\Core\Database\Query core/lib/Drupal/Core/Database/Query/Query.php Base class for query builders. 7
Query class Drupal\Core\Entity\Query\Sql core/lib/Drupal/Core/Entity/Query/Sql/Query.php The SQL storage entity query class. 2 2
Query class Drupal\Core\Entity\Query\Null core/lib/Drupal/Core/Entity/Query/Null/Query.php Defines the entity query for configuration entities.
Query class Drupal\Core\Entity\KeyValueStore\Query core/lib/Drupal/Core/Entity/KeyValueStore/Query/Query.php Defines the entity query for entities stored in a key value backend.

Other projects


Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.