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 |
---|---|---|---|---|---|---|---|---|
CreateNew | class | Drupal\system\Plugin\ImageToolkit\Operation\gd | core/ |
Defines GD2 create_new image operation. | ||||
CreateSampleEntityTest | class | Drupal\KernelTests\Core\Entity | core/ |
Tests the ContentEntityStorageBase::createWithSampleValues method. | ||||
CreateTestContentEntitiesTrait | trait | Drupal\Tests\migrate_drupal\Traits | core/ |
Provides helper methods for creating test content. | 8 | |||
CredentialForm | class | Drupal\migrate_drupal_ui\Form | core/ |
Migrate Upgrade database credential form. | 1 | |||
Cron | class | Drupal\Core\ProxyClass | core/ |
Provides a proxy class for \Drupal\Core\Cron. | ||||
Cron | class | Drupal\Core | core/ |
The Drupal core Cron service. | 2 | |||
CronAccessCheck | class | Drupal\system\Access | core/ |
Access check for cron routes. | 2 | |||
CronController | class | Drupal\system | core/ |
Controller for Cron handling. | ||||
CronForm | class | Drupal\system\Form | core/ |
Configure cron settings for this site. | 1 | |||
CronInterface | interface | Drupal\Core | core/ |
An interface for running cron tasks. | 2 | 3 | ||
CronQueueTest | class | Drupal\Tests\system\Kernel\System | core/ |
Tests the Cron Queue runner. | ||||
CronQueueTestBrokenQueue | class | Drupal\cron_queue_test\Plugin\QueueWorker | core/ |
Plugin annotation @QueueWorker( id = "cron_queue_test_broken_queue", title = @Translation("Broken queue test"), cron = {"time" = 60} ) | ||||
CronQueueTestException | class | Drupal\cron_queue_test\Plugin\QueueWorker | core/ |
Plugin annotation @QueueWorker( id = "cron_queue_test_exception", title = @Translation("Exception test"), cron = {"time" = 1} ) | ||||
CronQueueTestRequeueException | class | Drupal\cron_queue_test\Plugin\QueueWorker | core/ |
Plugin annotation @QueueWorker( id = "cron_queue_test_requeue_exception", title = @Translation("RequeueException test"), cron = {"time" = 60} ) | ||||
CronRunTest | class | Drupal\Tests\system\Functional\System | core/ |
Tests cron runs. | ||||
CronRunTrait | trait | Drupal\Tests\Traits\Core | core/ |
Adds ability to run cron from tests. | 17 | |||
Crop | class | Drupal\system\Plugin\ImageToolkit\Operation\gd | core/ |
Defines GD2 Crop operation. | ||||
CropImageEffect | class | Drupal\image\Plugin\ImageEffect | core/ |
Crops an image resource. | 1 | |||
CrudTest | class | Drupal\Tests\rdf\Kernel | core/ |
Tests the RDF mapping CRUD functions. | ||||
Crypt | class | Drupal\Component\Utility | core/ |
Utility class for cryptographically-secure string handling routines. | 83 | |||
CryptTest | class | Drupal\Tests\Component\Utility | core/ |
Tests random byte generation. | ||||
CsrfAccessCheck | class | Drupal\Core\Access | core/ |
Allows access to routes to be controlled by a '_csrf_token' parameter. | 1 | 2 | ||
CsrfAccessCheckTest | class | Drupal\Tests\Core\Access | core/ |
@coversDefaultClass \Drupal\Core\Access\CsrfAccessCheck @group Access | ||||
CsrfRequestHeaderAccessCheck | class | Drupal\Core\Access | core/ |
Access protection against CSRF attacks. | 1 | 2 | ||
CsrfRequestHeaderTest | class | Drupal\Tests\system\Functional | core/ |
Tests protecting routes by requiring CSRF token in the request header. | ||||
CsrfTokenController | class | Drupal\system\Controller | core/ |
Returns responses for CSRF token routes. | ||||
CsrfTokenGenerator | class | Drupal\Core\Access | core/ |
Generates and validates CSRF tokens. | 14 | 2 | ||
CsrfTokenGeneratorTest | class | Drupal\Tests\Core\Access | core/ |
Tests the CsrfTokenGenerator class. | ||||
CsrfTokenRaceTest | class | Drupal\FunctionalJavascriptTests\Core | core/ |
Test race condition for CSRF tokens for simultaneous requests. | ||||
CssCollectionGrouper | class | Drupal\Core\Asset | core/ |
Groups CSS assets. | 1 | 2 | ||
CssCollectionGrouperUnitTest | class | Drupal\Tests\Core\Asset | core/ |
Tests the CSS asset collection grouper. | ||||
CssCollectionOptimizer | class | Drupal\Core\Asset | core/ |
Optimizes CSS assets. | 2 | |||
CssCollectionRenderer | class | Drupal\Core\Asset | core/ |
Renders CSS assets. | 1 | 2 | ||
CssCollectionRendererUnitTest | class | Drupal\Tests\Core\Asset | core/ |
Tests the CSS asset collection renderer. | ||||
CssCommand | class | Drupal\Core\Ajax | core/ |
An AJAX command for calling the jQuery css() method. | 2 | |||
CssOptimizer | class | Drupal\Core\Asset | core/ |
Optimizes a CSS asset. | 2 | 2 | ||
CssOptimizerUnitTest | class | Drupal\Tests\Core\Asset | core/ |
Tests the CSS asset optimizer. | ||||
Current | class | Drupal\user\Plugin\views\filter | core/ |
Filter handler for the current user. | ||||
CurrentLanguageContext | class | Drupal\Core\Language\ContextProvider | core/ |
Sets the current language as a context. | 2 | |||
CurrentPathStack | class | Drupal\Core\Path | core/ |
Represents the current path for the current request. | 20 | 2 | ||
CurrentRouteMatch | class | Drupal\Core\Routing | core/ |
Default object for current_route_match service. | 3 | 2 | ||
CurrentRouteMatchTest | class | Drupal\Tests\Core\Routing | core/ |
@coversDefaultClass \Drupal\Core\Routing\CurrentRouteMatch @group Routing | ||||
CurrentThemeCondition | class | Drupal\system\Plugin\Condition | core/ |
Provides a 'Current Theme' condition. | ||||
CurrentThemeConditionTest | class | Drupal\KernelTests\Core\Plugin\Condition | core/ |
Tests the CurrentThemeCondition plugin. | ||||
CurrentUser | class | Drupal\user\Plugin\views\argument_default | core/ |
Default argument plugin to extract the current user | ||||
CurrentUserContext | class | Drupal\user\ContextProvider | core/ |
Sets the current user as a context. | 2 | |||
CurrentUserContextTest | class | Drupal\Tests\user\Kernel\ContextProvider | core/ |
@coversDefaultClass \Drupal\user\ContextProvider\CurrentUserContext | ||||
Custom | class | Drupal\views\Plugin\views\field | core/ |
A handler to provide a field that is completely custom by the administrator. | ||||
CustomAccessCheck | class | Drupal\Core\Access | core/ |
Defines an access checker that allows specifying a custom method for access. | 1 | 2 | ||
CustomAccessCheckTest | class | Drupal\Tests\Core\Access | core/ |
@coversDefaultClass \Drupal\Core\Access\CustomAccessCheck @group Access |
Pagination
- Previous page
- Page 37
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.