Classes, traits, and interfaces in Drupal 9
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 |
---|---|---|---|---|---|---|---|
WriteSafeSessionHandlerTest | class |
Drupal\ |
core/ |
Tests \Drupal\Core\Session\WriteSafeSessionHandler. | |||
WysiwygEditor | class |
Drupal\ |
core/ |
Defines the 'wysiwyg' in-place editor. | |||
XdebugRequestTrait | trait |
Drupal\ |
core/ |
||||
XmlEncoder | class |
Drupal\ |
core/ |
Adds XML support for serializer. | 2 | 2 | |
XmlEncoderTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\serialization\Encoder\XmlEncoder @group serialization | |||
XmlEntityNormalizationQuirksTrait | trait |
Drupal\ |
core/ |
Trait for EntityResourceTestBase subclasses testing $format='xml'. | 153 | ||
XmlNormalizationQuirksTrait | trait |
Drupal\ |
core/ |
Trait for ResourceTestBase subclasses testing $format='xml'. | 1 | ||
Xss | class |
Drupal\ |
core/ |
Provides helper to filter for cross-site scripting. | 1 | 49 | |
XssTest | class |
Drupal\ |
core/ |
Tests the Xss vulnerability. | |||
XssTest | class |
Drupal\ |
core/ |
XSS Filtering tests. | |||
XssUnitTest | class |
Drupal\ |
core/ |
Confirm that \Drupal\Component\Utility\Xss::filter() and check_url() work correctly, including invalid multi-byte sequences. | |||
Yaml | class |
Drupal\ |
core/ |
Provides a YAML serialization implementation. | 2 | 12 | 2 |
Yaml | class |
Drupal\ |
core/ |
Provides a YAML serialization implementation. | 31 | ||
YamlDirectoryDiscovery | class |
Drupal\ |
core/ |
Allows multiple YAML files per directory to define plugin definitions. | 2 | ||
YamlDirectoryDiscovery | class |
Drupal\ |
core/ |
Discovers multiple YAML files in a set of directories. | 3 | ||
YamlDirectoryDiscoveryTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\Core\Plugin\Discovery\YamlDirectoryDiscovery | |||
YamlDirectoryDiscoveryTest | class |
Drupal\ |
core/ |
YamlDirectoryDiscoveryTest component unit tests. | |||
YamlDiscovery | class |
Drupal\ |
core/ |
Allows YAML files to define plugin definitions. | 2 | 9 | |
YamlDiscovery | class |
Drupal\ |
core/ |
Provides discovery for YAML files within a given set of directories. | 5 | ||
YamlDiscovery | class |
Drupal\ |
core/ |
Provides discovery for YAML files within a given set of directories. | 1 | 4 | |
YamlDiscoveryDecorator | class |
Drupal\ |
core/ |
Enables YAML discovery for plugin definitions. | 3 | ||
YamlDiscoveryDecoratorTest | class |
Drupal\ |
core/ |
YamlDiscoveryDecorator unit tests. | |||
YamlDiscoveryTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\Core\Plugin\Discovery\YamlDiscovery @group Plugin | |||
YamlDiscoveryTest | class |
Drupal\ |
core/ |
YamlDiscovery component unit tests. | |||
YamlDiscoveryTest | class |
Drupal\ |
core/ |
YamlDiscovery component unit tests. | |||
YamlFileLoader | class |
Drupal\ |
core/ |
YamlFileLoader loads YAML files service definitions. | 2 | ||
YamlFileLoaderTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\Core\DependencyInjection\YamlFileLoader @group DependencyInjection | |||
YamlParserProxy | class |
Drupal\ |
core/ |
||||
YamlParserProxy | class |
Drupal\ |
core/ |
||||
YamlPecl | class |
Drupal\ |
core/ |
Provides default serialization for YAML using the PECL extension. | 2 | ||
YamlPeclTest | class |
Drupal\ |
core/ |
Tests the YamlPecl serialization implementation. | |||
YamlStub | class |
Drupal\ |
core/ |
||||
YamlSymfony | class |
Drupal\ |
core/ |
Default serialization for YAML using the Symfony component. | 2 | ||
YamlSymfonyTest | class |
Drupal\ |
core/ |
Tests the YamlSymfony serialization implementation. | |||
YamlTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\Core\Serialization\Yaml @group Serialization | |||
YamlTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\Component\Serialization\Yaml @group Serialization | |||
YamlTestBase | abstract class |
Drupal\ |
core/ |
Provides standard data to validate different YAML implementations. | 2 | ||
YearDate | class |
Drupal\ |
core/ |
Argument handler for a year. | |||
YearDate | class |
Drupal\ |
core/ |
Argument handler for a year (CCYY) | |||
YearMonthDate | class |
Drupal\ |
core/ |
Argument handler for a year plus month (CCYYMM) | |||
YearMonthDate | class |
Drupal\ |
core/ |
Argument handler for a year plus month (CCYYMM). | |||
ZfExtensionManagerSfContainer | class |
Drupal\ |
core/ |
Defines a bridge between the Laminas service manager to Symfony container. | 1 | 3 | |
ZfExtensionManagerSfContainerTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\Component\Bridge\ZfExtensionManagerSfContainer @group Bridge | |||
Zip | class |
Drupal\ |
core/ |
Defines an archiver implementation for .zip files. | 1 | 1 | |
Zip | class |
Drupal\ |
core/ |
Defines an archiver implementation for .zip files. |