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
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\workflows core/modules/workflows/src/StateInterface.php An interface for state value objects. 2 9
StateInterface interface Drupal\Core\State core/lib/Drupal/Core/State/StateInterface.php Defines the interface for the state system. 1 111
Statement class Drupal\sqlite\Driver\Database\sqlite core/modules/sqlite/src/Driver/Database/sqlite/Statement.php SQLite implementation of \Drupal\Core\Database\Statement. 1
Statement class Drupal\mysqli\Driver\Database\mysqli core/modules/mysqli/src/Driver/Database/mysqli/Statement.php MySQLi implementation of \Drupal\Core\Database\Query\StatementInterface.
StatementBase abstract class Drupal\Core\Database\Statement core/lib/Drupal/Core/Database/Statement/StatementBase.php StatementInterface base implementation. 3 3
StatementExecutionEndEvent class Drupal\Core\Database\Event core/lib/Drupal/Core/Database/Event/StatementExecutionEndEvent.php Represents the end of a statement execution as an event. 1 7
StatementExecutionFailureEvent class Drupal\Core\Database\Event core/lib/Drupal/Core/Database/Event/StatementExecutionFailureEvent.php Represents the failure of a statement execution as an event. 5
StatementExecutionStartEvent class Drupal\Core\Database\Event core/lib/Drupal/Core/Database/Event/StatementExecutionStartEvent.php Represents the start of a statement execution as an event. 4
StatementExecutionSubscriber class Drupal\Core\Database\EventSubscriber core/lib/Drupal/Core/Database/EventSubscriber/StatementExecutionSubscriber.php Response subscriber to statement executions.
StatementInterface interface Drupal\Core\Database core/lib/Drupal/Core/Database/StatementInterface.php Represents a prepared statement. 3 13
StatementIteratorTrait trait Drupal\Core\Database core/lib/Drupal/Core/Database/StatementIteratorTrait.php StatementInterface iterator trait. 1
StatementPrefetchIterator class Drupal\Core\Database core/lib/Drupal/Core/Database/StatementPrefetchIterator.php An implementation of StatementInterface that prefetches all data. 1 2
StatementTest class Drupal\KernelTests\Core\Database core/tests/Drupal/KernelTests/Core/Database/StatementTest.php Tests the Statement classes.
StatementWrapperIterator class Drupal\Core\Database core/lib/Drupal/Core/Database/StatementWrapperIterator.php StatementInterface iterator implementation. 3
StateTest class Drupal\Tests\Core\State core/tests/Drupal/Tests/Core/State/StateTest.php Tests Drupal\Core\State\State.
StateTest class Drupal\Tests\workflows\Unit core/modules/workflows/tests/src/Unit/StateTest.php Tests Drupal\workflows\State.
StateTransitionValidation class Drupal\content_moderation core/modules/content_moderation/src/StateTransitionValidation.php Validates whether a certain state transition is allowed. 1 2
StateTransitionValidationInterface interface Drupal\content_moderation core/modules/content_moderation/src/StateTransitionValidationInterface.php Validates whether a certain state transition is allowed. 1 3
StateTransitionValidationTest class Drupal\Tests\content_moderation\Unit core/modules/content_moderation/tests/src/Unit/StateTransitionValidationTest.php Tests Drupal\content_moderation\StateTransitionValidation.
StateValuesCleanAdvancedTest class Drupal\Tests\system\Functional\Form core/modules/system/tests/src/Functional/Form/StateValuesCleanAdvancedTest.php Tests the removal of internal Form API elements from submitted form values.
StateValuesCleanTest class Drupal\Tests\system\Functional\Form core/modules/system/tests/src/Functional/Form/StateValuesCleanTest.php Tests the proper removal of submitted form values.
StaticDiscovery class Drupal\Component\Plugin\Discovery core/lib/Drupal/Component/Plugin/Discovery/StaticDiscovery.php Allows plugin definitions to be manually registered. 2 6
StaticDiscoveryDecorator class Drupal\Component\Plugin\Discovery core/lib/Drupal/Component/Plugin/Discovery/StaticDiscoveryDecorator.php A decorator that allows manual registration of undiscoverable definitions. 2
StaticDiscoveryDecoratorTest class Drupal\Tests\Component\Plugin\Discovery core/tests/Drupal/Tests/Component/Plugin/Discovery/StaticDiscoveryDecoratorTest.php Tests Drupal\Component\Plugin\Discovery\StaticDiscoveryDecorator.
StaticDiscoveryDecoratorTestMockInterface interface Drupal\Tests\Component\Plugin\Discovery core/tests/Drupal/Tests/Component/Plugin/Discovery/StaticDiscoveryDecoratorTest.php Interface used in the mocking process of this test.
StaticDiscoveryTest class Drupal\KernelTests\Core\Plugin\Discovery core/tests/Drupal/KernelTests/Core/Plugin/Discovery/StaticDiscoveryTest.php Tests that plugins using static discovery are correctly discovered.
StaticDiscoveryTestDecoratedClass class Drupal\Tests\Component\Plugin\Discovery core/tests/Drupal/Tests/Component/Plugin/Discovery/StaticDiscoveryDecoratorTest.php A class extending StaticDiscovery for testing purposes.
StaticFileCacheBackend class Drupal\Tests\Component\FileCache core/tests/Drupal/Tests/Component/FileCache/StaticFileCacheBackend.php Allows to cache data based on file modification dates in a static cache.
StaticMap class Drupal\migrate\Plugin\migrate\process core/modules/migrate/src/Plugin/migrate/process/StaticMap.php Changes the source value based on a static lookup map. 3 4
StaticMapTest class Drupal\Tests\migrate\Unit\process core/modules/migrate/tests/src/Unit/process/StaticMapTest.php Tests the static map process plugin.
StaticMenuLinkOverrides class Drupal\Core\Menu core/lib/Drupal/Core/Menu/StaticMenuLinkOverrides.php Defines an implementation of the menu link override using a config file. 1 2
StaticMenuLinkOverridesInterface interface Drupal\Core\Menu core/lib/Drupal/Core/Menu/StaticMenuLinkOverridesInterface.php Defines an interface for objects which overrides menu links defined in YAML. 1 7

Other projects


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