Classes, traits, and interfaces - Drupal 11.1.x - Drupal Core
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
File
-
core/
core.api.php, line 1518
Name | Deprecated | Object type | Namespace | File name | Summary | Direct uses | Use statements | Strings |
---|---|---|---|---|---|---|---|---|
CastSqlInterface | interface | Drupal\views\Plugin\views\query | core/ |
Defines an interface for defining cast expressions in SQL. | 2 | 1 | ||
CatchClause | class | Peast\Syntax\Node | vendor/ |
A node that represents the catch clause in a try-catch statement. | ||||
CatchHelper | class | SlevomatCodingStandard\Helpers | vendor/ |
@internal | 3 | |||
Catch_ | class | PhpParser\Node\Stmt | vendor/ |
1 | ||||
CategorizingPluginManagerInterface | interface | Drupal\Component\Plugin | core/ |
Defines an interface for plugin managers that categorize plugin definitions. | 5 | 5 | ||
CategorizingPluginManagerTrait | trait | Drupal\Core\Plugin | core/ |
Provides a trait for the CategorizingPluginManagerInterface. | 4 | |||
CategoryAutocompleteController | class | Drupal\block\Controller | core/ |
Returns autocomplete responses for block categories. | ||||
Cbf | class | PHP_CodeSniffer\Reports | vendor/ |
|||||
CFWSNearAt | class | Egulias\EmailValidator\Warning | vendor/ |
2 | ||||
CFWSWithFWS | class | Egulias\EmailValidator\Warning | vendor/ |
3 | ||||
ChainableFilter | class | DeepCopy\Filter | vendor/ |
Defines a decorator filter that will not stop the chain of filters. | 1 | |||
ChainBreadcrumbBuilderInterface | interface | Drupal\Core\Breadcrumb | core/ |
Defines an interface a chained service that builds the breadcrumb. | 1 | |||
ChainCache | final class | Twig\Cache | vendor/ |
Chains several caches together. | ||||
ChainCacheClearer | class | Symfony\Component\HttpKernel\CacheClearer | vendor/ |
ChainCacheClearer. | ||||
ChainDecoder | class | Symfony\Component\Serializer\Encoder | vendor/ |
Decoder delegating the decoding to a chain of decoders. | 1 | |||
ChainedFastBackend | class | Drupal\Core\Cache | core/ |
Defines a backend with a fast and a consistent backend chain. | ||||
ChainedFastBackendFactory | class | Drupal\Core\Cache | core/ |
Defines the chained fast cache backend factory. | ||||
ChainedPlaceholderStrategy | class | Drupal\Core\Render\Placeholder | core/ |
Renders placeholders using a chain of placeholder strategies. | ||||
ChainElement | abstract class | Peast\Syntax\Node | vendor/ |
A node that represents a chain element. | 2 | |||
ChainEncoder | class | Symfony\Component\Serializer\Encoder | vendor/ |
Encoder delegating the decoding to a chain of encoders. | 1 | |||
ChainEntityResolver | class | Drupal\serialization\EntityResolver | core/ |
Resolver delegating the entity resolution to a chain of resolvers. | 2 | |||
ChainEntityResolverInterface | interface | Drupal\serialization\EntityResolver | core/ |
An interface for delegating an entity resolution to a chain of resolvers. | 1 | |||
ChainExpression | class | Peast\Syntax\Node | vendor/ |
A node that represents a chain expression. For example: test?.test?.() | ||||
ChainLoader | final class | Twig\Loader | vendor/ |
Loads templates from other loaders. | 1 | |||
ChainRequestMatcher | class | Symfony\Component\HttpFoundation | vendor/ |
ChainRequestMatcher verifies that all checks match against a Request instance. | ||||
ChainRequestPolicy | class | Drupal\Core\PageCache | core/ |
Implements a compound request policy. | 2 | 1 | ||
ChainRequestPolicyInterface | interface | Drupal\Core\PageCache | core/ |
Defines the interface for compound request policies. | 1 | |||
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. | 2 | |||
ChainResponsePolicyInterface | interface | Drupal\Core\PageCache | core/ |
Defines the interface for compound request policies. | 2 | |||
ChangedCommand | class | Drupal\Core\Ajax | core/ |
An AJAX command for marking HTML elements as changed. | ||||
ChangedFieldItemList | class | Drupal\Core\Field | core/ |
Defines an item list class for changed fields. | 1 | |||
ChangedItem | class | Drupal\Core\Field\Plugin\Field\FieldType | core/ |
Defines the 'changed' entity field type. | ||||
ChangeLogger | final class | Drupal\package_manager\EventSubscriber | core/ |
Event subscriber to log changes that happen during the stage life cycle. | ||||
ChangeReportInterface | interface | Composer\Downloader | vendor/ |
ChangeReport interface. | 2 | 1 | ||
ChangeUserRoleBase | abstract class | Drupal\user\Plugin\Action | core/ |
Provides a base class for operations to change a user's role. | 2 | |||
CharacterBeforePHPOpeningTagSniff | class | PHP_CodeSniffer\Standards\Generic\Sniffs\PHP | vendor/ |
|||||
CharacterReference | class | Masterminds\HTML5\Parser | vendor/ |
Manage entity references. | ||||
CharacterStream | final class | Symfony\Component\Mime | vendor/ |
@author Fabien Potencier <fabien@symfony.com> @author Xavier De Cock <xdecock@gmail.com> | 2 | |||
CharNotAllowed | class | Egulias\EmailValidator\Result\Reason | vendor/ |
1 | ||||
Charset | final class | Symfony\Component\Validator\Constraints | vendor/ |
@author Alexandre Daubois <alex.daubois@gmail.com> | ||||
CharsetValidator | final class | Symfony\Component\Validator\Constraints | vendor/ |
@author Alexandre Daubois <alex.daubois@gmail.com> | ||||
CheckAliasValidityPass | class | Symfony\Component\DependencyInjection\Compiler | vendor/ |
This pass validates aliases, it provides the following checks: | ||||
CheckArgumentsValidityPass | class | Symfony\Component\DependencyInjection\Compiler | vendor/ |
Checks if arguments of methods are properly configured. | ||||
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 | |||
CheckCircularReferencesPass | class | Symfony\Component\DependencyInjection\Compiler | vendor/ |
Checks your services for circular references. | 1 | |||
CheckDefinitionValidityPass | class | Symfony\Component\DependencyInjection\Compiler | vendor/ |
This pass validates each definition individually only taking the information into account which is contained in the definition itself. | ||||
CheckExceptionOnInvalidReferenceBehaviorPass | class | Symfony\Component\DependencyInjection\Compiler | vendor/ |
Checks that all references are pointing to a valid service. | ||||
CheckPlainSniff | class | DrupalPractice\Sniffs\FunctionCalls | vendor/ |
Check that check_plain() is not used on literal strings. |