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 |
---|---|---|---|---|---|---|---|---|
ExposedFormTest | class | Drupal\Tests\views\Functional\Plugin | core/ |
Tests exposed forms functionality. | ||||
ExposedFormUITest | class | Drupal\Tests\views_ui\Functional | core/ |
Tests exposed forms UI functionality. | ||||
ExtendableInterface | interface | Drupal\Core\Database\Query | core/ |
Interface for extendable query objects. | 1 | |||
ExtendedDiscoveryInterface | interface | Drupal\Tests\Component\Plugin\Discovery | core/ |
|||||
ExtendedForm | class | Drupal\install_form_test\Form | core/ |
Extends the site setting form. | 1 | |||
ExtendingNonInstalledClass | class | Drupal\plugin_test\Plugin\plugin_test\fruit | core/ |
Plugin annotation @Plugin( id = "extending_non_installed_class", label = "A plugin whose class is extending from a non-installed module class", color = "pink", ) | ||||
ExtendingNonInstalledClass | class | Drupal\plugin_test\Plugin\plugin_test\custom_annotation | core/ |
This class does not have a plugin attribute or plugin annotation on purpose. | ||||
Extension | class | Drupal\system\Plugin\migrate\source | core/ |
Drupal 6/7 system data for a legacy extension source from database. | ||||
Extension | class | Drupal\Core\Extension | core/ |
Defines an extension (file) object. | 1 | 43 | ||
ExtensionDiscovery | class | Drupal\Core\Extension | core/ |
Discovers available extensions in the filesystem. | 20 | |||
ExtensionDiscoveryTest | class | Drupal\Tests\Core\Extension | core/ |
Tests discovery of extensions. | ||||
ExtensionExistsConstraint | class | Drupal\Core\Extension\Plugin\Validation\Constraint | core/ |
Checks that the value is the name of an installed extension. | ||||
ExtensionExistsConstraintValidator | class | Drupal\Core\Extension\Plugin\Validation\Constraint | core/ |
Validates that a given extension exists. | ||||
ExtensionExistsConstraintValidatorTest | class | Drupal\KernelTests\Core\Extension | core/ |
Tests the ExtensionExists constraint validator. | ||||
ExtensionInstallStorage | class | Drupal\Core\Config | core/ |
Storage to access configuration and schema in enabled extensions. | 2 | 2 | ||
ExtensionInstallStorageTest | class | Drupal\Tests\Core\Config | core/ |
@coversDefaultClass \Drupal\Core\Config\ExtensionInstallStorage[[api-linebreak]] @group Config | ||||
ExtensionLifecycle | final class | Drupal\Core\Extension | core/ |
Extension lifecycle. | 19 | |||
ExtensionList | abstract class | Drupal\Core\Extension | core/ |
Provides available extensions. | 6 | 2 | ||
ExtensionListTest | class | Drupal\Tests\Core\Extension | core/ |
@coversDefaultClass \Drupal\Core\Extension\ExtensionList[[api-linebreak]] @group Extension | ||||
ExtensionListTestTrait | trait | Drupal\Tests | core/ |
Provides extension list methods. | 2 | |||
ExtensionListTrait | trait | Drupal\Core\Installer | core/ |
Provides common functionality for the extension list classes. | ||||
ExtensionMimeTypeGuesser | class | Drupal\Core\File\MimeType | core/ |
Makes possible to guess the MIME type of a file using its extension. | 2 | |||
ExtensionMimeTypeGuesser | class | Drupal\Core\ProxyClass\File\MimeType | core/ |
Provides a proxy class for \Drupal\Core\File\MimeType\ExtensionMimeTypeGuesser. | ||||
ExtensionNameConstraint | class | Drupal\Core\Extension\Plugin\Validation\Constraint | core/ |
Checks that the value is a valid extension name. | ||||
ExtensionNameConstraintTest | class | Drupal\KernelTests\Core\Extension | core/ |
Tests the ExtensionName constraint. | ||||
ExtensionNameLengthException | class | Drupal\Core\Extension | core/ |
Exception thrown when the extension's name length exceeds the allowed maximum. | 2 | |||
ExtensionNameReservedException | class | Drupal\Core\Extension | core/ |
Exception thrown when the extension's name is already reserved. | 2 | |||
ExtensionPathResolver | class | Drupal\Core\Extension | core/ |
Factory for getting extension lists by type. | 5 | 2 | ||
ExtensionPathResolverTest | class | Drupal\KernelTests\Core\Bootstrap | core/ |
Tests that extension path resolver works correctly. | ||||
ExtensionSerializationTest | class | Drupal\Tests\Core\Extension | core/ |
Tests Extension serialization. | ||||
ExtensionTest | class | Drupal\Tests\system\Kernel\Plugin\migrate\source | core/ |
Tests legacy extension source plugin. | ||||
ExtensionVersion | final class | Drupal\Core\Extension | core/ |
Provides an extension version value object. | 5 | |||
ExtensionVersionTest | class | Drupal\Tests\Core\Extension | core/ |
@coversDefaultClass \Drupal\Core\Extension\ExtensionVersion[[api-linebreak]] | ||||
ExtensionViewsFieldTest | class | Drupal\Tests\file\Kernel\Views | core/ |
Tests the core Drupal\file\Plugin\views\field\Extension handler. | ||||
ExternalCommandRequirementsTrait | in drupal:10.2.0 and is removed from drupal:11.0.0. Use Drupal\\TestTools\\Extension\\RequiresComposerTrait instead. |
trait | Drupal\BuildTests\Framework | core/ |
Allows test classes to require external command line applications. | 1 | ||
ExternalCommandRequirementTest | class | Drupal\BuildTests\Framework\Tests | core/ |
@coversDefaultClass \Drupal\BuildTests\Framework\ExternalCommandRequirementsTrait[[api-linebreak]] @group Build @group legacy | ||||
ExternalFormUrlTest | class | Drupal\KernelTests\Core\Form | core/ |
Ensures that form actions can't be tricked into sending to external URLs. | ||||
ExternalNormalizersTest | class | Drupal\Tests\jsonapi\Functional | core/ |
Asserts external normalizers are handled as expected by the JSON:API module. | ||||
Extract | class | Drupal\migrate\Plugin\migrate\process | core/ |
Extracts a value from an array. | 1 | |||
ExtractTest | class | Drupal\Tests\migrate\Unit\process | core/ |
@coversDefaultClass \Drupal\migrate\Plugin\migrate\process\Extract[[api-linebreak]] @group migrate | ||||
ExtractTest | class | Drupal\Tests\migrate\Kernel\process | core/ |
Tests the extract process plugin. | ||||
ExtraFieldBlock | class | Drupal\layout_builder\Plugin\Block | core/ |
Provides a block that renders an extra field from an entity. | 1 | |||
ExtraFieldBlockCacheTagInvalidator | class | Drupal\layout_builder\Cache | core/ |
Provides a cache tag invalidator that clears the block cache. | 2 | |||
ExtraFieldBlockDeriver | class | Drupal\layout_builder\Plugin\Derivative | core/ |
Provides entity field block definitions for every field. | 1 | |||
FactoryInterface | interface | Drupal\Component\Plugin\Factory | core/ |
Factory interface implemented by all plugin factories. | 2 | 3 | ||
FactoryTest | class | Drupal\KernelTests\Core\Plugin | core/ |
Tests that plugins are correctly instantiated. | ||||
Failing | class | Drupal\image_test\Plugin\ImageToolkit\Operation\test | core/ |
An image toolkit operation that throws a \RuntimeException. | ||||
FakeAutoloader | class | Drupal\Tests\Core\DrupalKernel | core/ |
A fake autoloader for testing. | ||||
FakeLogEntries | trait | Drupal\Tests\dblog\Functional | core/ |
Provides methods to generate log entries. | 1 | |||
FakeRecord | class | Drupal\Tests\system\Functional\Database | core/ |
Fetches into a class. | 2 |
Pagination
- Previous page
- Page 67
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.