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
PagerSelectExtender class Drupal\Core\Database\Query core/lib/Drupal/Core/Database/Query/PagerSelectExtender.php Query extender for pager queries. 1 14
PagerTest class Drupal\Tests\views\Functional\Wizard core/modules/views/tests/src/Functional/Wizard/PagerTest.php Tests the ability of the views wizard to create views without a pager.
PagerTest class Drupal\Tests\views\Functional\Plugin core/modules/views/tests/src/Functional/Plugin/PagerTest.php Tests the pluggable pager system.
PagerTest class Drupal\Tests\system\Functional\Pager core/modules/system/tests/src/Functional/Pager/PagerTest.php Tests pager functionality.
PagerTestController class Drupal\pager_test\Controller core/modules/system/tests/modules/pager_test/src/Controller/PagerTestController.php Controller routine for testing the pager.
PagerTestThemeHooks class Drupal\pager_test\Hook core/modules/system/tests/modules/pager_test/src/Hook/PagerTestThemeHooks.php Hook implementations for pager_test.
PageTest class Drupal\Tests\system\Functional\Batch core/modules/system/tests/src/Functional/Batch/PageTest.php Tests the content of the progress page.
PageTest class Drupal\Tests\views\Unit\Plugin\display core/modules/views/tests/src/Unit/Plugin/display/PageTest.php Tests Drupal\views\Plugin\views\display\Page.
PageTitle class Drupal\Core\Render\Element core/lib/Drupal/Core/Render/Element/PageTitle.php Provides a render element for the title of an HTML page.
PageTitleBlock class Drupal\Core\Block\Plugin\Block core/lib/Drupal/Core/Block/Plugin/Block/PageTitleBlock.php Provides a block to display the page title.
PageTitleTest class Drupal\Tests\system\Functional\System core/modules/system/tests/src/Functional/System/PageTitleTest.php Tests HTML output escaping of page title, site name, and slogan.
PageVariantInterface interface Drupal\Core\Display core/lib/Drupal/Core/Display/PageVariantInterface.php Provides an interface for PageDisplayVariant plugins. 3 4
PageViewTest class Drupal\Tests\node\Functional core/modules/node/tests/src/Functional/PageViewTest.php Create a node and test edit permissions.
PaginationAJAXTest class Drupal\Tests\views\FunctionalJavascript core/modules/views/tests/src/FunctionalJavascript/PaginationAJAXTest.php Tests the click sorting AJAX functionality of Views exposed forms.
ParamConversionEnhancer class Drupal\Core\Routing\Enhancer core/lib/Drupal/Core/Routing/Enhancer/ParamConversionEnhancer.php Provides a route enhancer that handles parameter conversion. 1 2
ParamConversionEnhancerTest class Drupal\Tests\Core\Enhancer core/tests/Drupal/Tests/Core/Enhancer/ParamConversionEnhancerTest.php Tests Drupal\Core\Routing\Enhancer\ParamConversionEnhancer.
ParamConverterInterface interface Drupal\Core\ParamConverter core/lib/Drupal/Core/ParamConverter/ParamConverterInterface.php Interface for parameter converters. 13 9
ParamConverterManager class Drupal\Core\ParamConverter core/lib/Drupal/Core/ParamConverter/ParamConverterManager.php Manages converter services for converting request parameters to full objects. 1 2
ParamConverterManagerInterface interface Drupal\Core\ParamConverter core/lib/Drupal/Core/ParamConverter/ParamConverterManagerInterface.php Provides an interface for a parameter converter manager. 1 5
ParamConverterManagerTest class Drupal\Tests\Core\ParamConverter core/tests/Drupal/Tests/Core/ParamConverter/ParamConverterManagerTest.php Tests Drupal\Core\ParamConverter\ParamConverterManager.
ParamConverterRouteRequirementInterface interface Drupal\Core\ParamConverter core/lib/Drupal/Core/ParamConverter/ParamConverterRouteRequirementInterface.php Interface for param converters providing a route requirement for parameters. 1
ParamConverterSubscriber class Drupal\Core\EventSubscriber core/lib/Drupal/Core/EventSubscriber/ParamConverterSubscriber.php Event subscriber for registering parameter converters with routes. 2
ParamNotConvertedException class Drupal\Core\ParamConverter core/lib/Drupal/Core/ParamConverter/ParamNotConvertedException.php Provides an exception class for a request parameter that was not converted. 10
ParentWithReturn class Drupal\drupal_debug_test_core core/tests/fixtures/TestTools/drupal_debug_classloader_test_classes.php Fixture: parent class with 6 1
Password class Drupal\Core\Render\Element core/lib/Drupal/Core/Render/Element/Password.php Provides a form element for entering a password, with hidden text. 1
PasswordConfirm class Drupal\Core\Render\Element core/lib/Drupal/Core/Render/Element/PasswordConfirm.php Provides a form element for double-input of passwords. 1
PasswordConfirmTest class Drupal\Tests\Core\Render\Element core/tests/Drupal/Tests/Core/Render/Element/PasswordConfirmTest.php Tests Drupal\Core\Render\Element\PasswordConfirm.
PasswordConfirmWidgetTest class Drupal\Tests\user\FunctionalJavascript core/modules/user/tests/src/FunctionalJavascript/PasswordConfirmWidgetTest.php Tests the JS components added to the PasswordConfirm render element. 1 1
PasswordGeneratorInterface interface Drupal\Core\Password core/lib/Drupal/Core/Password/PasswordGeneratorInterface.php Interface for generating passwords. 1 2
PasswordInterface interface Drupal\Core\Password core/lib/Drupal/Core/Password/PasswordInterface.php Secure password hashing functions for user authentication. 2 12
PasswordItem class Drupal\Core\Field\Plugin\Field\FieldType core/lib/Drupal/Core/Field/Plugin/Field/FieldType/PasswordItem.php Defines the 'password' entity field type. 2 1
PasswordItemTest class Drupal\KernelTests\Core\Field\FieldType core/tests/Drupal/KernelTests/Core/Field/FieldType/PasswordItemTest.php Tests Drupal\Core\Field\Plugin\Field\FieldType\PasswordItem.
PasswordRequirementsBcryptTest class Drupal\KernelTests\Core\Password core/tests/Drupal/KernelTests/Core/Password/PasswordRequirementsBcryptTest.php Tests Password System Requirements.
PasswordRequirementsDefaultTest class Drupal\KernelTests\Core\Password core/tests/Drupal/KernelTests/Core/Password/PasswordRequirementsDefaultTest.php Tests Password System Requirements.
PasswordRequirementsUnknownTest class Drupal\KernelTests\Core\Password core/tests/Drupal/KernelTests/Core/Password/PasswordRequirementsUnknownTest.php Tests Password System Requirements.
PasswordTest class Drupal\Tests\Core\Render\Element core/tests/Drupal/Tests/Core/Render/Element/PasswordTest.php Tests Drupal\Core\Render\Element\Password.
PasswordTestBase abstract class Drupal\KernelTests\Core\Password core/tests/Drupal/KernelTests/Core/Password/PasswordTestBase.php Integration tests for the PHP password hashing service. 7
PasswordVerifyTest class Drupal\Tests\phpass\Unit core/modules/phpass/tests/src/Unit/PasswordVerifyTest.php Unit tests for password hashing API.
PathAdminTest class Drupal\Tests\path\Functional core/modules/path/tests/src/Functional/PathAdminTest.php Tests the Path admin UI.
PathAlias class Drupal\path_alias\Entity core/modules/path_alias/src/Entity/PathAlias.php Defines the path_alias entity class. 3
PathAliasConstraint class Drupal\path\Plugin\Validation\Constraint core/modules/path/src/Plugin/Validation/Constraint/PathAliasConstraint.php Validation constraint for changing path aliases in pending revisions.
PathAliasConstraintValidator class Drupal\path\Plugin\Validation\Constraint core/modules/path/src/Plugin/Validation/Constraint/PathAliasConstraintValidator.php Constraint validator for changing path aliases in pending revisions.
PathAliasForm class Drupal\path core/modules/path/src/PathAliasForm.php Form handler for the path alias edit forms. 1
PathAliasInterface interface Drupal\path_alias core/modules/path_alias/src/PathAliasInterface.php Provides an interface defining a path_alias entity. 1 3
PathAliasJsonAnonTest class Drupal\Tests\path_alias\Functional\Rest core/modules/path_alias/tests/src/Functional/Rest/PathAliasJsonAnonTest.php Test path_alias entities for unauthenticated JSON requests.
PathAliasJsonBasicAuthTest class Drupal\Tests\path_alias\Functional\Rest core/modules/path_alias/tests/src/Functional/Rest/PathAliasJsonBasicAuthTest.php Test path_alias entities for JSON requests via basic auth.
PathAliasJsonCookieTest class Drupal\Tests\path_alias\Functional\Rest core/modules/path_alias/tests/src/Functional/Rest/PathAliasJsonCookieTest.php Test path_alias entities for JSON requests with cookie authentication.
PathAliasListBuilder class Drupal\path core/modules/path/src/PathAliasListBuilder.php Defines a class to build a listing of path_alias entities. 1
PathAliasMenuLinkContentTest class Drupal\Tests\menu_link_content\Kernel core/modules/menu_link_content/tests/src/Kernel/PathAliasMenuLinkContentTest.php Ensures that the menu tree adapts to path alias changes.
PathAliasResourceTestBase abstract class Drupal\Tests\path_alias\Functional\Rest core/modules/path_alias/tests/src/Functional/Rest/PathAliasResourceTestBase.php Base class for path_alias EntityResource tests. 6

Other projects


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