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
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. 1
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.
SchemaConfigListenerTest class Drupal\FunctionalTests\Core\Config core/tests/Drupal/FunctionalTests/Core/Config/SchemaConfigListenerTest.php Tests the functionality of ConfigSchemaChecker in BrowserTestBase tests.
SchemaConfigListenerTestTrait trait Drupal\Tests\Traits\Core\Config core/tests/Drupal/Tests/Traits/Core/Config/SchemaConfigListenerTestTrait.php Adds a test for the configuration schema checker use in tests. 2
SchemaConfigListenerWebTest class Drupal\Tests\config\Functional core/modules/config/tests/src/Functional/SchemaConfigListenerWebTest.php Tests the functionality of ConfigSchemaChecker in BrowserTestBase tests.
SchemaException class Drupal\Core\Database core/lib/Drupal/Core/Database/SchemaException.php Base exception for Schema-related errors. 5 7
SchemaIncompleteException class Drupal\Core\Config\Schema core/lib/Drupal/Core/Config/Schema/SchemaIncompleteException.php An exception thrown when a config schema is incomplete. 10
SchemaInspector class Drupal\TestTools\Extension core/tests/Drupal/TestTools/Extension/SchemaInspector.php Provides methods to access modules' schema. 2
SchemaIntrospectionTestTrait trait Drupal\Tests\Core\Database core/tests/Drupal/Tests/Core/Database/SchemaIntrospectionTestTrait.php Provides methods for testing database schema characteristics. 1
SchemaListenerController class Drupal\config_test core/modules/config/tests/config_test/src/SchemaListenerController.php Controller for testing \Drupal\Core\Config\Development\ConfigSchemaChecker.
SchemaObjectDoesNotExistException class Drupal\Core\Database core/lib/Drupal/Core/Database/SchemaObjectDoesNotExistException.php Exception thrown if an object being modified doesn't exist yet. 4
SchemaObjectExistsException class Drupal\Core\Database core/lib/Drupal/Core/Database/SchemaObjectExistsException.php Exception thrown if an object being created already exists. 5
SchemaPrimaryKeyMustBeDroppedException class Drupal\Core\Database\Exception core/lib/Drupal/Core/Database/Exception/SchemaPrimaryKeyMustBeDroppedException.php Exception thrown if the Primary Key must be dropped before an operation. 2
SchemaTableColumnSizeTooLargeException class Drupal\Core\Database\Exception core/lib/Drupal/Core/Database/Exception/SchemaTableColumnSizeTooLargeException.php Exception thrown if a column size is too large on table creation. 3
SchemaTableKeyTooLargeException class Drupal\Core\Database\Exception core/lib/Drupal/Core/Database/Exception/SchemaTableKeyTooLargeException.php Exception thrown if a key is too large. 3
SchemaTest class Drupal\Tests\mysql\Kernel\mysql core/modules/mysql/tests/src/Kernel/mysql/SchemaTest.php Tests schema API for the MySQL driver. 1 1
SchemaTest class Drupal\Tests\sqlite\Kernel\sqlite core/modules/sqlite/tests/src/Kernel/sqlite/SchemaTest.php Tests schema API for the SQLite driver.

Other projects


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