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 |
---|---|---|---|---|---|---|---|---|
CacheTestController | class | Drupal\cache_test\Controller | core/ |
Controller routines for cache_test routes. | ||||
CacheWebTest | class | Drupal\Tests\views\Functional\Plugin | core/ |
Tests pluggable caching for views via a web test. | ||||
CalculatedCacheContextInterface | interface | Drupal\Core\Cache\Context | core/ |
Provides an interface for defining a calculated cache context service. | 10 | 3 | ||
CallableClass | class | Drupal\Tests\Component\EventDispatcher | core/ |
|||||
Callback | class | Drupal\migrate\Plugin\migrate\process | core/ |
Passes the source value to a callback. | 1 | |||
Callbacks | class | Drupal\ajax_forms_test | core/ |
Simple object for testing methods as Ajax callbacks. | 3 | |||
Callbacks | class | Drupal\form_test | core/ |
Simple class for testing methods as Form API callbacks. | 1 | |||
CallbackTest | class | Drupal\Tests\migrate\Unit\process | core/ |
Tests the callback process plugin. | ||||
CancelUser | class | Drupal\user\Plugin\Action | core/ |
Cancels a user account. | ||||
CaseInsensitivePathTest | class | Drupal\FunctionalTests\Routing | core/ |
Tests incoming path case insensitivity. | ||||
CaseSensitivityTest | class | Drupal\KernelTests\Core\Database | core/ |
Tests handling case sensitive collation. | ||||
CategorizingPluginManager | class | Drupal\Tests\Core\Plugin | core/ |
Class that allows testing the trait. | ||||
CategorizingPluginManagerInterface | interface | Drupal\Component\Plugin | core/ |
Defines an interface for plugin managers that categorize plugin definitions. | 6 | 6 | ||
CategorizingPluginManagerTrait | trait | Drupal\Core\Plugin | core/ |
Provides a trait for the CategorizingPluginManagerInterface. | 5 | |||
CategorizingPluginManagerTraitTest | class | Drupal\Tests\Core\Plugin | core/ |
@coversDefaultClass \Drupal\Core\Plugin\CategorizingPluginManagerTrait @group Plugin | ||||
CategoryAutocompleteController | class | Drupal\block\Controller | core/ |
Returns autocomplete responses for block categories. | 1 | |||
CategoryAutocompleteTest | class | Drupal\Tests\block\Unit | core/ |
@coversDefaultClass \Drupal\block\Controller\CategoryAutocompleteController @group block | ||||
CckFieldBackwardsCompatibilityTest | class | Drupal\Tests\migrate_drupal\Kernel | core/ |
@group migrate_drupal @group legacy | ||||
CckFieldPluginBase | in drupal:8.4.0 and is removed from drupal:9.0.0. Use \Drupal\migrate_drupal\Plugin\migrate\field\FieldPluginBase instead. |
abstract class | Drupal\migrate_drupal\Plugin\migrate\cckfield | core/ |
The base class for all field plugins. | 8 | 8 | |
CckFile | in drupal:8.3.0 and is removed from drupal:9.0.0. Use \Drupal\file\Plugin\migrate\process\d6\FieldFile instead. |
class | Drupal\file\Plugin\migrate\process\d6 | core/ |
Plugin annotation @MigrateProcessPlugin( id = "d6_cck_file" ) | 2 | ||
CckFileTest | class | Drupal\Tests\file\Unit\Plugin\migrate\process\d6 | core/ |
@group file @group legacy | ||||
CckFileTest | class | Drupal\Tests\file\Kernel\Migrate\process\d6 | core/ |
Cck file field migration. | ||||
CckLink | in drupal:8.3.0 and is removed from drupal:9.0.0. Use \Drupal\link\Plugin\migrate\process\FieldLink instead. |
class | Drupal\link\Plugin\migrate\process\d6 | core/ |
Plugin annotation @MigrateProcessPlugin( id = "d6_cck_link" ) | |||
CckMigration | in drupal:8.3.0 and is removed from drupal:9.0.0. Use \Drupal\migrate_drupal\Plugin\migrate\FieldMigration instead. |
class | Drupal\migrate_drupal\Plugin\migrate | core/ |
Migration plugin class for migrations dealing with CCK field values. | |||
ChainBreadcrumbBuilderInterface | interface | Drupal\Core\Breadcrumb | core/ |
Defines an interface a chained service that builds the breadcrumb. | 1 | |||
ChainedFastBackend | class | Drupal\Core\Cache | core/ |
Defines a backend with a fast and a consistent backend chain. | 2 | |||
ChainedFastBackendFactory | class | Drupal\Core\Cache | core/ |
Defines the chained fast cache backend factory. | 2 | |||
ChainedFastBackendTest | class | Drupal\Tests\Core\Cache | core/ |
@coversDefaultClass \Drupal\Core\Cache\ChainedFastBackend @group Cache | ||||
ChainedFastBackendTest | class | Drupal\KernelTests\Core\Cache | core/ |
Unit test of the fast chained backend using the generic cache unit test base. | ||||
ChainedPlaceholderStrategy | class | Drupal\Core\Render\Placeholder | core/ |
Renders placeholders using a chain of placeholder strategies. | 1 | 2 | ||
ChainedPlaceholderStrategyTest | class | Drupal\Tests\Core\Render\Placeholder | core/ |
@coversDefaultClass \Drupal\Core\Render\Placeholder\ChainedPlaceholderStrategy @group Render | ||||
ChainEntityResolver | class | Drupal\serialization\EntityResolver | core/ |
Resolver delegating the entity resolution to a chain of resolvers. | 1 | 2 | ||
ChainEntityResolverInterface | interface | Drupal\serialization\EntityResolver | core/ |
An interface for delegating a entity resolution to a chain of resolvers. | 1 | |||
ChainEntityResolverTest | class | Drupal\Tests\serialization\Unit\EntityResolver | core/ |
@coversDefaultClass \Drupal\serialization\EntityResolver\ChainEntityResolver @group serialization | ||||
ChainRequestPolicy | class | Drupal\Core\PageCache | core/ |
Implements a compound request policy. | 2 | 2 | ||
ChainRequestPolicyInterface | interface | Drupal\Core\PageCache | core/ |
Defines the interface for compound request policies. | 1 | |||
ChainRequestPolicyTest | class | Drupal\Tests\Core\PageCache | core/ |
@coversDefaultClass \Drupal\Core\PageCache\ChainRequestPolicy @group PageCache | ||||
ChainResponsePolicy | class | Drupal\Core\ProxyClass\PageCache | core/ |
Provides a proxy class for \Drupal\Core\PageCache\ChainResponsePolicy. | ||||
ChainResponsePolicy | class | Drupal\Core\PageCache | core/ |
Implements a compound response policy. | 1 | 4 | ||
ChainResponsePolicyInterface | interface | Drupal\Core\PageCache | core/ |
Defines the interface for compound request policies. | 2 | |||
ChainResponsePolicyTest | class | Drupal\Tests\Core\PageCache | core/ |
@coversDefaultClass \Drupal\Core\PageCache\ChainResponsePolicy @group PageCache | ||||
ChangedCommand | class | Drupal\Core\Ajax | core/ |
An AJAX command for marking HTML elements as changed. | 2 | |||
ChangedFieldItemList | class | Drupal\Core\Field | core/ |
Defines a item list class for changed fields. | ||||
ChangedItem | class | Drupal\Core\Field\Plugin\Field\FieldType | core/ |
Defines the 'changed' entity field type. | 1 | 2 | ||
ChangedTestItem | class | Drupal\entity_test\Plugin\Field\FieldType | core/ |
Defines the 'changed_test' entity field type. | ||||
ChangeUserRoleBase | abstract class | Drupal\user\Plugin\Action | core/ |
Provides a base class for operations to change a user's role. | 2 | |||
Checkbox | class | Drupal\Core\Render\Element | core/ |
Provides a form element for a single checkbox. | ||||
Checkboxes | class | Drupal\Core\Render\Element | core/ |
Provides a form element for a set of checkboxes. | 3 | |||
CheckboxTest | class | Drupal\Tests\system\Functional\Form | core/ |
Tests form API checkbox handling of various combinations of #default_value and #return_value. | ||||
CheckProvider | class | Drupal\Core\Access | core/ |
Loads access checkers from the container. | 1 | 2 |
Pagination
- Previous page
- Page 19
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.