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 |
|---|---|---|---|---|---|---|---|---|
| Log | class | Drupal\Core\Database | core/ |
Database query logger. | 3 | |||
| Log | class | Drupal\migrate\Plugin\migrate\process | core/ |
Logs values without changing them. | 1 | |||
| LoggedStatementsTrait | in drupal:10.1.0 and is removed from drupal:11.0.0. There is no replacement. |
trait | Drupal\database_statement_monitoring_test | core/ |
Trait for Connection classes that can store logged statements. | 3 | ||
| LoggerAwarePass | class | Drupal\Core\DependencyInjection\Compiler | core/ |
Sets the logger on all services that implement LoggerAwareInterface. | 1 | |||
| LoggerAwarePassTest | class | Drupal\Tests\system\Kernel\DependencyInjection\CompilerPass | core/ |
Tests the logger aware compiler pass. | ||||
| LoggerAwareStub | class | Drupal\logger_aware_test | core/ |
A test class that implements LoggerAwareInterface. | 1 | 3 | ||
| LoggerChannel | class | Drupal\Core\Logger | core/ |
Defines a logger channel that most implementations will use. | 1 | 2 | 5 | |
| LoggerChannelFactory | class | Drupal\Core\Logger | core/ |
Defines a factory for logging channels. | 1 | 2 | 2 | |
| LoggerChannelFactoryInterface | interface | Drupal\Core\Logger | core/ |
Logger channel factory interface. | 1 | 11 | ||
| LoggerChannelFactoryTest | class | Drupal\Tests\Core\Logger | core/ |
@coversDefaultClass \Drupal\Core\Logger\LoggerChannelFactory[[api-linebreak]] @group Logger | ||||
| LoggerChannelInterface | interface | Drupal\Core\Logger | core/ |
Logger channel interface. | 1 | 4 | ||
| LoggerChannelTest | class | Drupal\Tests\Core\Logger | core/ |
@coversDefaultClass \Drupal\Core\Logger\LoggerChannel[[api-linebreak]] @group Logger | ||||
| LoggerChannelTrait | trait | Drupal\Core\Logger | core/ |
Wrapper methods for the logger factory service. | 7 | |||
| LoggerChannelWithoutConstructor | class | Drupal\Tests\Core\Logger | core/ |
|||||
| LoggerStub | class | Drupal\logger_aware_test | core/ |
A logger stub. | 1 | 2 | ||
| LoggingForm | class | Drupal\system\Form | core/ |
Configure logging settings for this site. | 2 | |||
| LoggingTest | class | Drupal\KernelTests\Core\Database | core/ |
Tests the query logging facility. | ||||
| LoginLogoutMenuLink | class | Drupal\user\Plugin\Menu | core/ |
A menu link that shows "Log in" or "Log out" as appropriate. | 1 | |||
| LoginStatusCheck | class | Drupal\user\Access | core/ |
Determines access to routes based on login status of current user. | 2 | |||
| LogMessageParser | class | Drupal\Core\Logger | core/ |
Parses log messages and their placeholders. | 1 | 2 | ||
| LogMessageParserInterface | interface | Drupal\Core\Logger | core/ |
Defines an interface for parsing log messages and their placeholders. | 1 | 2 | ||
| LogMessageParserTest | class | Drupal\Tests\Core\Logger | core/ |
@coversDefaultClass \Drupal\Core\Logger\LogMessageParser[[api-linebreak]] @group Logger | ||||
| LogTest | class | Drupal\Tests\Core\Database | core/ |
Tests the Log class. | ||||
| LogTest | class | Drupal\Tests\migrate\Unit\process | core/ |
Tests the Log process plugin. | ||||
| LogTest | class | Drupal\Tests\migrate\Kernel\Plugin | core/ |
Tests the Log process plugin. | ||||
| LonelyMonkeyClass | class | Drupal\error_service_test | core/ |
A class with a single dependency. | 1 | 2 | ||
| LonelyMonkeyController | class | Drupal\error_service_test\Controller | core/ |
Provides a controller which calls out to a service with missing dependencies. | ||||
| MachineName | class | Drupal\migrate\Plugin\migrate\process | core/ |
Creates a machine name. | 1 | |||
| MachineName | class | Drupal\views\Plugin\views\field | core/ |
Field handler which allows to show machine name content as human name. | ||||
| MachineName | class | Drupal\Core\Render\Element | core/ |
Provides a machine name render element. | 1 | |||
| MachineNameController | in drupal:10.2.0 and is removed from drupal:11.0.0. There is no replacement. |
class | Drupal\system | core/ |
Controller routines for machine name transliteration routes. | 1 | ||
| MachineNameControllerTest | class | Drupal\Tests\system\Unit\Transliteration | core/ |
Tests that the machine name controller can transliterate strings as expected. | ||||
| MachineNameTest | class | Drupal\Tests\migrate\Unit\process | core/ |
Tests the machine name process plugin. | ||||
| MachineNameTest | class | Drupal\FunctionalJavascriptTests\Core | core/ |
Tests for the machine name field. | ||||
| MachineNameTest | class | Drupal\Tests\Core\Render\Element | core/ |
@coversDefaultClass \Drupal\Core\Render\Element\MachineName[[api-linebreak]] @group Render | ||||
| MachineNameTest | class | Drupal\KernelTests\Core\Render\Element | core/ |
@coversDefaultClass \Drupal\Core\Render\Element\MachineName[[api-linebreak]] @group Render | ||||
| MachineNameTransliterationTest | class | Drupal\FunctionalJavascriptTests\MachineName | core/ |
Tests the machine name transliteration functionality. | ||||
| class | Drupal\Core\Mail\Attribute | core/ |
Defines a Mail attribute for plugin discovery. | 6 | ||||
| class | Drupal\Core\Annotation | core/ |
Defines a Mail annotation object. | |||||
| MailCaptureTest | class | Drupal\FunctionalTests | core/ |
Tests the collection of emails during testing. | ||||
| MailDsnSettingsUpdateTest | class | Drupal\Tests\system\Functional\Update | core/ |
Tests creation of default mail transport dsn settings. | ||||
| MailFormatHelper | class | Drupal\Core\Mail | core/ |
Defines a class containing utility methods for formatting mail messages. | 8 | |||
| MailFormatHelperTest | class | Drupal\Tests\Core\Mail | core/ |
@coversDefaultClass \Drupal\Core\Mail\MailFormatHelper[[api-linebreak]] @group Mail | ||||
| MailHandler | class | Drupal\contact | core/ |
Provides a class for handling assembly and dispatch of contact mail messages. | 1 | 2 | ||
| MailHandlerException | class | Drupal\contact | core/ |
Exception thrown by MailHandler when unable to determine message recipient. | 1 | |||
| MailHandlerInterface | interface | Drupal\contact | core/ |
Provides an interface for assembly and dispatch of contact mail messages. | 1 | |||
| MailHandlerTest | class | Drupal\Tests\contact\Unit | core/ |
@coversDefaultClass \Drupal\contact\MailHandler[[api-linebreak]] @group contact | ||||
| MailInterface | interface | Drupal\Core\Mail | core/ |
Defines an interface for pluggable mail back-ends. | 4 | 4 | 1 | |
| MailManager | class | Drupal\Core\Mail | core/ |
Provides a Mail plugin manager. | 1 | 1 | 2 | |
| MailManagerInterface | interface | Drupal\Core\Mail | core/ |
Provides an interface for sending mail. | 1 | 2 |
Pagination
- Previous page
- Page 106
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.