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
SvgIconBuilder class Drupal\Core\Layout\Icon core/lib/Drupal/Core/Layout/Icon/SvgIconBuilder.php Builds SVG layout icons. 1 2
SvgSpriteExtractor class Drupal\Core\Theme\Plugin\IconExtractor core/lib/Drupal/Core/Theme/Plugin/IconExtractor/SvgSpriteExtractor.php Plugin implementation of the icon_extractor. 1
SvgSpriteExtractorTest class Drupal\Tests\Core\Theme\Icon\Plugin core/tests/Drupal/Tests/Core/Theme/Icon/Plugin/SvgSpriteExtractorTest.php Tests Drupal\Core\Theme\Plugin\IconExtractor\SvgSpriteExtractor.
SwitchShortcutSet class Drupal\shortcut\Form core/modules/shortcut/src/Form/SwitchShortcutSet.php Builds the shortcut set switch form. 1
SwitchToLiveForm class Drupal\workspaces_ui\Form core/modules/workspaces_ui/src/Form/SwitchToLiveForm.php Provides a form that switches to the live version of the site. 1
SymfonyMailer class Drupal\Core\Mail\Plugin\Mail core/lib/Drupal/Core/Mail/Plugin/Mail/SymfonyMailer.php Defines an experimental mail backend, based on the Symfony mailer component. 1
SymfonyMailerTest class Drupal\Tests\Core\Mail\Plugin\Mail core/tests/Drupal/Tests/Core/Mail/Plugin/Mail/SymfonyMailerTest.php Tests Drupal\Core\Mail\Plugin\Mail\SymfonyMailer.
SymlinkValidator final class Drupal\package_manager\Validator core/modules/package_manager/src/Validator/SymlinkValidator.php Flags errors if unsupported symbolic links are detected. 1
SymlinkValidatorTest class Drupal\Tests\package_manager\Kernel core/modules/package_manager/tests/src/Kernel/SymlinkValidatorTest.php Tests Symlink Validator.
SynchronizableEntityTrait trait Drupal\Core\Entity core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php Provides a trait for accessing synchronization information. 1
SynchronizableInterface interface Drupal\Core\Entity core/lib/Drupal/Core/Entity/SynchronizableInterface.php Defines methods for an entity that supports synchronization. 2 4
SynchronizeCsrfTokenSeedTrait trait Drupal\Tests\ckeditor5\Traits core/modules/ckeditor5/tests/src/Traits/SynchronizeCsrfTokenSeedTrait.php Synchronizes the child site's CSRF token seed back to the test runner. 2
SyndicateBlock

in drupal:11.2.0 and is removed from drupal:12.0.0. There is no replacement.

