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
SqlBaseTest class Drupal\Tests\views\Unit\Plugin\pager core/modules/views/tests/src/Unit/Plugin/pager/SqlBaseTest.php @coversDefaultClass \Drupal\views\Plugin\views\pager\SqlBase[[api-linebreak]] @group views
SqlBaseTest class Drupal\Tests\migrate\Unit core/modules/migrate/tests/src/Unit/SqlBaseTest.php Tests the SqlBase class.
SqlBaseTest class Drupal\Tests\migrate\Kernel core/modules/migrate/tests/src/Kernel/SqlBaseTest.php Tests the functionality of SqlBase.
SqlContentEntityStorage class Drupal\Core\Entity\Sql core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php A content entity database storage implementation. 13 23
SqlContentEntityStorageException class Drupal\Core\Entity\Sql core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageException.php Exception thrown when a SQL storage operation fails. 1
SqlContentEntityStorageSchema class Drupal\Core\Entity\Sql core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php Defines a schema handler that supports revisionable, translatable entities. 11 13
SqlContentEntityStorageSchemaColumnTest class Drupal\Tests\field\Kernel\Entity\Update core/modules/field/tests/src/Kernel/Entity/Update/SqlContentEntityStorageSchemaColumnTest.php Tests that schema changes in fields with data are detected during updates.
SqlContentEntityStorageSchemaTest class Drupal\KernelTests\Core\Entity\Sql core/tests/Drupal/KernelTests/Core/Entity/Sql/SqlContentEntityStorageSchemaTest.php @group Entity
SqlContentEntityStorageSchemaTest class Drupal\Tests\Core\Entity\Sql core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageSchemaTest.php @coversDefaultClass \Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema[[api-linebreak]] @group Entity
SqlContentEntityStorageTest class Drupal\Tests\Core\Entity\Sql core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php @coversDefaultClass \Drupal\Core\Entity\Sql\SqlContentEntityStorage[[api-linebreak]] @group Entity
SqlContentEntityStorageTestEntityInterface abstract class Drupal\Tests\Core\Entity\Sql core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php Provides an entity with dummy implementations of static methods.
SqlCountCache class Drupal\migrate_sql_count_cache_test\Plugin\migrate\source core/modules/migrate/tests/modules/migrate_sql_count_cache_test/src/Plugin/migrate/source/SqlCountCache.php Source plugin for Sql count cache test.
SqlDeprecationTest class Drupal\Tests\migrate\Kernel\Plugin\id_map core/modules/migrate/tests/src/Kernel/Plugin/id_map/SqlDeprecationTest.php Tests deprecation notice in Sql constructor.
SqlEntityLoadingTest class Drupal\Tests\views\Kernel\Plugin core/modules/views/tests/src/Kernel/Plugin/SqlEntityLoadingTest.php Tests the loading of entities and entity revisions.
SqlEntityStorageInterface interface Drupal\Core\Entity\Sql core/lib/Drupal/Core/Entity/Sql/SqlEntityStorageInterface.php A common interface for SQL-based entity storage implementations. 1 4
SqlFieldableEntityTypeListenerTrait trait Drupal\Core\Entity\Sql core/lib/Drupal/Core/Entity/Sql/SqlFieldableEntityTypeListenerTrait.php Helper methods for EntityTypeListenerInterface.
SqlIdMapTest class Drupal\Tests\migrate\Kernel\Plugin\id_map core/modules/migrate/tests/src/Kernel/Plugin/id_map/SqlTest.php Defines a test SQL ID map for use in tests.
SqliteDateSql class Drupal\views\Plugin\views\query core/modules/views/src/Plugin/views/query/SqliteDateSql.php SQLite-specific date handling. 1 2
SqliteDateSqlTest class Drupal\Tests\views\Unit\Plugin\views\query core/modules/views/tests/src/Unit/Plugin/views/query/SqliteDateSqlTest.php Tests the MySQL-specific date query handler.
SqliteDriverLegacyTest class Drupal\Tests\sqlite\Kernel\sqlite core/modules/sqlite/tests/src/Kernel/sqlite/SqliteDriverLegacyTest.php Tests the deprecations of the SQLite database driver classes in Core.
SqlModeTest class Drupal\Tests\mysql\Kernel\mysql core/modules/mysql/tests/src/Kernel/mysql/SqlModeTest.php Tests compatibility of the MySQL driver with various sql_mode options.
SqlQueryTest class Drupal\Tests\views\Kernel\Plugin core/modules/views/tests/src/Kernel/Plugin/SqlQueryTest.php Tests the sql query plugin.
SqlTest class Drupal\Tests\views\Unit\Plugin\query core/modules/views/tests/src/Unit/Plugin/query/SqlTest.php @coversDefaultClass \Drupal\views\Plugin\views\query\Sql[[api-linebreak]]
SqlTest class Drupal\Tests\migrate\Kernel\Plugin\id_map core/modules/migrate/tests/src/Kernel/Plugin/id_map/SqlTest.php Tests that the migrate map table is created.
SSH class Drupal\Core\FileTransfer core/lib/Drupal/Core/FileTransfer/SSH.php The SSH connection class for the update module.
Stable9LibraryOverrideTest class Drupal\KernelTests\Core\Theme core/tests/Drupal/KernelTests/Core/Theme/Stable9LibraryOverrideTest.php Tests Stable 9's library overrides.
Stable9TemplateOverrideTest class Drupal\KernelTests\Core\Theme core/tests/Drupal/KernelTests/Core/Theme/Stable9TemplateOverrideTest.php Tests Stable 9's template overrides.
StableLibraryOverrideTest class Drupal\KernelTests\Core\Theme core/tests/Drupal/KernelTests/Core/Theme/StableLibraryOverrideTest.php Tests Stable's library overrides.
StableLibraryOverrideTestBase abstract class Drupal\KernelTests\Core\Theme core/tests/Drupal/KernelTests/Core/Theme/StableLibraryOverrideTestBase.php Tests the behavior of a theme when base_theme info key is missing. 2
StableTemplateOverrideTest class Drupal\KernelTests\Core\Theme core/tests/Drupal/KernelTests/Core/Theme/StableTemplateOverrideTest.php Tests Stable's template overrides.
StableUninstallUpdateTest class Drupal\Tests\system\Functional\Update core/modules/system/tests/src/Functional/Update/StableUninstallUpdateTest.php Ensures that update hook uninstalls Stable when it's no longer needed.
StackedKernelPass class Drupal\Core\DependencyInjection\Compiler core/lib/Drupal/Core/DependencyInjection/Compiler/StackedKernelPass.php Provides a compiler pass for stacked HTTP kernels. 2
StackedKernelPassTest class Drupal\Tests\Core\DependencyInjection\Compiler core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/StackedKernelPassTest.php @coversDefaultClass \Drupal\Core\DependencyInjection\Compiler\StackedKernelPass[[api-linebreak]] @group DependencyInjection
StackedRouteMatchInterface interface Drupal\Core\Routing core/lib/Drupal/Core/Routing/StackedRouteMatchInterface.php Defines an interface for a stack of route matches. 1 3
StackedSessionHandlerPass class Drupal\Core\DependencyInjection\Compiler core/lib/Drupal/Core/DependencyInjection/Compiler/StackedSessionHandlerPass.php Provides a compiler pass for stacked session save handlers. 1
StackKernelIntegrationTest class Drupal\KernelTests\Core\HttpKernel core/tests/Drupal/KernelTests/Core/HttpKernel/StackKernelIntegrationTest.php Tests the stacked kernel functionality.
StackSessionHandlerIntegrationTest class Drupal\Tests\system\Functional\Session core/modules/system/tests/src/Functional/Session/StackSessionHandlerIntegrationTest.php Tests the stacked session handler functionality.
Standard class Drupal\editor\EditorXssFilter core/modules/editor/src/EditorXssFilter/Standard.php Defines the standard text editor XSS filter. 2
Standard class Drupal\views\Plugin\views\join core/modules/views/src/Plugin/views/join/Standard.php Default implementation of the join plugin.
Standard class Drupal\views\Plugin\views\sort core/modules/views/src/Plugin/views/sort/Standard.php Default implementation of the base sort plugin.
Standard class Drupal\views\Plugin\views\field core/modules/views/src/Plugin/views/field/Standard.php Default implementation of the base field plugin.
Standard class Drupal\views\Plugin\views\relationship core/modules/views/src/Plugin/views/relationship/Standard.php Default implementation of the base relationship plugin.
Standard class Drupal\views\Plugin\views\filter core/modules/views/src/Plugin/views/filter/Standard.php Default implementation of the base filter plugin. 1
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.
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.
StandardProfileTest class Drupal\Tests\rdf\Functional core/modules/rdf/tests/src/Functional/StandardProfileTest.php Tests the RDF mappings and RDFa markup on top of the standard profile.
StandardTest class Drupal\Tests\standard\Functional core/profiles/standard/tests/src/Functional/StandardTest.php Tests Standard installation profile expectations.
StandardTest class Drupal\Tests\editor\Unit\EditorXssFilter core/modules/editor/tests/src/Unit/EditorXssFilter/StandardTest.php @coversDefaultClass \Drupal\editor\EditorXssFilter\Standard[[api-linebreak]] @group editor

Other projects


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