Classes, traits, and interfaces - main - drupal

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 1529

Name Deprecated Object type Namespace File name Summary Direct uses Use statements Strings
RsyncValidatorTest class Drupal\Tests\package_manager\Kernel core/modules/package_manager/tests/src/Kernel/RsyncValidatorTest.php Tests Rsync Validator.
RunnerVersion final class Drupal\TestTools\PhpUnitCompatibility core/tests/Drupal/TestTools/PhpUnitCompatibility/RunnerVersion.php Helper class to determine information about running PHPUnit version. 1
RunTimeRequirementsTest class Drupal\Tests\system\Kernel\System core/modules/system/tests/src/Kernel/System/RunTimeRequirementsTest.php Tests the effectiveness of hook_runtime_requirements().
SafeMarkupTestMarkup class Drupal\KernelTests\Core\Theme core/tests/Drupal/KernelTests/Core/Theme/TwigMarkupInterfaceTest.php Implements MarkupInterface without implementing \Countable.
SameModuleChild class Drupal\drupal_debug_test_core core/tests/fixtures/TestTools/drupal_debug_classloader_test_classes.php Fixture: child in the same module as the parent.
SampleEntityGeneratorInterface interface Drupal\layout_builder\Entity core/modules/layout_builder/src/Entity/SampleEntityGeneratorInterface.php Generates a sample entity. 1 2
SandboxDatabaseUpdatesValidator class Drupal\package_manager\Validator core/modules/package_manager/src/Validator/SandboxDatabaseUpdatesValidator.php Flags a warning if there are database updates in a staged update. 1 3
SandboxDirectoryValidator final class Drupal\package_manager\Validator core/modules/package_manager/src/Validator/SandboxDirectoryValidator.php Validates staging root is not a subdirectory of active. 1
SandboxDirectoryValidatorTest class Drupal\Tests\package_manager\Unit core/modules/package_manager/tests/src/Unit/SandboxDirectoryValidatorTest.php Tests Drupal\package_manager\Validator\SandboxDirectoryValidator.
SandboxEvent abstract class Drupal\package_manager\Event core/modules/package_manager/src/Event/SandboxEvent.php Base class for all events related to the life cycle of the stage. 5 8
SandboxEventException class Drupal\package_manager\Exception core/modules/package_manager/src/Exception/SandboxEventException.php Exception thrown if an error related to an event occurs. 12
SandboxException class Drupal\package_manager\Exception core/modules/package_manager/src/Exception/SandboxException.php Base class for all exceptions related to stage operations. 3 6
SandboxManagerBase abstract class Drupal\package_manager core/modules/package_manager/src/SandboxManagerBase.php Creates and manages a stage directory in which to install or update code. 3 18
SandboxManagerBaseTest class Drupal\Tests\package_manager\Unit core/modules/package_manager/tests/src/Unit/SandboxManagerBaseTest.php Tests Drupal\package_manager\SandboxManagerBase.
SandboxManagerBaseTest class Drupal\Tests\package_manager\Kernel core/modules/package_manager/tests/src/Kernel/SandboxManagerBaseTest.php Tests Drupal\package_manager\SandboxManagerBase.
SandboxOwnershipException final class Drupal\package_manager\Exception core/modules/package_manager/src/Exception/SandboxOwnershipException.php Exception thrown if a stage encounters an ownership or locking error. 2
SandboxValidationEvent abstract class Drupal\package_manager\Event core/modules/package_manager/src/Event/SandboxValidationEvent.php Base class for events dispatched before a stage life cycle operation. 4 23
SanitizeNameTest class Drupal\Tests\file\Unit core/modules/file/tests/src/Unit/SanitizeNameTest.php Filename sanitization tests.
SaveAction class Drupal\Core\Action\Plugin\Action core/lib/Drupal/Core/Action/Plugin/Action/SaveAction.php Provides an action that can save any entity.
SaveActionTest class Drupal\KernelTests\Core\Action core/tests/Drupal/KernelTests/Core/Action/SaveActionTest.php Tests Save Action.
SaveEntity class Drupal\action_test\Plugin\Action core/modules/system/tests/modules/action_test/src/Plugin/Action/SaveEntity.php Provides an operation to save user entities.
SaveTest class Drupal\Tests\file\Kernel core/modules/file/tests/src/Kernel/SaveTest.php File saving tests.
SaveUploadFormTest class Drupal\Tests\file\Functional core/modules/file/tests/src/Functional/SaveUploadFormTest.php Tests the _file_save_upload_from_form() function.
SaveUploadTest class Drupal\Tests\file\Functional core/modules/file/tests/src/Functional/SaveUploadTest.php Tests the file_save_upload() function. 1
ScaffoldFileCollection class Drupal\Composer\Plugin\Scaffold\Operations composer/Plugin/Scaffold/Operations/ScaffoldFileCollection.php Collection of scaffold files. 2
ScaffoldFileCollectionTest class Drupal\Tests\Composer\Plugin\Scaffold\Integration core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Integration/ScaffoldFileCollectionTest.php Tests Drupal\Composer\Plugin\Scaffold\Operations\ScaffoldFileCollection.
ScaffoldFileInfo class Drupal\Composer\Plugin\Scaffold composer/Plugin/Scaffold/ScaffoldFileInfo.php Data object that keeps track of one scaffold file. 1
ScaffoldFilePath class Drupal\Composer\Plugin\Scaffold composer/Plugin/Scaffold/ScaffoldFilePath.php Manage the path to a file to scaffold. 9
ScaffoldOptions class Drupal\Composer\Plugin\Scaffold composer/Plugin/Scaffold/ScaffoldOptions.php Per-project options from the 'extras' section of the composer.json file. 8
ScaffoldResult class Drupal\Composer\Plugin\Scaffold\Operations composer/Plugin/Scaffold/Operations/ScaffoldResult.php Record the result of a scaffold operation. 2
ScaffoldTest class Drupal\Tests\Composer\Plugin\Scaffold\Functional core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ScaffoldTest.php Tests Composer Scaffold.
ScaffoldTestResult class Drupal\Tests\Composer\Plugin\Scaffold core/tests/Drupal/Tests/Composer/Plugin/Scaffold/ScaffoldTestResult.php Holds result of a scaffold test. 1
ScaffoldUpgradeTest class Drupal\Tests\Composer\Plugin\Scaffold\Functional core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ScaffoldUpgradeTest.php Tests Upgrading the Composer Scaffold plugin.
Scale class Drupal\system\Plugin\ImageToolkit\Operation\gd core/modules/system/src/Plugin/ImageToolkit/Operation/gd/Scale.php Defines GD2 Scale operation.
ScaleAndCrop class Drupal\system\Plugin\ImageToolkit\Operation\gd core/modules/system/src/Plugin/ImageToolkit/Operation/gd/ScaleAndCrop.php Defines GD2 Scale and crop operation.
ScaleAndCropImageEffect class Drupal\image\Plugin\ImageEffect core/modules/image/src/Plugin/ImageEffect/ScaleAndCropImageEffect.php Scales and crops an image resource.
ScaleImageEffect class Drupal\image\Plugin\ImageEffect core/modules/image/src/Plugin/ImageEffect/ScaleImageEffect.php Scales an image resource.
ScanDirectoryTest class Drupal\KernelTests\Core\File core/tests/Drupal/KernelTests/Core/File/ScanDirectoryTest.php Tests \Drupal\Core\File\FileSystem::scanDirectory. 1
Schema class Drupal\Tests\Core\Database\Stub\Driver core/tests/Drupal/Tests/Core/Database/Stub/Driver/Schema.php A very minimal class for testing purposes. 1
Schema class Drupal\pgsql\Driver\Database\pgsql core/modules/pgsql/src/Driver/Database/pgsql/Schema.php PostgreSQL implementation of \Drupal\Core\Database\Schema. 3
Schema class Drupal\core_fake\Driver\Database\CoreFakeWithAllCustomClasses core/tests/fixtures/database_drivers/module/core_fake/src/Driver/Database/CoreFakeWithAllCustomClasses/Schema.php CoreFakeWithAllCustomClasses implementation of \Drupal\Core\Database\Schema.
Schema class Drupal\sqlite\Driver\Database\sqlite core/modules/sqlite/src/Driver/Database/sqlite/Schema.php SQLite implementation of \Drupal\Core\Database\Schema. 1
Schema class Drupal\mysql\Driver\Database\mysql core/modules/mysql/src/Driver/Database/mysql/Schema.php MySQL implementation of \Drupal\Core\Database\Schema. 1
Schema abstract class Drupal\Core\Database core/lib/Drupal/Core/Database/Schema.php Provides a base implementation for Database Schema. 4 7
SchemaCheckTestTrait trait Drupal\Tests core/tests/Drupal/Tests/SchemaCheckTestTrait.php Provides a class for checking configuration schema. 38
SchemaCheckTrait trait Drupal\Core\Config\Schema core/lib/Drupal/Core/Config/Schema/SchemaCheckTrait.php Provides a trait for checking configuration schema. 4
SchemaCheckTraitTest class Drupal\KernelTests\Core\Config core/tests/Drupal/KernelTests/Core/Config/SchemaCheckTraitTest.php Tests the functionality of SchemaCheckTrait.
SchemaCompatibilityChecker class Drupal\Core\Theme\Component core/lib/Drupal/Core/Theme/Component/SchemaCompatibilityChecker.php Checks whether two schemas are compatible. 2
SchemaCompatibilityCheckerTest class Drupal\Tests\Core\Theme\Component core/tests/Drupal/Tests/Core/Theme/Component/SchemaCompatibilityCheckerTest.php Tests Drupal\Core\Theme\Component\SchemaCompatibilityChecker.
SchemaConfigListenerTest class Drupal\KernelTests\Core\Config core/tests/Drupal/KernelTests/Core/Config/SchemaConfigListenerTest.php Tests the functionality of ConfigSchemaChecker in KernelTestBase tests.

Other projects


Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.