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
ProcessedTextTestTrait trait Drupal\Tests\filter\Traits core/modules/filter/tests/src/Traits/ProcessedTextTestTrait.php Provides a trait for testing processed text. 5
ProcessFactory final class Drupal\fixture_manipulator core/modules/package_manager/tests/modules/fixture_manipulator/src/ProcessFactory.php Process factory that always sets the COMPOSER_MIRROR_PATH_REPOS env variable.
ProcessField

in drupal:11.3.0 and is removed from drupal:12.0.0. There is no replacement.

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\FunctionalJavascript\Batch core/modules/system/tests/src/FunctionalJavascript/Batch/ProcessingTest.php Tests Processing.
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.
ProcessOutputCallback final class Drupal\package_manager core/modules/package_manager/src/ProcessOutputCallback.php A process callback for capturing output. 3
ProcessOutputCallbackTest class Drupal\Tests\package_manager\Unit core/modules/package_manager/tests/src/Unit/ProcessOutputCallbackTest.php Tests Process Output Callback.
ProcessPluginBase abstract class Drupal\migrate core/modules/migrate/src/ProcessPluginBase.php The base class for all migrate process plugins. 78 78
ProcessPluginBase class Drupal\Tests\migrate\Unit\process core/modules/migrate/tests/src/Unit/process/ProcessPluginBaseTest.php Extends ProcessPluginBase as a non-abstract class.
ProcessPluginBaseTest class Drupal\Tests\migrate\Unit\process core/modules/migrate/tests/src/Unit/process/ProcessPluginBaseTest.php Tests the base process plugin class.
ProfileAutoUninstallFailureTest class Drupal\FunctionalTests\Installer core/tests/Drupal/FunctionalTests/Installer/ProfileAutoUninstallFailureTest.php Tests that profile-provided dependencies thwart auto-uninstall.
ProfileAutoUninstallTest class Drupal\FunctionalTests\Installer core/tests/Drupal/FunctionalTests/Installer/ProfileAutoUninstallTest.php Tests automatically uninstalling a profile that opts into it.
ProfileExtensionList class Drupal\Core\Extension core/lib/Drupal/Core/Extension/ProfileExtensionList.php Provides a list of installation profiles. 6 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 3
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\source\d6 core/modules/user/src/Plugin/migrate/source/d6/ProfileFieldOptionTranslation.php Drupal 6 i18n profile field option labels source from database. 1
ProfileFieldOptionTranslation

in drupal:11.3.0 and is removed from drupal:12.0.0. There is no replacement.

class Drupal\user\Plugin\migrate\process\d6 core/modules/user/src/Plugin/migrate/process/d6/ProfileFieldOptionTranslation.php Determines the settings property and translation.
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

in drupal:11.3.0 and is removed from drupal:12.0.0. There is no replacement.

class Drupal\user\Plugin\migrate\process core/modules/user/src/Plugin/migrate/process/ProfileFieldSettings.php Determines the settings for the profile field.
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. 1
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.
ProfileSkipInstallTest class Drupal\FunctionalTests\Installer core/tests/Drupal/FunctionalTests/Installer/ProfileSkipInstallTest.php Tests not installing a profile that opts out of it.
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
ProfileWithRecipesTest class Drupal\FunctionalTests\Installer core/tests/Drupal/FunctionalTests/Installer/ProfileWithRecipesTest.php Tests installing from a profile that also applies recipes.
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. 1
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. 5
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. 3
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
PromotedContentPageTest class Drupal\Tests\node\Functional\Views core/modules/node/tests/src/Functional/Views/PromotedContentPageTest.php Tests the promoted content view provided with views.
PromotedContentViewTestTrait trait Drupal\Tests\node\Traits core/modules/node/tests/src/Traits/PromotedContentViewTestTrait.php Provides a method to enable the promoted_content view. 20
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.

Other projects


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