Classes, traits, and interfaces - main - 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 1529
| Name | Deprecated | Object type | Namespace | File name | Summary | Direct uses | Use statements | Strings |
|---|---|---|---|---|---|---|---|---|
| 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. | 2 | 2 | ||
| PhpTransliteration | class | Drupal\Component\Transliteration | core/ |
Implements transliteration without using the PECL extensions. | 1 | 3 | ||
| PhpTransliterationTest | class | Drupal\Tests\Core\Transliteration | core/ |
Tests Transliteration component functionality. | ||||
| PhpTransliterationTest | class | Drupal\Tests\Component\Transliteration | core/ |
Tests Transliteration component functionality. | ||||
| PhpTufValidator | final class | Drupal\package_manager\Validator | core/ |
Validates that PHP-TUF is installed and correctly configured. | 1 | |||
| PhpTufValidatorTest | class | Drupal\Tests\package_manager\Kernel | core/ |
Tests Drupal\package_manager\Validator\PhpTufValidator. | ||||
| PhpUnitApiFindAllClassFilesTest | class | Drupal\KernelTests\Core\Test | core/ |
Tests ::findAllClassFiles(). | ||||
| PhpUnitApiGetTestClassesTest | class | Drupal\KernelTests\Core\Test | core/ |
Tests ::getTestClasses(). | ||||
| 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. | ||||
| PhpUnitBridgeTest | class | Drupal\Tests\Core\Test | core/ |
Test how unit tests interact with deprecation errors. | ||||
| PhpUnitBridgeTest | class | Drupal\KernelTests\Core\Test | core/ |
Test how kernel tests interact with deprecation errors. | ||||
| PhpUnitBridgeTest | class | Drupal\FunctionalTests\Core\Test | core/ |
Tests Drupal's extension to manage code deprecation. | ||||
| PhpUnitTestDiscovery | class | Drupal\Core\Test | core/ |
Discovers available tests using the PHPUnit API. | 3 | |||
| PhpUnitTestDiscoveryTest | class | Drupal\KernelTests\Core\Test | core/ |
Tests equality of test discovery between run-tests.sh and PHPUnit CLI. | ||||
| PhpUnitTestDiscoveryTracer | class | Drupal\Core\Test | core/ |
Traces events dispatched by PHPUnit during the test discovery. | ||||
| PhpUnitTestDummyClass | class | Drupal\phpunit_test | core/ |
Dummy test class. | ||||
| PhpUnitTestRunner | class | Drupal\Core\Test | core/ |
Run PHPUnit-based tests. | 2 | |||
| PhpUnitTestRunnerTest | class | Drupal\Tests\Core\Test | core/ |
Tests Drupal\Core\Test\PhpUnitTestRunner. | ||||
| PirateDayCacheabilityMetadataConfigOverride | class | Drupal\config_override_test | core/ |
Test implementation of a config override that provides cacheability metadata. | 2 | |||
| PirateDayCacheContext | class | Drupal\config_override_test\Cache | core/ |
Defines the PirateDayCacheContext service that allows to cache the booty. | 2 | 2 | ||
| PlaceBlock | final class | Drupal\block\Plugin\ConfigAction | core/ |
Places a block in either the admin or default theme. | 1 | |||
| PlaceBlockDeriver | final class | Drupal\block\Plugin\ConfigAction | core/ |
Defines a deriver for the `placeBlock` config action. | 1 | |||
| PlaceholderGenerator | class | Drupal\Core\Render | core/ |
Turns a render array into a placeholder. | 3 | 2 | ||
| PlaceholderGeneratorInterface | interface | Drupal\Core\Render | core/ |
Defines an interface for turning a render array into a placeholder. | 1 | 3 | ||
| PlaceholderGeneratorTest | class | Drupal\Tests\Core\Render | core/ |
Tests Drupal\Core\Render\PlaceholderGenerator. | ||||
| PlaceholderingRenderCache | class | Drupal\Core\Render | core/ |
Adds automatic placeholdering to the RenderCache. | 1 | 3 | 2 | |
| PlaceholderInterface | interface | Drupal\Core\Database\Query | core/ |
Interface for a query that accepts placeholders. | 3 | 2 | ||
| PlaceholderMessageTest | class | Drupal\Tests\system\Functional\Render | core/ |
Functional test verifying that messages set in placeholders always appear. | ||||
| PlaceholdersTest | class | Drupal\Tests\Core\Render | core/ |
Placeholders test class with implemented trusted callbacks. | ||||
| PlaceholderStrategyInterface | interface | Drupal\Core\Render\Placeholder | core/ |
Provides an interface for defining a placeholder strategy service. | 4 | 2 | ||
| PlainTextOutput | class | Drupal\Component\Render | core/ |
Provides an output strategy for transforming HTML into simple plain text. | 18 | |||
| PlainTextOutputTest | class | Drupal\Tests\Component\Render | core/ |
Tests Drupal\Component\Render\PlainTextOutput. | ||||
| Plugin | class | Drupal\Component\Annotation | core/ |
Defines a Plugin annotation object. | 40 | 39 | ||
| Plugin | class | Drupal\Component\Plugin\Attribute | core/ |
Defines a Plugin attribute object. | 55 | 58 | ||
| Plugin | class | Drupal\Composer\Plugin\Scaffold | composer/ |
Composer plugin for handling drupal scaffold. | ||||
| Plugin | final class | Drupal\Composer\Plugin\RecipeUnpack | composer/ |
Composer plugin for handling dependency unpacking. | ||||
| PluginAlterTest | class | Drupal\KernelTests\Core\Render\Element | core/ |
Tests Plugin Alter. | ||||
| PluginAwareInterface | interface | Drupal\Component\Plugin | core/ |
Provides an interface for objects that depend on a plugin. | 4 | 6 | ||
| PluginBase | abstract class | Drupal\Core\Plugin | core/ |
Base class for plugins supporting metadata inspection and translation. | 40 | 38 | ||
| PluginBase | abstract class | Drupal\Component\Plugin | core/ |
Base class for plugins wishing to support metadata inspection. | 15 | 33 | ||
| PluginBase | abstract class | Drupal\views\Plugin\views | core/ |
Base class for any views plugin types. | 15 | 21 | ||
| PluginBaseTest | class | Drupal\Tests\views\Unit | core/ |
Tests Drupal\views\Plugin\views\PluginBase. | ||||
| PluginBaseTest | class | Drupal\Tests\views\Kernel\Plugin | core/ |
Tests the PluginBase class. | ||||
| PluginBaseTest | class | Drupal\Tests\Component\Plugin | core/ |
Tests Drupal\Component\Plugin\PluginBase. | ||||
| PluginDefinition | class | Drupal\Component\Plugin\Definition | core/ |
Provides object-based plugin definitions. | 9 | 9 | ||
| PluginDefinitionInterface | interface | Drupal\Component\Plugin\Definition | core/ |
Defines a plugin definition. | 6 | 8 |
Pagination
- Previous page
- Page 152
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.