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
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.
PagerTestController class Drupal\pager_test\Controller core/modules/system/tests/modules/pager_test/src/Controller/PagerTestController.php Controller routine for testing the pager.
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 @coversDefaultClass \Drupal\views\Plugin\views\display\Page[[api-linebreak]] @group views
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 @coversDefaultClass \Drupal\Core\Routing\Enhancer\ParamConversionEnhancer[[api-linebreak]] @group Enhancer
ParamConverterInterface interface Drupal\Core\ParamConverter core/lib/Drupal/Core/ParamConverter/ParamConverterInterface.php Interface for parameter converters. 13 5
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 3
ParamConverterManagerTest class Drupal\Tests\Core\ParamConverter core/tests/Drupal/Tests/Core/ParamConverter/ParamConverterManagerTest.php @coversDefaultClass \Drupal\Core\ParamConverter\ParamConverterManager[[api-linebreak]] @group ParamConverter
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
ParserInterface interface Drupal\aggregator\Plugin core/modules/aggregator/src/Plugin/ParserInterface.php Defines an interface for aggregator parser implementations. 2 2
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 @coversDefaultClass \Drupal\Core\Render\Element\PasswordConfirm[[api-linebreak]] @group Render
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
PasswordHashingTest class Drupal\Tests\Core\Password core/tests/Drupal/Tests/Core/Password/PasswordHashingTest.php Unit tests for password hashing API.
PasswordInterface interface Drupal\Core\Password core/lib/Drupal/Core/Password/PasswordInterface.php Secure password hashing functions for user authentication. 1 4
PasswordItem class Drupal\Core\Field\Plugin\Field\FieldType core/lib/Drupal/Core/Field/Plugin/Field/FieldType/PasswordItem.php Defines the 'password' entity field type. 1
PasswordItemTest class Drupal\KernelTests\Core\Field\FieldType core/tests/Drupal/KernelTests/Core/Field/FieldType/PasswordItemTest.php @coversDefaultClass \Drupal\Core\Field\Plugin\Field\FieldType\PasswordItem[[api-linebreak]] @group Field
PasswordTest class Drupal\Tests\Core\Render\Element core/tests/Drupal/Tests/Core/Render/Element/PasswordTest.php @coversDefaultClass \Drupal\Core\Render\Element\Password[[api-linebreak]] @group Render
PasswordWidgetThemeFunctionTest class Drupal\Tests\user\FunctionalJavascript core/modules/user/tests/src/FunctionalJavascript/PasswordWidgetThemeFunctionTest.php Tests the JS components added to the PasswordConfirm render element.
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
PathAliasHalJsonAnonTest class Drupal\Tests\hal\Functional\path_alias core/modules/hal/tests/src/Functional/path_alias/PathAliasHalJsonAnonTest.php @group hal @group legacy
PathAliasHalJsonBasicAuthTest class Drupal\Tests\hal\Functional\path_alias core/modules/hal/tests/src/Functional/path_alias/PathAliasHalJsonBasicAuthTest.php @group hal @group legacy
PathAliasHalJsonCookieTest class Drupal\Tests\hal\Functional\path_alias core/modules/hal/tests/src/Functional/path_alias/PathAliasHalJsonCookieTest.php @group hal @group legacy
PathAliasHalJsonTestBase abstract class Drupal\Tests\hal\Functional\path_alias core/modules/hal/tests/src/Functional/path_alias/PathAliasHalJsonTestBase.php Base hal_json test class for the path_alias entity type. 3
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. 7 1
PathAliasStorage class Drupal\path_alias core/modules/path_alias/src/PathAliasStorage.php Defines the storage handler class for path_alias entities.
PathAliasStorageSchema class Drupal\path_alias core/modules/path_alias/src/PathAliasStorageSchema.php Defines the path_alias schema handler.
PathAliasSubscriber class Drupal\path_alias\EventSubscriber core/modules/path_alias/src/EventSubscriber/PathAliasSubscriber.php Provides a path subscriber that converts path aliases. 2

Other projects


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