Classes, traits, and interfaces - 10.3.x - drupal
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 1518
Name | Deprecated | Object type | Namespace | File name | Summary | Direct uses | Use statements | Strings |
---|---|---|---|---|---|---|---|---|
Permissions | class | Drupal\content_moderation | core/ |
Defines a class for dynamic permissions based on transitions. | 1 | |||
PermissionsHashGenerator | class | Drupal\Core\Session | core/ |
Generates and caches the permissions hash for a user. | 1 | 2 | ||
PermissionsHashGeneratorInterface | interface | Drupal\Core\Session | core/ |
Defines the user permissions hash generator interface. | 1 | 1 | ||
PermissionsHashGeneratorTest | class | Drupal\Tests\Core\Session | core/ |
@coversDefaultClass \Drupal\Core\Session\PermissionsHashGenerator[[api-linebreak]] @group Session | ||||
PermissionsPerBundle | final class | Drupal\Core\Config\Action\Plugin\ConfigAction | core/ |
@internal This API is experimental. | ||||
PermissionsPerBundleDeriver | final class | Drupal\Core\Config\Action\Plugin\ConfigAction\Deriver | core/ |
@internal This API is experimental. | 1 | |||
PermissionsPerBundleTest | class | Drupal\KernelTests\Core\Recipe | core/ |
@covers \Drupal\Core\Config\Action\Plugin\ConfigAction\PermissionsPerBundle[[api-linebreak]] @covers \Drupal\Core\Config\Action\Plugin\ConfigAction\Deriver\PermissionsPerBundleDeriver[[api-linebreak]] | ||||
PermissionsTest | class | Drupal\Tests\user\Unit\Plugin\views\field | core/ |
@coversDefaultClass \Drupal\user\Plugin\views\field\Permissions[[api-linebreak]] @group user | ||||
PermissionsTest | class | Drupal\Tests\system\Kernel | core/ |
@group system | ||||
PersistentDatabaseLockBackend | class | Drupal\Core\Lock | core/ |
Defines the persistent database lock backend. | 2 | |||
PersistentDatabaseLockBackend | class | Drupal\Core\ProxyClass\Lock | core/ |
Provides a proxy class for \Drupal\Core\Lock\PersistentDatabaseLockBackend. | ||||
PgsqlCastedIntFieldJoinTest | class | Drupal\Tests\pgsql\Kernel\pgsql\Plugin\views | core/ |
Tests PostgreSQL specific cast handling. | ||||
PgsqlDriverLegacyTest | class | Drupal\Tests\pgsql\Kernel\pgsql | core/ |
Tests the deprecations of the PostgreSQL database driver classes in Core. | ||||
PgsqlQueryFactory | class | Drupal\workspaces\EntityQuery | core/ |
Workspaces PostgreSQL-specific entity query implementation. | 2 | |||
PhoneField | class | Drupal\telephone\Plugin\migrate\field\d7 | core/ |
#[MigrateField(id: 'phone', core: [ 7, ], type_map: [ 'phone' => 'telephone', ], source_module: 'phone', destination_module: 'telephone')] | ||||
Php | class | Drupal\Component\Uuid | core/ |
Generates a UUID v4 (RFC 4122 section 4.4) using PHP code. | 4 | 2 | ||
PhpArrayContainer | class | Drupal\Component\DependencyInjection | core/ |
Provides a container optimized for Drupal's needs. | ||||
PhpArrayContainerTest | class | Drupal\Tests\Component\DependencyInjection | core/ |
@coversDefaultClass \Drupal\Component\DependencyInjection\PhpArrayContainer[[api-linebreak]] @group DependencyInjection | ||||
PhpArrayDumper | class | Drupal\Component\DependencyInjection\Dumper | core/ |
PhpArrayDumper dumps a service container as a PHP array. | ||||
PhpArrayDumperTest | class | Drupal\Tests\Component\DependencyInjection\Dumper | core/ |
@coversDefaultClass \Drupal\Component\DependencyInjection\Dumper\PhpArrayDumper[[api-linebreak]] @group DependencyInjection | ||||
PhpassHashedPassword | class | Drupal\phpass\Password | core/ |
Legacy password hashing framework. | 1 | 2 | 2 | |
PhpassHashedPassword | in drupal:10.1.0 and is removed from drupal:11.0.0. The password compatibility service has been moved to the phpass module. Use \Drupal\phpass\Password\PhpassHashedPassword instead. |
class | Drupal\Core\Password | core/ |
Deprecated legacy password hashing framework. | 1 | ||
PhpassHashedPasswordBase | abstract class | Drupal\Core\Password | core/ |
Legacy password hashing framework. | 2 | 1 | ||
PhpassHashedPasswordLog2BoundariesDouble | class | Drupal\Tests\phpass\Unit | core/ |
Test double for test coverage of enforceLog2Boundaries(). | ||||
PhpBackend | class | Drupal\Core\Cache | core/ |
Defines a PHP cache implementation. | 2 | |||
PhpBackendFactory | class | Drupal\Core\Cache | core/ |
2 | ||||
PhpBackendTest | class | Drupal\KernelTests\Core\Cache | core/ |
Unit test of the PHP cache backend using the generic cache unit test base. | ||||
PhpMail | class | Drupal\Core\Mail\Plugin\Mail | core/ |
Defines the default Drupal mail backend, using PHP's native mail() function. | 2 | 2 | ||
PhpMailTest | class | Drupal\Tests\Core\Mail\Plugin\Mail | core/ |
@coversDefaultClass \Drupal\Core\Mail\Plugin\Mail\PhpMail[[api-linebreak]] @group Mail | ||||
PhpPassword | class | Drupal\Core\Password | core/ |
Secure PHP password hashing functions. | 2 | 4 | ||
PhpPasswordTest | class | Drupal\Tests\Core\Password | core/ |
Unit tests for password hashing API. | ||||
PhpRequirements | final class | Drupal\Core\Utility | core/ |
Provides an object for dynamically identifying the minimum supported PHP. | 5 | |||
PhpRequirementsTest | class | Drupal\Tests\Core\Utility | core/ |
Tests the \Drupal\Core\Utility\PhpRequirements class. | ||||
PhpRequirementTest | class | Drupal\Tests\system\Functional\System | core/ |
Tests the output of PHP requirements on the status report. | ||||
PhpSelection | class | Drupal\Core\Entity\Plugin\EntityReferenceSelection | core/ |
Defines an alternative to the default Entity Reference Selection plugin. | ||||
PhpSerialize | class | Drupal\Component\Serialization | core/ |
Default serialization for serialized PHP. | 4 | 2 | ||
PhpStorageFactory | class | Drupal\Core\PhpStorage | core/ |
Creates a php storage object. | 5 | |||
PhpStorageFactoryTest | class | Drupal\Tests\system\Kernel\PhpStorage | core/ |
Tests the PHP storage factory. | ||||
PhpStorageInterface | interface | Drupal\Component\PhpStorage | core/ |
Stores and loads PHP code. | 2 | 2 | ||
PhpStorageTestBase | abstract class | Drupal\Tests\Component\PhpStorage | core/ |
Base test for PHP storages. | 3 | |||
PhpStreamWrapperInterface | interface | Drupal\Core\StreamWrapper | core/ |
Defines a generic PHP stream wrapper interface. | 1 | |||
PhpTransliteration | class | Drupal\Core\Transliteration | core/ |
Enhances PhpTransliteration with an alter hook. | 1 | 2 | ||
PhpTransliteration | class | Drupal\Component\Transliteration | core/ |
Implements transliteration without using the PECL extensions. | 1 | 4 | ||
PhpTransliterationTest | class | Drupal\Tests\Core\Transliteration | core/ |
Tests Transliteration component functionality. | ||||
PhpTransliterationTest | class | Drupal\Tests\Component\Transliteration | core/ |
Tests Transliteration component functionality. | ||||
PhpUnitAutoloaderTest | class | Drupal\Tests\Core\Test | core/ |
Tests that classes are correctly loaded during PHPUnit initialization. | ||||
PhpUnitBridgeIsolatedTest | class | Drupal\Tests\Core\Test | core/ |
Test how unit tests interact with deprecation errors in process isolation. | ||||
PhpUnitBridgeRequiresTest | class | Drupal\Tests\Core\Test | core/ |
Test how unit tests interact with deprecation errors. | ||||
PhpUnitBridgeTest | class | Drupal\FunctionalTests\Core\Test | core/ |
Tests Drupal's integration with Symfony PHPUnit Bridge. | ||||
PhpUnitBridgeTest | class | Drupal\Tests\Core\Test | core/ |
Test how unit tests interact with deprecation errors. |
Pagination
- Previous page
- Page 137
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.