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
SqlQueryTest class Drupal\Tests\views\Kernel\Plugin core/modules/views/tests/src/Kernel/Plugin/SqlQueryTest.php Tests the sql query plugin.
SqlTest class Drupal\Tests\migrate\Kernel\Plugin\id_map core/modules/migrate/tests/src/Kernel/Plugin/id_map/SqlTest.php Tests that the migrate map table is created.
SqlTest class Drupal\Tests\views\Unit\Plugin\query core/modules/views/tests/src/Unit/Plugin/query/SqlTest.php Tests Drupal\views\Plugin\views\query\Sql.
Stable9Hooks class Drupal\stable9\Hook core/themes/stable9/src/Hook/Stable9Hooks.php Hook implementations for stable9.
Stable9LibraryOverrideTest class Drupal\Tests\stable9\Kernel core/themes/stable9/tests/Kernel/Stable9LibraryOverrideTest.php Tests Stable 9's library overrides.
Stable9LibraryOverrideTest class Drupal\KernelTests\Core\Theme core/tests/Drupal/KernelTests/Core/Theme/Stable9LibraryOverrideTest.php Tests Stable 9's library overrides.
Stable9TemplateOverrideTest class Drupal\KernelTests\Core\Theme core/tests/Drupal/KernelTests/Core/Theme/Stable9TemplateOverrideTest.php Tests Stable 9's template overrides.
Stable9TemplateOverrideTest class Drupal\Tests\stable9\Kernel core/themes/stable9/tests/Kernel/Stable9TemplateOverrideTest.php Tests Stable 9's template overrides.
StableLibraryOverrideTestBase abstract class Drupal\KernelTests\Core\Theme core/tests/Drupal/KernelTests/Core/Theme/StableLibraryOverrideTestBase.php Tests the behavior of a theme when base_theme info key is missing. 2 1
StackedHttpKernel class Drupal\Core\StackMiddleware core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php Provides a stacked HTTP kernel. 3 2
StackedHttpKernelTest class Drupal\Tests\Core\StackMiddleware core/tests/Drupal/Tests/Core/StackMiddleware/StackedHttpKernelTest.php Tests Drupal\Core\StackMiddleware\StackedHttpKernel.
StackedKernelPass class Drupal\Core\DependencyInjection\Compiler core/lib/Drupal/Core/DependencyInjection/Compiler/StackedKernelPass.php Provides a compiler pass for stacked HTTP kernels. 2
StackedKernelPassTest class Drupal\Tests\Core\DependencyInjection\Compiler core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/StackedKernelPassTest.php Tests Drupal\Core\DependencyInjection\Compiler\StackedKernelPass.
StackedRouteMatchInterface interface Drupal\Core\Routing core/lib/Drupal/Core/Routing/StackedRouteMatchInterface.php Defines an interface for a stack of route matches. 1 3
StackedSessionHandlerPass class Drupal\Core\DependencyInjection\Compiler core/lib/Drupal/Core/DependencyInjection/Compiler/StackedSessionHandlerPass.php Provides a compiler pass for stacked session save handlers. 1
StackItem final class Drupal\Core\Database\Transaction core/lib/Drupal/Core/Database/Transaction/StackItem.php A value object for items on the transaction stack. 2
StackKernelIntegrationTest class Drupal\KernelTests\Core\HttpKernel core/tests/Drupal/KernelTests/Core/HttpKernel/StackKernelIntegrationTest.php Tests the stacked kernel functionality.
StackSessionHandlerIntegrationTest class Drupal\Tests\system\Functional\Session core/modules/system/tests/src/Functional/Session/StackSessionHandlerIntegrationTest.php Tests the stacked session handler functionality.
StageCommitExceptionTest class Drupal\Tests\package_manager\Kernel core/modules/package_manager/tests/src/Kernel/StageCommitExceptionTest.php Tests Drupal\package_manager\SandboxManagerBase.
StageConflictTest class Drupal\Tests\package_manager\Kernel core/modules/package_manager/tests/src/Kernel/StageConflictTest.php Tests Drupal\package_manager\SandboxManagerBase.
StagedDBUpdateValidatorTest class Drupal\Tests\package_manager\Kernel core/modules/package_manager/tests/src/Kernel/StagedDBUpdateValidatorTest.php Tests Staged DBUpdate Validator.
StageEventsTest class Drupal\Tests\package_manager\Kernel core/modules/package_manager/tests/src/Kernel/StageEventsTest.php Tests that the stage fires events during its lifecycle.
StageFixtureManipulator final class Drupal\fixture_manipulator core/modules/package_manager/tests/modules/fixture_manipulator/src/StageFixtureManipulator.php A fixture manipulator service that commits changes after begin. 2
StageLoggedOnErrorTest class Drupal\Tests\package_manager\Kernel core/modules/package_manager/tests/src/Kernel/StageLoggedOnErrorTest.php Tests Drupal\package_manager\SandboxManagerBase.
StageOwnershipTest class Drupal\Tests\package_manager\Kernel core/modules/package_manager/tests/src/Kernel/StageOwnershipTest.php Tests that ownership of the stage is enforced.
Standard class Drupal\views\Plugin\views\join core/modules/views/src/Plugin/views/join/Standard.php Default implementation of the join plugin.
Standard class Drupal\views\Plugin\views\sort core/modules/views/src/Plugin/views/sort/Standard.php Default implementation of the base sort plugin.
Standard class Drupal\views\Plugin\views\field core/modules/views/src/Plugin/views/field/Standard.php Default implementation of the base field plugin.
Standard class Drupal\views\Plugin\views\relationship core/modules/views/src/Plugin/views/relationship/Standard.php Default implementation of the base relationship plugin.
Standard class Drupal\views\Plugin\views\filter core/modules/views/src/Plugin/views/filter/Standard.php Default implementation of the base filter plugin. 1
Standard class Drupal\views\Plugin\views\wizard core/modules/views/src/Plugin/views/wizard/Standard.php Standard Views wizard plugin.
Standard class Drupal\views\Plugin\views\argument core/modules/views/src/Plugin/views/argument/Standard.php Default implementation of the base argument plugin.
Standard class Drupal\editor\EditorXssFilter core/modules/editor/src/EditorXssFilter/Standard.php Defines the standard text editor XSS filter. 3
StandardInstallerTest class Drupal\FunctionalTests\Installer core/tests/Drupal/FunctionalTests/Installer/StandardInstallerTest.php Tests the interactive installer installing the standard profile.
StandardJavascriptTest class Drupal\Tests\standard\FunctionalJavascript core/profiles/standard/tests/src/FunctionalJavascript/StandardJavascriptTest.php Tests Standard installation profile JavaScript expectations.
StandardPerformanceTest class Drupal\Tests\standard\FunctionalJavascript core/profiles/standard/tests/src/FunctionalJavascript/StandardPerformanceTest.php Tests the performance of basic functionality in the standard profile.
StandardRecipeInstallTest class Drupal\FunctionalTests\Core\Recipe core/tests/Drupal/FunctionalTests/Core/Recipe/StandardRecipeInstallTest.php Tests installing the Standard recipe via the installer.
StandardRecipeTest class Drupal\FunctionalTests\Core\Recipe core/tests/Drupal/FunctionalTests/Core/Recipe/StandardRecipeTest.php Tests Standard recipe installation expectations.
StandardTest class Drupal\Tests\editor\Unit\EditorXssFilter core/modules/editor/tests/src/Unit/EditorXssFilter/StandardTest.php Tests Drupal\editor\EditorXssFilter\Standard.
StandardTest class Drupal\Tests\standard\Functional core/profiles/standard/tests/src/Functional/StandardTest.php Tests Standard installation profile expectations. 1 1
StandardTestTrait trait Drupal\Tests\standard\Traits core/profiles/standard/tests/src/Traits/StandardTestTrait.php Provides a test method to test the Standard installation profile or recipe. 2
StarterKit final class Drupal\starterkit_theme core/themes/starterkit_theme/src/StarterKit.php Interacts with theme generation.
StarterKitInterface interface Drupal\Core\Theme core/lib/Drupal/Core/Theme/StarterKitInterface.php Allows starter kits to interact with theme generation. 1 2
StarterkitThemeHooks class Drupal\starterkit_theme\Hook core/themes/starterkit_theme/src/Hook/StarterkitThemeHooks.php Hook implementations for starterkit_theme.
State class Drupal\Core\State core/lib/Drupal/Core/State/State.php Provides the state system using a key value store. 8 2
State class Drupal\workflows core/modules/workflows/src/State.php A value object representing a workflow state. 9
StateFileExistsTest class Drupal\Tests\migrate_drupal\Kernel core/modules/migrate_drupal/tests/src/Kernel/StateFileExistsTest.php Tests that core modules have a migrate_drupal.yml file as needed.
StateFormatterTest class Drupal\Tests\content_moderation\Kernel core/modules/content_moderation/tests/src/Kernel/StateFormatterTest.php Test the state field formatter.
StateInterface interface Drupal\Core\State core/lib/Drupal/Core/State/StateInterface.php Defines the interface for the state system. 1 107
StateInterface interface Drupal\workflows core/modules/workflows/src/StateInterface.php An interface for state value objects. 2 9

Other projects


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