class Drupal\node\Plugin\Block core/modules/node/src/Plugin/Block/SyndicateBlock.php Provides a 'Syndicate' block that links to the site's RSS feed.
SyntaxTest class Drupal\Tests\sqlite\Kernel\sqlite core/modules/sqlite/tests/src/Kernel/sqlite/SyntaxTest.php Tests SQLite syntax interpretation.
SyntaxTest class Drupal\Tests\mysql\Kernel\mysql core/modules/mysql/tests/src/Kernel/mysql/SyntaxTest.php Tests MySql syntax interpretation.
SyntaxTest class Drupal\Tests\pgsql\Kernel\pgsql core/modules/pgsql/tests/src/Kernel/pgsql/SyntaxTest.php Tests PostgreSQL syntax interpretation.
SyntaxTest class Drupal\Tests\mysqli\Kernel\mysqli core/modules/mysqli/tests/src/Kernel/mysqli/SyntaxTest.php Tests MySql syntax interpretation.
SysLog class Drupal\syslog\Logger core/modules/syslog/src/Logger/SysLog.php Redirects logging messages to syslog. 1 2 2
SysLogFile class Drupal\syslog_test\Logger core/modules/syslog/tests/modules/syslog_test/src/Logger/SysLogFile.php Redirects logging messages to error_log. 2
SyslogHooks class Drupal\syslog\Hook core/modules/syslog/src/Hook/SyslogHooks.php Hook implementations for syslog.
SyslogTest class Drupal\Tests\syslog\Kernel core/modules/syslog/tests/src/Kernel/SyslogTest.php Test syslog logger functionality.
SyslogTest class Drupal\Tests\syslog\Functional core/modules/syslog/tests/src/Functional/SyslogTest.php Tests syslog settings.
SystemAdminMenuBlockAccessCheck class Drupal\system\Access core/modules/system/src/Access/SystemAdminMenuBlockAccessCheck.php Access check for routes implementing _access_admin_menu_block_page. 3
SystemAdminThemePreprocess class Drupal\system\Theme core/modules/system/src/Theme/SystemAdminThemePreprocess.php Hook implementations for system. 1 2
SystemBrandingBlock class Drupal\system\Plugin\Block core/modules/system/src/Plugin/Block/SystemBrandingBlock.php Provides a block to display 'Site branding' elements.
SystemBrandingOffCanvasForm class Drupal\system\Form core/modules/system/src/Form/SystemBrandingOffCanvasForm.php The settings_tray form handler for the SystemBrandingBlock.
SystemBrandingOffCanvasForm class Drupal\settings_tray\Form core/modules/settings_tray/src/Form/SystemBrandingOffCanvasForm.php The settings_tray form handler for the SystemBrandingBlock. 1
SystemBreadcrumbBlock class Drupal\system\Plugin\Block core/modules/system/src/Plugin/Block/SystemBreadcrumbBlock.php Provides a block to display the breadcrumbs.
SystemCompactLink class Drupal\Core\Render\Element core/lib/Drupal/Core/Render/Element/SystemCompactLink.php Provides a link to show or hide help text on administration pages.
SystemConfigFormTest class Drupal\Tests\system\Functional\Form core/modules/system/tests/src/Functional/Form/SystemConfigFormTest.php Tests the SystemConfigFormTestBase class.
SystemConfigFormTestForm class Drupal\form_test core/modules/system/tests/modules/form_test/src/SystemConfigFormTestForm.php Tests the ConfigFormBase class. 1
SystemConfigSubscriber class Drupal\system core/modules/system/src/SystemConfigSubscriber.php System Config subscriber. 2
SystemController class Drupal\system\Controller core/modules/system/src/Controller/SystemController.php Returns responses for System routes. 3
SystemFilesTest class Drupal\FunctionalTests\Routing core/tests/Drupal/FunctionalTests/Routing/SystemFilesTest.php Tests system.files route.
SystemHooks class Drupal\system\Hook core/modules/system/src/Hook/SystemHooks.php Hook implementations for system. 2
SystemInfoController class Drupal\system\Controller core/modules/system/src/Controller/SystemInfoController.php Returns responses for System Info routes.
SystemListingCrossProfileCompatibleTest class Drupal\Tests\drupal_system_listing_compatible_test\Kernel core/profiles/tests/testing/modules/drupal_system_listing_compatible_test/tests/src/Kernel/SystemListingCrossProfileCompatibleTest.php Verifies that tests in installation profile modules are found.
SystemListingTest class Drupal\Tests\system\Kernel\Common core/modules/system/tests/src/Kernel/Common/SystemListingTest.php Tests scanning system directories in drupal_system_listing().
SystemLocalTasksTest class Drupal\Tests\system\Unit\Menu core/modules/system/tests/src/Unit/Menu/SystemLocalTasksTest.php Tests existence of system local tasks.
SystemMainBlock class Drupal\system\Plugin\Block core/modules/system/src/Plugin/Block/SystemMainBlock.php Provides a 'Main page content' block.
SystemManager class Drupal\system core/modules/system/src/SystemManager.php System Manager Service. 2 2
SystemMenuBlock class Drupal\system\Plugin\Derivative core/modules/system/src/Plugin/Derivative/SystemMenuBlock.php Provides block plugin definitions for custom menus. 1
SystemMenuBlock class Drupal\system\Plugin\Block core/modules/system/src/Plugin/Block/SystemMenuBlock.php Provides a generic Menu block. 1 1
SystemMenuBlockTest class Drupal\Tests\system\Kernel\Block core/modules/system/tests/src/Kernel/Block/SystemMenuBlockTest.php Tests \Drupal\system\Plugin\Block\SystemMenuBlock.
SystemMenuBlockUiTest class Drupal\Tests\system\FunctionalJavascript\Block core/modules/system/tests/src/FunctionalJavascript/Block/SystemMenuBlockUiTest.php Test the #states on the system menu block form.
SystemMenuNavigationBlock final class Drupal\navigation\Plugin\Derivative core/modules/navigation/src/Plugin/Derivative/SystemMenuNavigationBlock.php Provides navigation block plugin definitions for custom menus. 1
SystemMenuOffCanvasForm class Drupal\settings_tray\Form core/modules/settings_tray/src/Form/SystemMenuOffCanvasForm.php The setting_tray form handler for the SystemMenuBlock. 1
SystemMenuOffCanvasForm class Drupal\system\Form core/modules/system/src/Form/SystemMenuOffCanvasForm.php The setting_tray form handler for the SystemMenuBlock.
SystemMessagesBlock class Drupal\system\Plugin\Block core/modules/system/src/Plugin/Block/SystemMessagesBlock.php Provides a block to display the messages.
SystemModuleTestHooks class Drupal\system_module_test\Hook core/modules/system/tests/modules/system_module_test/src/Hook/SystemModuleTestHooks.php Hook implementations for system_module_test.

Other projects


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