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 |
|---|---|---|---|---|---|---|---|---|
| StarterKit | final class | Drupal\starterkit_theme | core/ |
|||||
| StarterKitInterface | interface | Drupal\Core\Theme | core/ |
Allows starter kits to interact with theme generation. | 1 | 2 | ||
| State | class | Drupal\Core\State | core/ |
Provides the state system using a key value store. | 5 | 2 | ||
| State | class | Drupal\workflows | core/ |
A value object representing a workflow state. | 9 | |||
| StateFileExistsTest | class | Drupal\Tests\migrate_drupal\Kernel | core/ |
Tests that core modules have a migrate_drupal.yml file as needed. | ||||
| StateFormatterTest | class | Drupal\Tests\content_moderation\Kernel | core/ |
Test the state field formatter. | ||||
| StateInterface | interface | Drupal\Core\State | core/ |
Defines the interface for the state system. | 1 | 74 | ||
| StateInterface | interface | Drupal\workflows | core/ |
An interface for state value objects. | 2 | 8 | ||
| Statement | in drupal:9.4.0 and is removed from drupal:11.0.0. The SQLite database driver has been moved to the sqlite module. |
class | Drupal\Core\Database\Driver\sqlite | core/ |
SQLite implementation of \Drupal\Core\Database\Statement. | 1 | ||
| Statement | in drupal:9.1.0 and is removed from drupal:10.0.0. Database drivers should use or extend StatementWrapper instead, and encapsulate client-level statement objects. |
class | Drupal\Core\Database | core/ |
Default implementation of StatementInterface. | 1 | ||
| Statement | class | Drupal\sqlite\Driver\Database\sqlite | core/ |
SQLite implementation of \Drupal\Core\Database\Statement. | 1 | 1 | ||
| StatementEmpty | in drupal:9.2.0 and is removed from drupal:10.0.0. There is no replacement. Use mocked StatementInterface classes in tests if needed. |
class | Drupal\Core\Database | core/ |
Empty implementation of a database statement. | 1 | ||
| StatementInterface | interface | Drupal\Core\Database | core/ |
Represents a prepared statement. | 6 | 12 | ||
| StatementPrefetch | class | Drupal\Core\Database | core/ |
An implementation of StatementInterface that prefetches all data. | 1 | 1 | ||
| StatementTest | class | Drupal\KernelTests\Core\Database | core/ |
Tests the Statement classes. | ||||
| StatementWrapper | class | Drupal\Core\Database | core/ |
Implementation of StatementInterface encapsulating PDOStatement. | 5 | |||
| StatementWrapperLegacyTest | class | Drupal\KernelTests\Core\Database | core/ |
Tests the deprecations of the StatementWrapper class. | ||||
| StateTest | class | Drupal\Tests\workflows\Unit | core/ |
@coversDefaultClass \Drupal\workflows\State[[api-linebreak]] | ||||
| StateTransitionValidation | class | Drupal\content_moderation | core/ |
Validates whether a certain state transition is allowed. | 1 | 2 | ||
| StateTransitionValidationInterface | interface | Drupal\content_moderation | core/ |
Validates whether a certain state transition is allowed. | 1 | 3 | ||
| StateTransitionValidationTest | class | Drupal\Tests\content_moderation\Unit | core/ |
@coversDefaultClass \Drupal\content_moderation\StateTransitionValidation[[api-linebreak]] @group content_moderation | ||||
| StateValuesCleanAdvancedTest | class | Drupal\Tests\system\Functional\Form | core/ |
Tests the removal of internal Form API elements from submitted form values. | ||||
| StateValuesCleanTest | class | Drupal\Tests\system\Functional\Form | core/ |
Tests the proper removal of submitted form values. | ||||
| StaticDiscovery | class | Drupal\Component\Plugin\Discovery | core/ |
Allows plugin definitions to be manually registered. | 1 | 5 | ||
| StaticDiscoveryDecorator | class | Drupal\Component\Plugin\Discovery | core/ |
A decorator that allows manual registration of undiscoverable definitions. | 1 | |||
| StaticDiscoveryDecoratorTest | class | Drupal\Tests\Component\Plugin\Discovery | core/ |
@group Plugin @coversDefaultClass \Drupal\Component\Plugin\Discovery\StaticDiscoveryDecorator[[api-linebreak]] | ||||
| StaticDiscoveryTest | class | Drupal\KernelTests\Core\Plugin\Discovery | core/ |
Tests that plugins using static discovery are correctly discovered. | ||||
| StaticFileCacheBackend | class | Drupal\Tests\Component\FileCache | core/ |
Allows to cache data based on file modification dates in a static cache. | ||||
| StaticMap | class | Drupal\migrate\Plugin\migrate\process | core/ |
Changes the source value based on a static lookup map. | 3 | 4 | ||
| StaticMapTest | class | Drupal\Tests\migrate\Unit\process | core/ |
Tests the static map process plugin. | ||||
| StaticMenuLinkOverrides | class | Drupal\Core\Menu | core/ |
Defines an implementation of the menu link override using a config file. | 1 | 2 | ||
| StaticMenuLinkOverridesInterface | interface | Drupal\Core\Menu | core/ |
Defines an interface for objects which overrides menu links defined in YAML. | 1 | 4 | ||
| StaticMenuLinkOverridesTest | class | Drupal\Tests\Core\Menu | core/ |
@coversDefaultClass \Drupal\Core\Menu\StaticMenuLinkOverrides[[api-linebreak]] @group Menu | ||||
| StaticReflectionClass | class | Drupal\Component\Annotation\Doctrine | core/ |
|||||
| StaticReflectionParser | class | Drupal\Component\Annotation\Doctrine | core/ |
Parses a file for namespaces/use/class declarations. | 1 | 4 | ||
| StaticReflectionParser | class | Drupal\migrate\Plugin\Discovery | core/ |
Allows getting the reflection parser for the parent class. | ||||
| StaticTest | class | Drupal\views_test_data\Plugin\views\access | core/ |
Tests a static access plugin. | ||||
| StaticTranslation | class | Drupal\Core\StringTranslation\Translator | core/ |
String translator with a static cache for translations. | 2 | |||
| StaticTrustedCallbackHelper | class | Drupal\Core\Security | core/ |
Defines a class for performing trusted callbacks in a static context. | 2 | |||
| StatisticsAdminTest | class | Drupal\Tests\statistics\Functional | core/ |
Tests the statistics admin. | ||||
| StatisticsAttachedTest | class | Drupal\Tests\statistics\Functional | core/ |
Tests if statistics.js is loaded when content is not printed. | ||||
| StatisticsLastCommentName | class | Drupal\comment\Plugin\views\sort | core/ |
Sort handler, sorts by last comment name which can be in 2 different fields. | ||||
| StatisticsLastCommentName | class | Drupal\comment\Plugin\views\field | core/ |
Field handler to present the name of the last comment poster. | ||||
| StatisticsLastUpdated | class | Drupal\comment\Plugin\views\sort | core/ |
Sort handler for the newer of last comment / entity updated. | ||||
| StatisticsLastUpdated | class | Drupal\comment\Plugin\views\field | core/ |
Field handler to display the newer of last comment / node updated. | ||||
| StatisticsLastUpdated | class | Drupal\comment\Plugin\views\filter | core/ |
Filter handler for the newer of last comment / node updated. | ||||
| StatisticsLoggingTest | class | Drupal\Tests\statistics\FunctionalJavascript | core/ |
Tests that statistics works. | ||||
| StatisticsLoggingTest | class | Drupal\Tests\statistics\Functional | core/ |
Tests request logging for cached and uncached pages. | ||||
| StatisticsNumeric | class | Drupal\statistics\Plugin\views\field | core/ |
Field handler to display numeric values from the statistics module. | ||||
| StatisticsPopularBlock | class | Drupal\statistics\Plugin\Block | core/ |
Provides a 'Popular content' block. |
Pagination
- Previous page
- Page 155
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.