Classes, traits, and interfaces - 9.5.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 1523
| Name | Deprecated | Object type | Namespace | File name | Summary | Direct uses | Use statements | Strings |
|---|---|---|---|---|---|---|---|---|
| ExposedFormRenderTest | class | Drupal\Tests\views\Kernel\Plugin | core/ |
Tests the exposed form. | ||||
| 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 | |||
| 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", ) | ||||
| 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. | 43 | |||
| ExtensionDiscovery | class | Drupal\Core\Extension | core/ |
Discovers available extensions in the filesystem. | 24 | |||
| ExtensionDiscoveryTest | class | Drupal\Tests\Core\Extension | core/ |
Tests discovery of extensions. | ||||
| 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. | 20 | |||
| ExtensionList | abstract class | Drupal\Core\Extension | core/ |
Provides available extensions. | 5 | 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. | ||||
| ExtensionNameLengthException | class | Drupal\Core\Extension | core/ |
Exception thrown when the extension's name length exceeds the allowed maximum. | 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 | 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 | ||||
| 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 | |||
| ExtraFieldBlockDeriver | class | Drupal\layout_builder\Plugin\Derivative | core/ |
Provides entity field block definitions for every field. | ||||
| 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. | ||||
| FakeAbstractProxy | class | Drupal\Tests\Core\Session | core/ |
|||||
| 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 | |||
| FakePhpassHashedPassword | class | Drupal\Tests\Core\Password | core/ |
A fake class for tests. | ||||
| FakeRecord | class | Drupal\Tests\system\Functional\Database | core/ |
Fetches into a class. | 2 | |||
| FakeTemplateWrapper | class | Drupal\Tests\help_topics\Unit | core/ |
Defines a fake template class to mock \Twig\TemplateWrapper. | ||||
| FakeViewModeContext | class | Drupal\layout_builder_fieldblock_test\ContextProvider | core/ |
Provides a global context for view_mode for testing purposes. | 2 | |||
| FallbackPluginManagerInterface | interface | Drupal\Component\Plugin | core/ |
An interface implemented by plugin managers with fallback plugin behaviors. | 5 | 5 | ||
| Fast404ExceptionHtmlSubscriber | class | Drupal\Core\EventSubscriber | core/ |
High-performance 404 exception subscriber. | 2 | |||
| Fast404Test | class | Drupal\FunctionalTests\EventSubscriber | core/ |
Tests the fast 404 functionality. | ||||
| FastTest | class | Drupal\Tests\system\Functional\Theme | core/ |
Tests autocompletion not loading registry. | ||||
| FavoriteAnimalTestForm | class | Drupal\block_test\Form | core/ |
Form that performs favorite animal test. | ||||
| Feed | class | Drupal\aggregator\Entity | core/ |
Defines the aggregator feed entity class. | 19 |
Pagination
- Previous page
- Page 63
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.