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
ShortcutSetUsersTest class Drupal\Tests\shortcut\Kernel\Plugin\migrate\source\d7 core/modules/shortcut/tests/src/Kernel/Plugin/migrate/source/d7/ShortcutSetUsersTest.php Tests D7 ShortcutSetUsers source plugin.
ShortcutSetValidationTest class Drupal\Tests\shortcut\Kernel core/modules/shortcut/tests/src/Kernel/ShortcutSetValidationTest.php Tests validation of shortcut_set entities.
ShortcutSetXmlAnonTest class Drupal\Tests\shortcut\Functional\Rest core/modules/shortcut/tests/src/Functional/Rest/ShortcutSetXmlAnonTest.php Tests Shortcut Set Xml Anon.
ShortcutSetXmlBasicAuthTest class Drupal\Tests\shortcut\Functional\Rest core/modules/shortcut/tests/src/Functional/Rest/ShortcutSetXmlBasicAuthTest.php Tests Shortcut Set Xml Basic Auth.
ShortcutSetXmlCookieTest class Drupal\Tests\shortcut\Functional\Rest core/modules/shortcut/tests/src/Functional/Rest/ShortcutSetXmlCookieTest.php Tests Shortcut Set Xml Cookie.
ShortcutTest class Drupal\Tests\shortcut\Kernel\Plugin\migrate\source\d7 core/modules/shortcut/tests/src/Kernel/Plugin/migrate/source/d7/ShortcutTest.php Tests D7 Shortcut source plugin.
ShortcutTest class Drupal\Tests\jsonapi\Functional core/modules/jsonapi/tests/src/Functional/ShortcutTest.php JSON:API integration test for the "Shortcut" content entity type.
ShortcutTest class Drupal\Tests\shortcut\Functional\Jsonapi core/modules/shortcut/tests/src/Functional/Jsonapi/ShortcutTest.php JSON:API integration test for the "Shortcut" content entity type.
ShortcutTestBase abstract class Drupal\Tests\shortcut\Functional core/modules/shortcut/tests/src/Functional/ShortcutTestBase.php Defines base class for shortcut test cases. 2
ShortcutThemeHooks class Drupal\shortcut\Hook core/modules/shortcut/src/Hook/ShortcutThemeHooks.php Hook implementations for shortcut.
ShortcutTranslationUITest class Drupal\Tests\shortcut\Functional core/modules/shortcut/tests/src/Functional/ShortcutTranslationUITest.php Tests the shortcut translation UI.
ShortcutXmlAnonTest class Drupal\Tests\shortcut\Functional\Rest core/modules/shortcut/tests/src/Functional/Rest/ShortcutXmlAnonTest.php Tests Shortcut Xml Anon.
ShortcutXmlBasicAuthTest class Drupal\Tests\shortcut\Functional\Rest core/modules/shortcut/tests/src/Functional/Rest/ShortcutXmlBasicAuthTest.php Tests Shortcut Xml Basic Auth.
ShortcutXmlCookieTest class Drupal\Tests\shortcut\Functional\Rest core/modules/shortcut/tests/src/Functional/Rest/ShortcutXmlCookieTest.php Tests Shortcut Xml Cookie.
ShowButtonsCommand class Drupal\views\Ajax core/modules/views/src/Ajax/ShowButtonsCommand.php Provides an AJAX command for showing the save and cancel buttons. 1
ShutdownFunctionsTest class Drupal\Tests\system\Functional\System core/modules/system/tests/src/Functional/System/ShutdownFunctionsTest.php Functional tests shutdown functions.
ShutdownFunctionTest class Drupal\KernelTests\Core\Bootstrap core/tests/Drupal/KernelTests/Core/Bootstrap/ShutdownFunctionTest.php Tests.
SimpleAnnotationReader final class Drupal\Component\Annotation\Doctrine core/lib/Drupal/Component/Annotation/Doctrine/SimpleAnnotationReader.php Simple Annotation Reader. 3
SimpleConfigSectionListTest class Drupal\Tests\layout_builder\Kernel core/modules/layout_builder/tests/src/Kernel/SimpleConfigSectionListTest.php Tests the test implementation of section storage.
SimpleConfigSectionStorage class Drupal\layout_builder_test\Plugin\SectionStorage core/modules/layout_builder/tests/modules/layout_builder_test/src/Plugin/SectionStorage/SimpleConfigSectionStorage.php Provides section storage utilizing simple config. 1
SimpleConfigUpdate final class Drupal\Core\Config\Action\Plugin\ConfigAction core/lib/Drupal/Core/Config/Action/Plugin/ConfigAction/SimpleConfigUpdate.php @internal This API is experimental.
SimpleConfigValidationTest class Drupal\KernelTests\Core\Config core/tests/Drupal/KernelTests/Core/Config/SimpleConfigValidationTest.php Tests validation of certain elements common to all config.
SimplePageVariant class Drupal\Core\Render\Plugin\DisplayVariant core/lib/Drupal/Core/Render/Plugin/DisplayVariant/SimplePageVariant.php Provides a page display variant that simply renders the main content. 1
SimplePageVariantTest class Drupal\Tests\Core\Render\Plugin\DisplayVariant core/tests/Drupal/Tests/Core/Render/Plugin/DisplayVariant/SimplePageVariantTest.php Tests Drupal\Core\Render\Plugin\DisplayVariant\SimplePageVariant.
SimpleSource class Drupal\migrate_plugin_config_test\Plugin\migrate\source core/modules/migrate/tests/modules/migrate_plugin_config_test/src/Plugin/migrate/source/SimpleSource.php Simple source for testing changing configuration.
SimpletestTestRunResultsStorage class Drupal\Core\Test core/lib/Drupal/Core/Test/SimpletestTestRunResultsStorage.php Implements a test run results storage compatible with legacy Simpletest. 3
SimpletestTestRunResultsStorageTest class Drupal\KernelTests\Core\Test core/tests/Drupal/KernelTests/Core/Test/SimpletestTestRunResultsStorageTest.php Tests Drupal\Core\Test\SimpletestTestRunResultsStorage.
SingleFlushStrategy class Drupal\Core\Render\Placeholder core/lib/Drupal/Core/Render/Placeholder/SingleFlushStrategy.php Defines the 'single_flush' placeholder strategy. 2
SingleInternalPropertyTestFieldItem class Drupal\entity_test\Plugin\Field\FieldType core/modules/system/tests/modules/entity_test/src/Plugin/Field/FieldType/SingleInternalPropertyTestFieldItem.php Defines the 'Single Internal Property' entity test field type.
SingleVisibleProfileTest class Drupal\FunctionalTests\Installer core/tests/Drupal/FunctionalTests/Installer/SingleVisibleProfileTest.php Tests distribution profile support.
SiteCacheContext class Drupal\Core\Cache\Context core/lib/Drupal/Core/Cache/Context/SiteCacheContext.php Defines the SiteCacheContext service, for "per site" caching. 2
SiteConfigurationExcluder class Drupal\package_manager\PathExcluder core/modules/package_manager/src/PathExcluder/SiteConfigurationExcluder.php Excludes site configuration files from stage directories. 1 1
SiteConfigurationExcluderTest class Drupal\Tests\package_manager\Kernel\PathExcluder core/modules/package_manager/tests/src/Kernel/PathExcluder/SiteConfigurationExcluderTest.php Tests Site Configuration Excluder.
SiteConfigureForm class Drupal\Core\Installer\Form core/lib/Drupal/Core/Installer/Form/SiteConfigureForm.php Provides the site configuration form.
SiteFilesExcluder final class Drupal\package_manager\PathExcluder core/modules/package_manager/src/PathExcluder/SiteFilesExcluder.php Excludes site files from stage operations. 1
SiteFilesExcluderTest class Drupal\Tests\package_manager\Kernel\PathExcluder core/modules/package_manager/tests/src/Kernel/PathExcluder/SiteFilesExcluderTest.php Tests Site Files Excluder.
SiteInformationForm class Drupal\system\Form core/modules/system/src/Form/SiteInformationForm.php Configure site information settings for this site. 1
SiteMaintenanceModeForm class Drupal\system\Form core/modules/system/src/Form/SiteMaintenanceModeForm.php Configure maintenance settings for this site. 1
SiteMaintenanceTest class Drupal\Tests\system\Functional\System core/modules/system/tests/src/Functional/System/SiteMaintenanceTest.php Tests access to site while in maintenance mode.
SiteNameTest class Drupal\FunctionalTests\Installer core/tests/Drupal/FunctionalTests/Installer/SiteNameTest.php Tests that the site name can be set during a non-interactive installation.
SitesDirectoryHardeningTest class Drupal\Tests\system\Functional\System core/modules/system/tests/src/Functional/System/SitesDirectoryHardeningTest.php Tests Drupal permissions hardening of /sites subdirectories.
SiteSettingsForm class Drupal\Core\Installer\Form core/lib/Drupal/Core/Installer/Form/SiteSettingsForm.php Provides a form to configure and rewrite settings.php. 1 2
SiteSettingsFormTest class Drupal\FunctionalTests\Installer core/tests/Drupal/FunctionalTests/Installer/SiteSettingsFormTest.php Tests the extension of the site settings form.
SkipOnEmpty class Drupal\migrate\Plugin\migrate\process core/modules/migrate/src/Plugin/migrate/process/SkipOnEmpty.php Skips processing the current row when the input value is empty. 1
SkipOnEmptyTest class Drupal\Tests\migrate\Unit\process core/modules/migrate/tests/src/Unit/process/SkipOnEmptyTest.php Tests the skip on empty process plugin.
SkipOp class Drupal\Composer\Plugin\Scaffold\Operations composer/Plugin/Scaffold/Operations/SkipOp.php Scaffold operation to skip a scaffold file (do nothing). 2
SkipOpTest class Drupal\Tests\Composer\Plugin\Scaffold\Integration core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Integration/SkipOpTest.php Tests Drupal\Composer\Plugin\Scaffold\Operations\SkipOp.
SkippablePathBasedBreadcrumbBuilder class Drupal\menu_test core/modules/system/tests/modules/menu_test/src/SkippablePathBasedBreadcrumbBuilder.php A path-based breadcrumb builder can be skipped from applying.
SkipProceduralHooks class Drupal\hook_collector_skip_procedural\Hook core/modules/system/tests/modules/hook_collector_skip_procedural/src/Hook/SkipProceduralHooks.php Hook implementations for hook_collector_skip_procedural.
SkipRowIfNotSet class Drupal\migrate\Plugin\migrate\process core/modules/migrate/src/Plugin/migrate/process/SkipRowIfNotSet.php Skips processing the current row when a source value is not set. 1

Other projects


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