Classes, traits, and interfaces in Drupal 8
Primary tabs
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
|
Name |
Type | Namespace | Location | Description | Direct uses | Use statements | Strings |
|---|---|---|---|---|---|---|---|
| CacheTestController | class |
Drupal\ |
core/ |
Controller routines for cache_test routes. | |||
| CacheWebTest | class |
Drupal\ |
core/ |
Tests pluggable caching for views via a web test. | |||
| CalculatedCacheContextInterface | interface |
Drupal\ |
core/ |
Provides an interface for defining a calculated cache context service. | 10 | 3 | |
| CallableClass | class |
Drupal\ |
core/ |
||||
| Callback | class |
Drupal\ |
core/ |
Passes the source value to a callback. | 1 | ||
| Callbacks | class |
Drupal\ |
core/ |
Simple object for testing methods as Ajax callbacks. | 3 | ||
| Callbacks | class |
Drupal\ |
core/ |
Simple class for testing methods as Form API callbacks. | 1 | ||
| CallbackTest | class |
Drupal\ |
core/ |
Tests the callback process plugin. | |||
| CancelUser | class |
Drupal\ |
core/ |
Cancels a user account. | |||
| CaseInsensitivePathTest | class |
Drupal\ |
core/ |
Tests incoming path case insensitivity. | |||
| CaseSensitivityTest | class |
Drupal\ |
core/ |
Tests handling case sensitive collation. | |||
| CategorizingPluginManager | class |
Drupal\ |
core/ |
Class that allows testing the trait. | |||
| CategorizingPluginManagerInterface | interface |
Drupal\ |
core/ |
Defines an interface for plugin managers that categorize plugin definitions. | 6 | 6 | |
| CategorizingPluginManagerTrait | trait |
Drupal\ |
core/ |
Provides a trait for the CategorizingPluginManagerInterface. | 5 | ||
| CategorizingPluginManagerTraitTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\Core\Plugin\CategorizingPluginManagerTrait @group Plugin | |||
| CategoryAutocompleteController | class |
Drupal\ |
core/ |
Returns autocomplete responses for block categories. | 1 | ||
| CategoryAutocompleteTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\block\Controller\CategoryAutocompleteController @group block | |||
| CckFieldBackwardsCompatibilityTest | class |
Drupal\ |
core/ |
@group migrate_drupal @group legacy | |||
| CckFieldPluginBase Deprecated | abstract class |
Drupal\ |
core/ |
The base class for all field plugins. | 8 | 8 | |
| CckFile Deprecated | class |
Drupal\ |
core/ |
Plugin annotation @MigrateProcessPlugin( id = "d6_cck_file" ) | 2 | ||
| CckFileTest | class |
Drupal\ |
core/ |
Cck file field migration. | |||
| CckFileTest | class |
Drupal\ |
core/ |
@group file @group legacy | |||
| CckLink Deprecated | class |
Drupal\ |
core/ |
Plugin annotation @MigrateProcessPlugin( id = "d6_cck_link" ) | |||
| CckMigration Deprecated | class |
Drupal\ |
core/ |
Migration plugin class for migrations dealing with CCK field values. | |||
| ChainBreadcrumbBuilderInterface | interface |
Drupal\ |
core/ |
Defines an interface a chained service that builds the breadcrumb. | 1 | ||
| ChainedFastBackend | class |
Drupal\ |
core/ |
Defines a backend with a fast and a consistent backend chain. | 2 | ||
| ChainedFastBackendFactory | class |
Drupal\ |
core/ |
Defines the chained fast cache backend factory. | 2 | ||
| ChainedFastBackendTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\Core\Cache\ChainedFastBackend @group Cache | |||
| ChainedFastBackendTest | class |
Drupal\ |
core/ |
Unit test of the fast chained backend using the generic cache unit test base. | |||
| ChainedPlaceholderStrategy | class |
Drupal\ |
core/ |
Renders placeholders using a chain of placeholder strategies. | 1 | 2 | |
| ChainedPlaceholderStrategyTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\Core\Render\Placeholder\ChainedPlaceholderStrategy @group Render | |||
| ChainEntityResolver | class |
Drupal\ |
core/ |
Resolver delegating the entity resolution to a chain of resolvers. | 1 | 2 | |
| ChainEntityResolverInterface | interface |
Drupal\ |
core/ |
An interface for delegating a entity resolution to a chain of resolvers. | 1 | ||
| ChainEntityResolverTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\serialization\EntityResolver\ChainEntityResolver @group serialization | |||
| ChainRequestPolicy | class |
Drupal\ |
core/ |
Implements a compound request policy. | 2 | 2 | |
| ChainRequestPolicyInterface | interface |
Drupal\ |
core/ |
Defines the interface for compound request policies. | 1 | ||
| ChainRequestPolicyTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\Core\PageCache\ChainRequestPolicy @group PageCache | |||
| ChainResponsePolicy | class |
Drupal\ |
core/ |
Implements a compound response policy. | 1 | 4 | |
| ChainResponsePolicy | class |
Drupal\ |
core/ |
Provides a proxy class for \Drupal\Core\PageCache\ChainResponsePolicy. | |||
| ChainResponsePolicyInterface | interface |
Drupal\ |
core/ |
Defines the interface for compound request policies. | 2 | ||
| ChainResponsePolicyTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\Core\PageCache\ChainResponsePolicy @group PageCache | |||
| ChangedCommand | class |
Drupal\ |
core/ |
An AJAX command for marking HTML elements as changed. | 2 | ||
| ChangedFieldItemList | class |
Drupal\ |
core/ |
Defines a item list class for changed fields. | |||
| ChangedItem | class |
Drupal\ |
core/ |
Defines the 'changed' entity field type. | 1 | 2 | |
| ChangedTestItem | class |
Drupal\ |
core/ |
Defines the 'changed_test' entity field type. | |||
| ChangeUserRoleBase | abstract class |
Drupal\ |
core/ |
Provides a base class for operations to change a user's role. | 2 | ||
| Checkbox | class |
Drupal\ |
core/ |
Provides a form element for a single checkbox. | |||
| Checkboxes | class |
Drupal\ |
core/ |
Provides a form element for a set of checkboxes. | 3 | ||
| CheckboxTest | class |
Drupal\ |
core/ |
Tests form API checkbox handling of various combinations of #default_value and #return_value. | |||
| CheckProvider | class |
Drupal\ |
core/ |
Loads access checkers from the container. | 1 | 2 |