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
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
SkipRowIfNotSetTest class Drupal\Tests\migrate\Unit\process core/modules/migrate/tests/src/Unit/process/SkipRowIfNotSetTest.php Tests the skip row if not set process plugin.
SmartDefaultSettings final class Drupal\ckeditor5 core/modules/ckeditor5/src/SmartDefaultSettings.php Generates CKEditor 5 settings for existing text editors/formats. 3 2
SmartDefaultSettingsTest class Drupal\Tests\ckeditor5\Unit core/modules/ckeditor5/tests/src/Unit/SmartDefaultSettingsTest.php Tests Drupal\ckeditor5\SmartDefaultSettings.
SmartDefaultSettingsTest class Drupal\Tests\ckeditor5\Kernel core/modules/ckeditor5/tests/src/Kernel/SmartDefaultSettingsTest.php Tests Smart Default Settings.
SneakySuperset class Drupal\ckeditor5_plugin_elements_subset\Plugin\CKEditor5Plugin core/modules/ckeditor5/tests/modules/ckeditor5_plugin_elements_subset/src/Plugin/CKEditor5Plugin/SneakySuperset.php Provides a plugin for testing CKEditor. 1
Some class Drupal\views\Plugin\views\pager core/modules/views/src/Plugin/views/pager/Some.php Plugin for views without pagers.
SomeAnnotationClassNameWithoutConstructor class Drupal\Tests\Component\Annotation\Doctrine core/tests/Drupal/Tests/Component/Annotation/Doctrine/DocParserTest.php
SomeAnnotationClassNameWithoutConstructorAndProperties class Drupal\Tests\Component\Annotation\Doctrine core/tests/Drupal/Tests/Component/Annotation/Doctrine/DocParserTest.php
SomeAnnotationWithConstructorWithoutParams class Drupal\Tests\Component\Annotation\Doctrine core/tests/Drupal/Tests/Component/Annotation/Doctrine/DocParserTest.php
SomeClass class Drupal\module_autoload_test core/modules/system/tests/modules/module_autoload_test/src/SomeClass.php Class for testing module autoloading. 3
Sort class Drupal\jsonapi\Query core/modules/jsonapi/src/Query/Sort.php Gathers information about the sort parameter. 2
SortableTestTrait trait Drupal\FunctionalJavascriptTests core/tests/Drupal/FunctionalJavascriptTests/SortableTestTrait.php Provides functions for simulating sort changes. 2
SortArray class Drupal\Component\Utility core/lib/Drupal/Component/Utility/SortArray.php Provides generic array sorting helper methods. 15
SortArrayTest class Drupal\Tests\Component\Utility core/tests/Drupal/Tests/Component/Utility/SortArrayTest.php Tests the SortArray component.
SortDateTest class Drupal\Tests\views\Kernel\Handler core/modules/views/tests/src/Kernel/Handler/SortDateTest.php Tests for core Drupal\views\Plugin\views\sort\Date handler.
SortDateTimeTest class Drupal\Tests\datetime\Kernel\Views core/modules/datetime/tests/src/Kernel/Views/SortDateTimeTest.php Tests for core Drupal\datetime\Plugin\views\sort\Date handler.
SortingTest class Drupal\Tests\views\Functional\Wizard core/modules/views/tests/src/Functional/Wizard/SortingTest.php Tests the ability of the views wizard to create views with sorts.
SortPluginBase abstract class Drupal\views\Plugin\views\sort core/modules/views/src/Plugin/views/sort/SortPluginBase.php Base sort handler that has no options and performs a simple sort. 9 4
SortRandomTest class Drupal\Tests\views\Kernel\Handler core/modules/views/tests/src/Kernel/Handler/SortRandomTest.php Tests for core Drupal\views\Plugin\views\sort\Random handler.
SortTest class Drupal\Tests\views\Kernel\Handler core/modules/views/tests/src/Kernel/Handler/SortTest.php Tests for core Drupal\views\Plugin\views\sort\SortPluginBase handler.

Other projects


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