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 |
|---|---|---|---|---|---|---|---|---|
| Serializer | class | Drupal\rest\Plugin\views\style | core/ |
The style plugin for serialized output formats. | 1 | |||
| SerializerTest | class | Drupal\Tests\rest\Unit\Plugin\views\style | core/ |
@coversDefaultClass \Drupal\rest\Plugin\views\style\Serializer[[api-linebreak]] @group rest | ||||
| SerializerTest | class | Drupal\Tests\jsonapi\Kernel\Serializer | core/ |
Tests the JSON:API serializer. | ||||
| ServerCommand | class | Drupal\Core\Command | core/ |
Runs the PHP webserver for a Drupal site for local testing/development. | ||||
| Service | class | Drupal\new_dependency_test | core/ |
A service that can decorated itself. | 5 | |||
| ServiceClassDefault | class | Drupal\Tests\Core\DependencyInjection\Compiler | core/ |
3 | ||||
| ServiceClassDrivertestMysql | class | Drupal\Tests\Core\DependencyInjection\Compiler | core/ |
|||||
| ServiceClassMariaDb | class | Drupal\Tests\Core\DependencyInjection\Compiler | core/ |
|||||
| ServiceClassMysql | class | Drupal\Tests\Core\DependencyInjection\Compiler | core/ |
1 | ||||
| ServiceClassSqlite | class | Drupal\Tests\Core\DependencyInjection\Compiler | core/ |
|||||
| ServiceDeprecationTest | class | Drupal\FunctionalTests\Core\Container | core/ |
Test whether deprecation notices are triggered via \Drupal::service(). | ||||
| 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. | 11 | 12 | ||
| 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. | 12 | 12 | ||
| 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 | 8 | ||
| 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. | 1 | 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 | |||
| SessionManagerTest | class | Drupal\Tests\Core\Session | core/ |
@coversDefaultClass \Drupal\Core\Session\SessionManager[[api-linebreak]] @group Session | ||||
| 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. |
Pagination
- Previous page
- Page 150
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.