Classes, traits, and interfaces - 8.9.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 1511
Name | Deprecated | Object type | Namespace | File name | Summary | Direct uses | Use statements | Strings |
---|---|---|---|---|---|---|---|---|
ContextRepositoryInterface | interface | Drupal\Core\Plugin\Context | core/ |
Offers a global context repository. | 1 | 7 | ||
ContextTest | class | Drupal\Tests\Core\Plugin\Context | core/ |
@coversDefaultClass \Drupal\Core\Plugin\Context\Context @group Plugin | ||||
ContextTest | class | Drupal\Tests\Component\Plugin\Context | core/ |
@coversDefaultClass \Drupal\Component\Plugin\Context\Context @group Plugin | ||||
ContextTypedDataTest | class | Drupal\KernelTests\Core\Plugin | core/ |
Tests that contexts work properly with the typed data manager. | ||||
ContextualController | class | Drupal\contextual | core/ |
Returns responses for Contextual module routes. | ||||
ContextualDynamicContextTest | class | Drupal\Tests\contextual\Functional | core/ |
Tests if contextual links are showing on the front page depending on permissions. | ||||
ContextualFiltersBlockContextTest | class | Drupal\Tests\views\Functional\Plugin | core/ |
A test for contextual filters exposed as block context. | ||||
ContextualFilterTest | class | Drupal\Tests\views\FunctionalJavascript\Plugin\views\Handler | core/ |
Tests the contextual filter handler UI. | ||||
ContextualLinkClickTrait | trait | Drupal\Tests\contextual\FunctionalJavascript | core/ |
Functions for testing contextual links. | 14 | |||
ContextualLinkDefault | class | Drupal\Core\Menu | core/ |
Provides a common base implementation of a contextual link. | 2 | 4 | ||
ContextualLinkDefaultTest | class | Drupal\Tests\Core\Menu | core/ |
@group Menu @coversDefaultClass \Drupal\Core\Menu\ContextualLinkDefault | ||||
ContextualLinkInterface | interface | Drupal\Core\Menu | core/ |
Defines a contextual link plugin. | 1 | |||
ContextualLinkManager | class | Drupal\Core\Menu | core/ |
Defines a contextual link plugin manager to deal with contextual links. | 2 | |||
ContextualLinkManagerInterface | interface | Drupal\Core\Menu | core/ |
Provides an object which returns the available contextual links. | 1 | |||
ContextualLinkManagerTest | class | Drupal\Tests\Core\Menu | core/ |
@coversDefaultClass \Drupal\Core\Menu\ContextualLinkManager @group Menu | ||||
ContextualLinks | class | Drupal\contextual\Element | core/ |
Provides a contextual_links element. | ||||
ContextualLinks | class | Drupal\contextual\Plugin\views\field | core/ |
Provides a handler that adds contextual links. | ||||
ContextualLinksPlaceholder | class | Drupal\contextual\Element | core/ |
Provides a contextual_links_placeholder element. | ||||
ContextualLinksTest | class | Drupal\Tests\contextual\FunctionalJavascript | core/ |
Tests the UI for correct contextual links. | ||||
ContextualLinksTest | class | Drupal\Tests\layout_builder\FunctionalJavascript | core/ |
Test contextual links compatibility with the Layout Builder. | ||||
ContextualLinksTest | class | Drupal\Tests\node\FunctionalJavascript | core/ |
Create a node with revisions and test contextual links. | ||||
ContextualUnitTest | class | Drupal\Tests\contextual\Kernel | core/ |
Tests all edge cases of converting from #contextual_links to ids and vice versa. | ||||
ContextualValidatorInterface | interface | Drupal\Core\TypedData\Validation | core/ |
Extends the contextual validator validate method by a new parameter. | 1 | |||
ControllerBase | abstract class | Drupal\Core\Controller | core/ |
Utility base class for thin controllers. | 75 | 75 | ||
ControllerBaseTest | class | Drupal\Tests\Core\Controller | core/ |
Tests that the base controller class. | ||||
ControllerResolver | class | Drupal\Core\Controller | core/ |
ControllerResolver to enhance controllers beyond Symfony's basic handling. | 5 | 2 | ||
ControllerResolverInterface | interface | Drupal\Core\Controller | core/ |
Extends the ControllerResolverInterface from symfony. | 1 | 8 | ||
ControllerResolverTest | class | Drupal\Tests\Core\Controller | core/ |
@coversDefaultClass \Drupal\Core\Controller\ControllerResolver @group Controller | ||||
Convert | class | Drupal\system\Plugin\ImageToolkit\Operation\gd | core/ |
Defines GD2 convert operation. | ||||
ConvertImageEffect | class | Drupal\image\Plugin\ImageEffect | core/ |
Converts an image resource. | ||||
ConvertTokens | class | Drupal\user\Plugin\migrate\process | core/ |
Plugin to replace !tokens with [tokens]. | 1 | |||
ConvertTokensTest | class | Drupal\Tests\user\Unit\Plugin\migrate\process | core/ |
Tests the ConvertTokens plugin. | ||||
Cookie | class | Drupal\user\Authentication\Provider | core/ |
Cookie based authentication provider. | 2 | |||
CookieResourceTestTrait | trait | Drupal\Tests\rest\Functional | core/ |
Trait for ResourceTestBase subclasses testing $auth=cookie. | 155 | |||
CookiesCacheContext | class | Drupal\Core\Cache\Context | core/ |
Defines the CookiesCacheContext service, for "per cookie" caching. | 2 | |||
CopyTest | class | Drupal\Tests\file\Kernel | core/ |
Tests the file copy function. | ||||
CoreServiceProvider | class | Drupal\Core | core/ |
ServiceProvider class for mandatory core services. | ||||
Corn | class | Drupal\Tests\Component\Plugin\Fixtures\vegetable | core/ |
Plugin annotation @Plugin( id = "corn", label = "Corn", color = "yellow" ) | 1 | |||
CorsCompilerPass | class | Drupal\Core\DependencyInjection\Compiler | core/ |
Provides a compiler pass which disables the CORS middleware in case disabled. | 1 | |||
CorsIntegrationTest | class | Drupal\FunctionalTests\HttpKernel | core/ |
Tests CORS provided by Drupal. | ||||
CountableResourceType | class | Drupal\jsonapi_test_collection_count\ResourceType | core/ |
Subclass with overridden ::includeCount() for testing purposes. | ||||
CountableResourceTypeRepository | class | Drupal\jsonapi_test_collection_count\ResourceType | core/ |
Provides a repository of JSON:API configurable resource types. | 2 | |||
CountConstraint | class | Drupal\Core\Validation\Plugin\Validation\Constraint | core/ |
Count constraint. | ||||
Counter | class | Drupal\views\Plugin\views\field | core/ |
Field handler to show a counter of the current row. | 1 | |||
CounterTest | class | Drupal\Tests\views\Unit\Plugin\field | core/ |
@coversDefaultClass \Drupal\views\Plugin\views\field\Counter @group views | ||||
CountryManager | class | Drupal\Core\Locale | core/ |
Provides list of countries. | 2 | |||
CountryManagerInterface | interface | Drupal\Core\Locale | core/ |
Defines a common interface for country managers. | 1 | 2 | ||
CreatedItem | class | Drupal\Core\Field\Plugin\Field\FieldType | core/ |
Defines the 'created' entity field type. | 1 | 3 | ||
CreateHalSettingsForLinkDomainUpdateTest | class | Drupal\Tests\hal\Functional\Update | core/ |
Tests that 'hal.settings' is created, to store 'link_domain'. | ||||
CreateMigrationsTrait | trait | Drupal\Tests\migrate_drupal\Traits | core/ |
1 |
Pagination
- Previous page
- Page 36
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.