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 |
---|---|---|---|---|---|---|---|---|
GenericRule | class | Composer\DependencyResolver | vendor/ |
@author Nils Adermann <naderman@naderman.de> | ||||
GenericTagValueNode | class | PHPStan\PhpDocParser\Ast\PhpDoc | vendor/ |
2 | ||||
GenericTimeConverter | class | Ramsey\Uuid\Converter\Time | vendor/ |
GenericTimeConverter uses the provided calculator to calculate and convert time values | 2 | |||
GenericTypeNode | class | PHPStan\PhpDocParser\Ast\Type | vendor/ |
12 | ||||
GenericValidator | final class | Ramsey\Uuid\Validator | vendor/ |
GenericValidator validates strings as UUIDs of any variant | 1 | |||
Get | class | Drupal\migrate\Plugin\migrate\process | core/ |
Gets the source value. | ||||
GetAttrExpression | class | Twig\Node\Expression | vendor/ |
9 | ||||
GetDeprecatedServiceRule | final class | mglaman\PHPStanDrupal\Rules\Deprecations | vendor/ |
@implements Rule<Node\Expr\MethodCall> | ||||
GetPublicDescriptorTrait | trait | Google\Protobuf\Internal | vendor/ |
3 | ||||
GetQueryReturnTypeExtension | final class | mglaman\PHPStanDrupal\Type\EntityStorage | vendor/ |
|||||
GetRequestDataSniff | class | PHP_CodeSniffer\Standards\MySource\Sniffs\PHP | vendor/ |
|||||
GetRequestDataSniff | class | DrupalPractice\Sniffs\Variables | vendor/ |
Ensures that Symfony request object is used to access super globals. | ||||
GetSetMethodNormalizer | final class | Symfony\Component\Serializer\Normalizer | vendor/ |
Converts between objects with getter and setter methods and arrays. | ||||
GetSetMethodNormalizerContextBuilder | final class | Symfony\Component\Serializer\Context\Normalizer | vendor/ |
A helper providing autocompletion for available GetSetMethodNormalizer options. | ||||
GetterMetadata | class | Symfony\Component\Validator\Mapping | vendor/ |
Stores all metadata needed for validating a class property via its getter method. | 1 | |||
Gettext | class | Drupal\locale | core/ |
Static class providing Drupal specific Gettext functionality. | 1 | |||
Git | class | Drupal\Composer\Plugin\Scaffold | composer/ |
Provide some Git utility operations. | ||||
Git | class | Composer\Util | vendor/ |
@author Jordi Boggiano <j.boggiano@seld.be> | 6 | |||
GitBitbucketDriver | class | Composer\Repository\Vcs | vendor/ |
@author Per Bernhardt <plb@webfactory.de> | ||||
Gitblame | class | PHP_CodeSniffer\Reports | vendor/ |
|||||
GitDownloader | class | Composer\Downloader | vendor/ |
@author Jordi Boggiano <j.boggiano@seld.be> | ||||
GitDriver | class | Composer\Repository\Vcs | vendor/ |
@author Jordi Boggiano <j.boggiano@seld.be> | ||||
GitExcludeFilter | class | Composer\Package\Archiver | vendor/ |
An exclude filter that processes gitattributes | ||||
GitExcluder | final class | Drupal\package_manager\PathExcluder | core/ |
Excludes .git directories from stage operations. | ||||
GitHub | class | Composer\Util | vendor/ |
@author Jordi Boggiano <j.boggiano@seld.be> | 1 | |||
GithubActionError | final class | Composer\Console | vendor/ |
1 | ||||
GithubActionReporter | class | Symfony\Component\Console\CI | vendor/ |
Utility class for Github actions. | 1 | |||
GitHubDriver | class | Composer\Repository\Vcs | vendor/ |
@author Jordi Boggiano <j.boggiano@seld.be> | ||||
Gitignore | class | Symfony\Component\Finder | vendor/ |
Gitignore matches against text. | 1 | |||
GitLab | class | Composer\Util | vendor/ |
@author Roshan Gautam <roshan.gautam@hotmail.com> | 1 | |||
Gitlab | class | Micheh\PhpCodeSniffer\Report | vendor/ |
|||||
GitLabDriver | class | Composer\Repository\Vcs | vendor/ |
Driver for GitLab API, use the Git driver for local checkouts. | ||||
GitMergeConflictSniff | class | PHP_CodeSniffer\Standards\Generic\Sniffs\VersionControl | vendor/ |
|||||
GitModified | class | PHP_CodeSniffer\Filters | vendor/ |
|||||
GitStaged | class | PHP_CodeSniffer\Filters | vendor/ |
|||||
Glob | class | Symfony\Component\Finder | vendor/ |
Glob matches globbing patterns against text. | 2 | |||
GlobalAttribute | class | Drupal\ckeditor5\Plugin\CKEditor5Plugin | core/ |
CKEditor 5 Global Attribute for filter_html. | 1 | |||
GlobalClassSniff | class | DrupalPractice\Sniffs\Objects | vendor/ |
Checks that Node::load() calls and friends are not used in forms, controllers or services. | ||||
GlobalCommand | class | Composer\Command | vendor/ |
@author Jordi Boggiano <j.boggiano@seld.be> | ||||
GlobalConstantSniff | class | DrupalPractice\Sniffs\Constants | vendor/ |
Checks that globally defined constants are not used in Drupal 8 and higher. | ||||
GlobalDefineSniff | class | DrupalPractice\Sniffs\Constants | vendor/ |
Checks that global define() constants are not used in modules in Drupal 8. | ||||
GlobalDrupalDependencyInjectionRule | class | mglaman\PHPStanDrupal\Rules\Drupal | vendor/ |
@implements Rule<Node\Expr\StaticCall> | ||||
GlobalDrupalSniff | class | DrupalPractice\Sniffs\Objects | vendor/ |
Checks that \Drupal::service() and friends is not used in forms, controllers, services. | ||||
GlobalFunctionSniff | class | DrupalPractice\Sniffs\Objects | vendor/ |
Checks that global functions like t() are not used in forms or controllers. | ||||
GlobalFunctionSniff | class | PHP_CodeSniffer\Standards\Squiz\Sniffs\Functions | vendor/ |
|||||
GlobalKeywordSniff | class | PHP_CodeSniffer\Standards\Squiz\Sniffs\PHP | vendor/ |
|||||
Globals | final class | OpenTelemetry\API | vendor/ |
Provides access to the globally configured instrumentation instances. | 3 | |||
GlobalsInterface | interface | Twig\Extension | vendor/ |
Allows Twig extensions to add globals to the context. | 1 | |||
GlobalState | final class | PHPUnit\Util | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | 1 | |||
Global_ | class | PhpParser\Node\Stmt | vendor/ |