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 |
|---|---|---|---|---|---|---|---|---|
| ServiceDestructionTest | class | Drupal\KernelTests\Core\DrupalKernel | core/ |
Tests that services are correctly destructed. | ||||
| ServiceIdHashTrait | in drupal:9.5.1 and is removed from drupal:11.0.0. Use the 'Drupal\Component\DependencyInjection\ReverseContainer' service instead. |
trait | Drupal\Component\DependencyInjection | core/ |
A trait for service id hashing implementations. | 1 | ||
| ServiceModifierInterface | interface | Drupal\Core\DependencyInjection | core/ |
Interface that service providers can implement to modify services. | 10 | 11 | ||
| ServiceProviderBase | abstract class | Drupal\Core\DependencyInjection | core/ |
Base service provider implementation. | 5 | 5 | ||
| ServiceProviderInterface | interface | Drupal\Core\DependencyInjection | core/ |
Interface that all service providers must implement. | 14 | 14 | ||
| ServiceProviderTest | class | Drupal\KernelTests\Core\ServiceProvider | core/ |
Tests service provider registration to the DIC. | ||||
| ServiceProviderTestServiceProvider | class | Drupal\service_provider_test | core/ |
|||||
| ServiceProviderWebTest | class | Drupal\Tests\system\Functional\ServiceProvider | core/ |
Tests service provider registration to the DIC. | ||||
| ServicesDefaultsTest | class | Drupal\KernelTests\Core\DependencyInjection | core/ |
Tests services _defaults definition. | ||||
| ServiceWithDependency | class | Drupal\new_dependency_test | core/ |
Service that gets the other service of the same module injected. | 6 | |||
| Session | class | Drupal\Core\StackMiddleware | core/ |
Wrap session logic around a HTTP request. | 2 | |||
| SessionAuthenticationTest | class | Drupal\Tests\system\Functional\Session | core/ |
Tests if sessions are correctly handled when a user authenticates. | ||||
| SessionCacheContext | class | Drupal\Core\Cache\Context | core/ |
Defines the SessionCacheContext service, for "per session" caching. | 1 | 2 | ||
| SessionCacheContextTest | class | Drupal\Tests\Core\Cache\Context | core/ |
@coversDefaultClass \Drupal\Core\Cache\Context\SessionCacheContext[[api-linebreak]] @group Cache | ||||
| SessionConfiguration | class | Drupal\Core\Session | core/ |
Defines the default session configuration generator. | 2 | |||
| SessionConfigurationInterface | interface | Drupal\Core\Session | core/ |
Defines an interface for session configuration generators. | 1 | 7 | ||
| SessionConfigurationTest | class | Drupal\Tests\Core\Session | core/ |
@coversDefaultClass \Drupal\Core\Session\SessionConfiguration[[api-linebreak]] @group Session | ||||
| SessionExistsCacheContext | class | Drupal\Core\Cache\Context | core/ |
Defines the SessionExistsCacheContext service, for "session or not" caching. | 2 | |||
| SessionExistsCacheContextTest | class | Drupal\Tests\system\Functional\Cache | core/ |
Tests the 'session.exists' cache context service. | ||||
| SessionHandler | class | Drupal\Core\Session | core/ |
Default session handler. | 2 | |||
| SessionHttpsTest | class | Drupal\Tests\system\Functional\Session | core/ |
Ensure that when running under HTTPS two session cookies are generated. | ||||
| SessionManager | class | Drupal\Core\Session | core/ |
Manages user sessions. | 2 | |||
| SessionManagerDestroyNoCliCheckTest | class | Drupal\KernelTests\Core\Session | core/ |
Tests starting and destroying a session from the CLI. | ||||
| SessionManagerInterface | interface | Drupal\Core\Session | core/ |
Defines the session manager interface. | 1 | |||
| SessionTest | class | Drupal\FunctionalJavascriptTests\Core\Session | core/ |
Tests that sessions don't expire. | ||||
| SessionTest | class | Drupal\Tests\system\Functional\Session | core/ |
Drupal session handling tests. | ||||
| SessionTestController | class | Drupal\session_test\Controller | core/ |
Controller providing page callbacks for the action admin interface. | ||||
| SessionTestForm | class | Drupal\session_test\Form | core/ |
Form controller for the test config edit forms. | 1 | |||
| SessionTestSubscriber | class | Drupal\session_test\EventSubscriber | core/ |
Defines a test session subscriber that checks whether the session is empty. | 2 | |||
| SessionTestTrait | trait | Drupal\Tests | core/ |
Provides methods to generate and get session name in tests. | 1 | |||
| SessionWorkspaceNegotiator | class | Drupal\workspaces\Negotiator | core/ |
Defines the session workspace negotiator. | 1 | 2 | ||
| SetCustomize | class | Drupal\shortcut\Form | core/ |
Builds the shortcut set customize form. | ||||
| SetDialogOptionCommand | class | Drupal\Core\Ajax | core/ |
Defines an AJAX command that sets jQuery UI dialog properties. | 1 | 1 | ||
| SetDialogTitleCommand | class | Drupal\Core\Ajax | core/ |
Defines an AJAX command that sets jQuery UI dialog properties. | 1 | |||
| SetFormCommand | class | Drupal\views_ui\Ajax | core/ |
Provides an AJAX command for setting a form submit URL in modal forms. | 1 | |||
| SetInlineBlockDependency | class | Drupal\layout_builder\EventSubscriber | core/ |
An event subscriber that returns an access dependency for inline blocks. | 1 | |||
| SetSubtreesCommand | class | Drupal\toolbar\Ajax | core/ |
Defines an AJAX command that sets the toolbar subtrees. | 1 | |||
| SettableDiscoveryExtensionListTrait | trait | Drupal\Tests\Core\Extension | core/ |
Trait that allows extension discovery to be set. | ||||
| SetterInjection | class | Drupal\new_dependency_test | core/ |
Generic service which uses setter injection. | 2 | |||
| Settings | final class | Drupal\Core\Site | core/ |
Read only settings that are initialized with the class. | 138 | 2 | ||
| SettingsAnnotation | class | Drupal\Tests\Component\Annotation\Doctrine | core/ |
|||||
| SettingsCommand | class | Drupal\Core\Ajax | core/ |
AJAX command for adjusting Drupal's JavaScript settings. | 3 | |||
| SettingsConfigValidationTest | class | Drupal\Tests\image\Kernel | core/ |
@group image | ||||
| SettingsEditor | final class | Drupal\Core\Site | core/ |
Generates settings.php files for Drupal installations. | 4 | |||
| SettingsForm | final class | Drupal\navigation\Form | core/ |
Configure Navigation settings for this site. | 1 | |||
| SettingsForm | class | Drupal\media_library\Form | core/ |
Defines a form for configuring the Media Library module. | 1 | |||
| SettingsFormTest | class | Drupal\Tests\media_library\Functional | core/ |
Tests the Media Library settings form. | ||||
| SettingsFormTest | class | Drupal\Tests\jsonapi\Functional | core/ |
@covers \Drupal\jsonapi\Form\JsonApiSettingsForm[[api-linebreak]] @group jsonapi | ||||
| SettingsRewriteTest | class | Drupal\KernelTests\Core\Site | core/ |
Tests the SettingsEditor::rewrite() function. | ||||
| SettingsTest | class | Drupal\Tests\Core\Site | core/ |
@coversDefaultClass \Drupal\Core\Site\Settings[[api-linebreak]] @runTestsInSeparateProcesses @group Site |
Pagination
- Previous page
- Page 158
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.