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

Namesort ascending Type Namespace Location Description Direct uses Use statements Strings
ZipTest class Drupal\KernelTests\Core\Archiver core/tests/Drupal/KernelTests/Core/Archiver/ZipTest.php @coversDefaultClass \Drupal\Core\Archiver\Zip @group zip
Zip class Drupal\Core\Archiver core/lib/Drupal/Core/Archiver/Zip.php Defines an archiver implementation for .zip files. 1
YamlTestBase abstract class Drupal\Tests\Component\Serialization core/tests/Drupal/Tests/Component/Serialization/YamlTestBase.php Provides standard data to validate different YAML implementations. 1
YamlSymfony Deprecated class Drupal\Component\Serialization core/lib/Drupal/Component/Serialization/YamlSymfony.php Default serialization for YAML using the Symfony component.
YamlPeclTest class Drupal\Tests\Component\Serialization core/tests/Drupal/Tests/Component/Serialization/YamlPeclTest.php Tests the YamlPecl serialization implementation.
YamlPecl class Drupal\Component\Serialization core/lib/Drupal/Component/Serialization/YamlPecl.php Provides default serialization for YAML using the PECL extension. 1
YamlFileLoader class Drupal\Core\DependencyInjection core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php YamlFileLoader loads YAML files service definitions. 1
YamlDiscoveryTest class Drupal\Tests\Core\Plugin\Discovery core/tests/Drupal/Tests/Core/Plugin/Discovery/YamlDiscoveryTest.php @coversDefaultClass \Drupal\Core\Plugin\Discovery\YamlDiscovery @group Plugin
YamlDiscoveryTest class Drupal\Tests\Core\Discovery core/tests/Drupal/Tests/Core/Discovery/YamlDiscoveryTest.php YamlDiscovery component unit tests.
YamlDiscoveryTest class Drupal\Tests\Component\Discovery core/tests/Drupal/Tests/Component/Discovery/YamlDiscoveryTest.php YamlDiscovery component unit tests.
YamlDiscoveryDecoratorTest class Drupal\Tests\Core\Plugin\Discovery core/tests/Drupal/Tests/Core/Plugin/Discovery/YamlDiscoveryDecoratorTest.php YamlDiscoveryDecorator unit tests.
YamlDiscoveryDecorator class Drupal\Core\Plugin\Discovery core/lib/Drupal/Core/Plugin/Discovery/YamlDiscoveryDecorator.php Enables YAML discovery for plugin definitions. 3
YamlDiscovery class Drupal\Core\Plugin\Discovery core/lib/Drupal/Core/Plugin/Discovery/YamlDiscovery.php Allows YAML files to define plugin definitions. 3 6
YamlDiscovery class Drupal\Core\Discovery core/lib/Drupal/Core/Discovery/YamlDiscovery.php Provides discovery for YAML files within a given set of directories. 5
YamlDiscovery class Drupal\Component\Discovery core/lib/Drupal/Component/Discovery/YamlDiscovery.php Provides discovery for YAML files within a given set of directories. 1 4
YamlDirectoryDiscoveryTest class Drupal\Tests\Core\Plugin\Discovery core/tests/Drupal/Tests/Core/Plugin/Discovery/YamlDirectoryDiscoveryTest.php @coversDefaultClass \Drupal\Core\Plugin\Discovery\YamlDirectoryDiscovery
YamlDirectoryDiscoveryTest class Drupal\Tests\Component\Discovery core/tests/Drupal/Tests/Component/Discovery/YamlDirectoryDiscoveryTest.php YamlDirectoryDiscoveryTest component unit tests.
YamlDirectoryDiscovery class Drupal\Core\Plugin\Discovery core/lib/Drupal/Core/Plugin/Discovery/YamlDirectoryDiscovery.php Allows multiple YAML files per directory to define plugin definitions. 2
YamlDirectoryDiscovery class Drupal\Component\Discovery core/lib/Drupal/Component/Discovery/YamlDirectoryDiscovery.php Discovers multiple YAML files in a set of directories. 3
Yaml class Drupal\Component\Serialization core/lib/Drupal/Component/Serialization/Yaml.php Provides a YAML serialization implementation using symfony/yaml. 11 2
Y2038TimestampUpdateTest class Drupal\Tests\system\Functional\Update core/modules/system/tests/src/Functional/Update/Y2038TimestampUpdateTest.php Tests update of timestamp fields to bigint.
XssUnitTest class Drupal\KernelTests\Core\Common core/tests/Drupal/KernelTests/Core/Common/XssUnitTest.php Tests XSS filtering.
XssTest class Drupal\Tests\Component\Utility core/tests/Drupal/Tests/Component/Utility/XssTest.php XSS Filtering tests.
XssTest class Drupal\Tests\views_ui\Functional core/modules/views_ui/tests/src/Functional/XssTest.php Tests the Xss vulnerability.
Xss class Drupal\Component\Utility core/lib/Drupal/Component/Utility/Xss.php Provides helper to filter for cross-site scripting. 1 30
XmlNormalizationQuirksTrait trait Drupal\Tests\rest\Functional core/modules/rest/tests/src/Functional/XmlNormalizationQuirksTrait.php Trait for ResourceTestBase subclasses testing $format='xml'. 1
XmlEntityNormalizationQuirksTrait trait Drupal\Tests\rest\Functional\EntityResource core/modules/rest/tests/src/Functional/EntityResource/XmlEntityNormalizationQuirksTrait.php Trait for EntityResourceTestBase subclasses testing $format='xml'. 144
XmlEncoderTest class Drupal\Tests\serialization\Unit\Encoder core/modules/serialization/tests/src/Unit/Encoder/XmlEncoderTest.php @coversDefaultClass \Drupal\serialization\Encoder\XmlEncoder @group serialization
XmlEncoder class Drupal\serialization\Encoder core/modules/serialization/src/Encoder/XmlEncoder.php Adds XML support for serializer. 2 2
XdebugRequestTraitTest class Drupal\Tests\Core\Test core/tests/Drupal/Tests/Core/Test/XdebugRequestTraitTest.php Provides tests for the Xdebug request trait.
XdebugRequestTrait trait Drupal\Tests core/tests/Drupal/Tests/XdebugRequestTrait.php 1
WriteSafeSessionHandlerTest class Drupal\Tests\Core\Session core/tests/Drupal/Tests/Core/Session/WriteSafeSessionHandlerTest.php Tests \Drupal\Core\Session\WriteSafeSessionHandler.
WriteSafeSessionHandlerInterface interface Drupal\Core\Session core/lib/Drupal/Core/Session/WriteSafeSessionHandlerInterface.php Provides an interface for session handlers where writing can be disabled. 1
WriteSafeSessionHandler class Drupal\Core\Session core/lib/Drupal/Core/Session/WriteSafeSessionHandler.php Wraps the session handler to prevent writes when not necessary or allowed. 1 2
WorkspaceXmlCookieTest class Drupal\Tests\workspaces\Functional\Rest core/modules/workspaces/tests/src/Functional/Rest/WorkspaceXmlCookieTest.php Test workspace entities for XML requests.
WorkspaceXmlBasicAuthTest class Drupal\Tests\workspaces\Functional\Rest core/modules/workspaces/tests/src/Functional/Rest/WorkspaceXmlBasicAuthTest.php Test workspace entities for XML requests with cookie authentication.
WorkspaceXmlAnonTest class Drupal\Tests\workspaces\Functional\Rest core/modules/workspaces/tests/src/Functional/Rest/WorkspaceXmlAnonTest.php Test workspace entities for unauthenticated XML requests.
WorkspaceViewTest class Drupal\Tests\workspaces\Functional core/modules/workspaces/tests/src/Functional/WorkspaceViewTest.php Tests permission controls on workspaces.
WorkspaceViewBuilder class Drupal\workspaces core/modules/workspaces/src/WorkspaceViewBuilder.php Provides a Workspace view builder.
WorkspaceToolbarIntegrationTest class Drupal\Tests\workspaces\FunctionalJavascript core/modules/workspaces/tests/src/FunctionalJavascript/WorkspaceToolbarIntegrationTest.php Tests workspace settings stray integration.
WorkspaceTestUtilities trait Drupal\Tests\workspaces\Functional core/modules/workspaces/tests/src/Functional/WorkspaceTestUtilities.php Utility methods for use in BrowserTestBase tests. 1
WorkspaceTestTrait trait Drupal\Tests\workspaces\Kernel core/modules/workspaces/tests/src/Kernel/WorkspaceTestTrait.php A trait with common workspaces testing functionality. 1
WorkspaceTest class Drupal\Tests\jsonapi\Functional core/modules/jsonapi/tests/src/Functional/WorkspaceTest.php JSON:API integration test for the "Workspace" content entity type.
WorkspaceTest class Drupal\Tests\workspaces\Functional core/modules/workspaces/tests/src/Functional/WorkspaceTest.php Test the workspace entity.
WorkspaceSwitcherTest class Drupal\Tests\workspaces\Functional core/modules/workspaces/tests/src/Functional/WorkspaceSwitcherTest.php Tests workspace switching functionality.
WorkspaceSwitcherForm class Drupal\workspaces\Form core/modules/workspaces/src/Form/WorkspaceSwitcherForm.php Provides a form that activates a different workspace.
WorkspacesUninstallTest class Drupal\Tests\workspaces\Functional core/modules/workspaces/tests/src/Functional/WorkspacesUninstallTest.php Tests uninstalling the Workspaces module.
WorkspacesServiceProvider class Drupal\workspaces core/modules/workspaces/src/WorkspacesServiceProvider.php Defines a service provider for the Workspaces module.
WorkspacesContentModerationStateTest class Drupal\Tests\content_moderation\Kernel core/modules/content_moderation/tests/src/Kernel/WorkspacesContentModerationStateTest.php Tests that Workspaces and Content Moderation work together properly.
WorkspacesAliasRepository class Drupal\workspaces core/modules/workspaces/src/WorkspacesAliasRepository.php Provides workspace-specific path alias lookup queries.

Pages

Other projects