Classes, traits, and interfaces - 9.5.x - 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 1523

Name Deprecated Object type Namespace File name Summary Direct uses Use statements Strings
PrivateStream class Drupal\Core\StreamWrapper core/lib/Drupal/Core/StreamWrapper/PrivateStream.php Drupal private (private://) stream wrapper class. 4
PrivateTempStore class Drupal\Core\TempStore core/lib/Drupal/Core/TempStore/PrivateTempStore.php Stores and retrieves temporary data for a given owner. 1
PrivateTempStoreFactory class Drupal\Core\TempStore core/lib/Drupal/Core/TempStore/PrivateTempStoreFactory.php Creates a PrivateTempStore object for a given collection. 16 2
PrivateTempStoreTest class Drupal\Tests\Core\TempStore core/tests/Drupal/Tests/Core/TempStore/PrivateTempStoreTest.php @coversDefaultClass \Drupal\Core\TempStore\PrivateTempStore[[api-linebreak]] @group TempStore
ProcessedText class Drupal\filter\Element core/modules/filter/src/Element/ProcessedText.php Provides a processed text render element.
ProcessField class Drupal\field\Plugin\migrate\process core/modules/field/src/Plugin/migrate/process/ProcessField.php Get the value from a method call on a field plugin instance. 1
ProcessFieldTest class Drupal\Tests\field\Unit\Plugin\migrate\process core/modules/field/tests/src/Unit/Plugin/migrate/process/ProcessFieldTest.php Tests the ProcessField migrate process plugin.
ProcessingTest class Drupal\Tests\system\Functional\Batch core/modules/system/tests/src/Functional/Batch/ProcessingTest.php Tests batch processing in form and non-form workflow.
ProcessorInterface interface Drupal\aggregator\Plugin core/modules/aggregator/src/Plugin/ProcessorInterface.php Defines an interface for aggregator processor implementations. 2 2
ProcessPluginBase abstract class Drupal\migrate core/modules/migrate/src/ProcessPluginBase.php The base class for all migrate process plugins. 74 74
ProfileExtensionList class Drupal\Core\Extension core/lib/Drupal/Core/Extension/ProfileExtensionList.php Provides a list of installation profiles. 7 2
ProfileField class Drupal\user\Plugin\migrate\source core/modules/user/src/Plugin/migrate/source/ProfileField.php Drupal 6/7 profile field source from database. 2 2
ProfileFieldCheckRequirementsTest class Drupal\Tests\user\Kernel\Migrate\d6 core/modules/user/tests/src/Kernel/Migrate/d6/ProfileFieldCheckRequirementsTest.php Tests check requirements for profile_field source plugin.
ProfileFieldCheckRequirementsTest class Drupal\Tests\user\Kernel\Migrate\d7 core/modules/user/tests/src/Kernel/Migrate/d7/ProfileFieldCheckRequirementsTest.php Tests check requirements for profile_field source plugin.
ProfileFieldOptionTranslation class Drupal\user\Plugin\migrate\process\d6 core/modules/user/src/Plugin/migrate/process/d6/ProfileFieldOptionTranslation.php Determines the settings property and translation.
ProfileFieldOptionTranslation class Drupal\user\Plugin\migrate\source\d6 core/modules/user/src/Plugin/migrate/source/d6/ProfileFieldOptionTranslation.php Drupal 6 i18n profile field option labels source from database.
ProfileFieldOptionTranslationTest class Drupal\Tests\user\Kernel\Plugin\migrate\source\d6 core/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/ProfileFieldOptionTranslationTest.php Tests the field option translation source plugin.
ProfileFieldSettings class Drupal\user\Plugin\migrate\process core/modules/user/src/Plugin/migrate/process/ProfileFieldSettings.php Plugin annotation @MigrateProcessPlugin( id = "profile_field_settings" )
ProfileFieldTest class Drupal\Tests\user\Kernel\Plugin\migrate\source core/modules/user/tests/src/Kernel/Plugin/migrate/source/ProfileFieldTest.php Tests the profile_field source plugin. 1 1
ProfileFieldTranslation class Drupal\config_translation\Plugin\migrate\source\d6 core/modules/config_translation/src/Plugin/migrate/source/d6/ProfileFieldTranslation.php Drupal 6 i18n strings profile field source from database.
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.
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.
ProfileTranslationHandler class Drupal\user core/modules/user/src/ProfileTranslationHandler.php Defines the translation handler for users.
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 @coversDefaultClass \Drupal\update\ProjectCoreCompatibility[[api-linebreak]]
ProjectInfo class Drupal\Core\Utility core/lib/Drupal/Core/Utility/ProjectInfo.php Performs operations on drupal.org project data. 4
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 @coversDefaultClass \Drupal\update\ProjectRelease[[api-linebreak]]
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 @coversDefaultClass \Drupal\user\Plugin\Validation\Constraint\ProtectedUserFieldConstraintValidator[[api-linebreak]] @group user
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 @coversDefaultClass \Drupal\Core\Cache\Context\ProtocolVersionCacheContext[[api-linebreak]] @group Cache
Provider class Drupal\media\OEmbed core/modules/media/src/OEmbed/Provider.php Value object for oEmbed providers. 5
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
ProviderRepositoryTest class Drupal\Tests\media\Unit core/modules/media/tests/src/Unit/ProviderRepositoryTest.php @coversDefaultClass \Drupal\media\OEmbed\ProviderRepository[[api-linebreak]]
ProviderRepositoryTest class Drupal\Tests\media\Kernel core/modules/media/tests/src/Kernel/ProviderRepositoryTest.php @coversDefaultClass \Drupal\media\OEmbed\ProviderRepository[[api-linebreak]]
ProviderRepositoryTest class Drupal\Tests\media\Functional core/modules/media/tests/src/Functional/ProviderRepositoryTest.php Tests the oEmbed provider repository.

Other projects


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