Classes, traits, and interfaces - 9.5.x - 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 1523

Name Deprecated Object type Namespace File name Summary Direct uses Use statements Strings
StyleTableTest class Drupal\Tests\views_ui\Functional core/modules/views_ui/tests/src/Functional/StyleTableTest.php Tests the UI of views when using the table style.
StyleTableUnitTest class Drupal\Tests\views\Kernel\Plugin core/modules/views/tests/src/Kernel/Plugin/StyleTableUnitTest.php Tests the table style plugin.
StyleTemplateTest class Drupal\views_test_data\Plugin\views\style core/modules/views/tests/modules/views_test_data/src/Plugin/views/style/StyleTemplateTest.php Provides a general test style template plugin.
StyleTest class Drupal\views_test_data\Plugin\views\style core/modules/views/tests/modules/views_test_data/src/Plugin/views/style/StyleTest.php Provides a general test style plugin. 1
StyleTest class Drupal\Tests\views\Kernel\Plugin core/modules/views/tests/src/Kernel/Plugin/StyleTest.php Tests general style functionality.
StyleTest class Drupal\Tests\ckeditor5\FunctionalJavascript core/modules/ckeditor5/tests/src/FunctionalJavascript/StyleTest.php @coversDefaultClass \Drupal\ckeditor5\Plugin\CKEditor5Plugin\Style[[api-linebreak]] @group ckeditor5 @internal
StyleTestBase abstract class Drupal\Tests\views\Kernel\Plugin core/modules/views/tests/src/Kernel/Plugin/StyleTestBase.php Tests some general style plugin related functionality. 2
StyleUITest class Drupal\Tests\views_ui\Functional core/modules/views_ui/tests/src/Functional/StyleUITest.php Tests the UI of style plugins.
StyleUnformattedTest class Drupal\Tests\views\Kernel\Plugin core/modules/views/tests/src/Kernel/Plugin/StyleUnformattedTest.php Tests unformatted style functionality.
SubformState class Drupal\Core\Form core/lib/Drupal/Core/Form/SubformState.php Stores information about the state of a subform. 15
SubformStateInterface interface Drupal\Core\Form core/lib/Drupal/Core/Form/SubformStateInterface.php Stores information about the state of a subform. 1 4
SubformStateTest class Drupal\Tests\Core\Form core/tests/Drupal/Tests/Core/Form/SubformStateTest.php @coversDefaultClass \Drupal\Core\Form\SubformState[[api-linebreak]]
Submit class Drupal\Core\Render\Element core/lib/Drupal/Core/Render/Element/Submit.php Provides a form submit button. 1
SubProcess class Drupal\migrate\Plugin\migrate\process core/modules/migrate/src/Plugin/migrate/process/SubProcess.php Runs an array of arrays through its own process pipeline. 1
SubProcessTest class Drupal\Tests\migrate\Unit\process core/modules/migrate/tests/src/Unit/process/SubProcessTest.php Tests the sub_process process plugin.
Subquery class Drupal\views\Plugin\views\join core/modules/views/src/Plugin/views/join/Subquery.php Join handler for relationships that join with a subquery as the left field.
Substr class Drupal\migrate\Plugin\migrate\process core/modules/migrate/src/Plugin/migrate/process/Substr.php Returns a substring of the input value. 1
SubstrTest class Drupal\Tests\migrate\Unit\process core/modules/migrate/tests/src/Unit/process/SubstrTest.php Tests the substr plugin.
SummaryLengthTest class Drupal\Tests\node\Kernel core/modules/node/tests/src/Kernel/SummaryLengthTest.php Tests summary length.
SupernovaGenerator class Drupal\help_test core/modules/help/tests/modules/help_test/src/SupernovaGenerator.php Implements a URL generator which always thrown an exception. 1
SuspendQueueException class Drupal\Core\Queue core/lib/Drupal/Core/Queue/SuspendQueueException.php Exception class to throw to indicate that a cron queue should be skipped. 3
SvgIconBuilder class Drupal\Core\Layout\Icon core/lib/Drupal/Core/Layout/Icon/SvgIconBuilder.php Builds SVG layout icons. 1 2
SwitchShortcutSet class Drupal\shortcut\Form core/modules/shortcut/src/Form/SwitchShortcutSet.php Builds the shortcut set switch form. 1
SwitchToLiveForm class Drupal\workspaces\Form core/modules/workspaces/src/Form/SwitchToLiveForm.php Provides a form that switches to the live version of the site. 1
SymfonyInheritedEvent class Drupal\Tests\Component\EventDispatcher core/tests/Drupal/Tests/Component/EventDispatcher/ContainerAwareEventDispatcherTest.php
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 1
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 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.
SysLog class Drupal\syslog\Logger core/modules/syslog/src/Logger/SysLog.php Redirects logging messages to syslog. 1 1 2
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.
SysLogTest class Drupal\syslog_test\Logger core/modules/syslog/tests/modules/syslog_test/src/Logger/SysLogTest.php Redirects logging messages to error_log. 2
SystemAuthorizeTest class Drupal\Tests\system\Functional\System core/modules/system/tests/src/Functional/System/SystemAuthorizeTest.php Tests the authorize.php script and related API.
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.
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.
SystemDeprecationTest class Drupal\Tests\system\Kernel core/modules/system/tests/src/Kernel/SystemDeprecationTest.php @group system @group legacy
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/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.

Other projects


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