Classes, traits, and interfaces - 10.3.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 1518

Name Deprecated Object type Namespace File name Summary Direct uses Use statements Strings
SmartDefaultSettingsTest class Drupal\Tests\ckeditor5\Kernel core/modules/ckeditor5/tests/src/Kernel/SmartDefaultSettingsTest.php @covers \Drupal\ckeditor5\SmartDefaultSettings::computeSmartDefaultSettings[[api-linebreak]] @group ckeditor5 @internal
SneakySuperset class Drupal\ckeditor5_plugin_elements_subset\Plugin\CKEditor5Plugin core/modules/ckeditor5/tests/modules/ckeditor5_plugin_elements_subset/src/Plugin/CKEditor5Plugin/SneakySuperset.php 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 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. 9
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.
SortTest class Drupal\Tests\jsonapi\Unit\Query core/modules/jsonapi/tests/src/Unit/Query/SortTest.php @coversDefaultClass \Drupal\jsonapi\Query\Sort[[api-linebreak]] @group jsonapi
SortTest class Drupal\Tests\PhpCs core/tests/Drupal/Tests/PhpCs/SortTest.php Tests that phpcs.xml.dist is properly sorted.
SortTest class Drupal\Tests\CSpell core/tests/Drupal/Tests/CSpell/SortTest.php Tests that the dictionary.txt file is properly sorted.
SortTranslationTest class Drupal\Tests\views\Kernel\Handler core/modules/views/tests/src/Kernel/Handler/SortTranslationTest.php Tests sorting on translatable and not translatable fields.
SourceEditing class Drupal\ckeditor5\Plugin\CKEditor5Plugin core/modules/ckeditor5/src/Plugin/CKEditor5Plugin/SourceEditing.php CKEditor 5 Source Editing plugin configuration. 1 1
SourceEditingEmptyElementTest class Drupal\Tests\ckeditor5\FunctionalJavascript core/modules/ckeditor5/tests/src/FunctionalJavascript/SourceEditingEmptyElementTest.php @coversDefaultClass \Drupal\ckeditor5\Plugin\CKEditor5Plugin\SourceEditing[[api-linebreak]] @covers \Drupal\ckeditor5\Plugin\CKEditor5PluginManager::getCKEditor5PluginConfig[[api-linebreak]] @group ckeditor5 @group #slow @internal
SourceEditingPluginTest class Drupal\Tests\ckeditor5\Unit core/modules/ckeditor5/tests/src/Unit/SourceEditingPluginTest.php @coversDefaultClass \Drupal\ckeditor5\Plugin\CKEditor5Plugin\SourceEditing[[api-linebreak]] @group ckeditor5 @internal
SourceEditingPreventSelfXssConstraint class Drupal\ckeditor5\Plugin\Validation\Constraint core/modules/ckeditor5/src/Plugin/Validation/Constraint/SourceEditingPreventSelfXssConstraint.php For disallowing Source Editing configuration that allows self-XSS.
SourceEditingPreventSelfXssConstraintValidator class Drupal\ckeditor5\Plugin\Validation\Constraint core/modules/ckeditor5/src/Plugin/Validation/Constraint/SourceEditingPreventSelfXssConstraintValidator.php Ensures Source Editing cannot be configured to allow self-XSS.
SourceEditingRedundantTagsConstraint class Drupal\ckeditor5\Plugin\Validation\Constraint core/modules/ckeditor5/src/Plugin/Validation/Constraint/SourceEditingRedundantTagsConstraint.php For disallowing Source Editing elements already supported by a plugin.
SourceEditingRedundantTagsConstraintValidator class Drupal\ckeditor5\Plugin\Validation\Constraint core/modules/ckeditor5/src/Plugin/Validation/Constraint/SourceEditingRedundantTagsConstraintValidator.php Ensures tags already available via plugin are not be added to Source Editing.
SourceEditingTest class Drupal\Tests\ckeditor5\FunctionalJavascript core/modules/ckeditor5/tests/src/FunctionalJavascript/SourceEditingTest.php @coversDefaultClass \Drupal\ckeditor5\Plugin\CKEditor5Plugin\SourceEditing[[api-linebreak]] @covers \Drupal\ckeditor5\Plugin\CKEditor5PluginManager::getCKEditor5PluginConfig[[api-linebreak]] @group ckeditor5 @group #slow @internal
SourceEditingTestBase abstract class Drupal\Tests\ckeditor5\FunctionalJavascript core/modules/ckeditor5/tests/src/FunctionalJavascript/SourceEditingTestBase.php @internal 2
SourcePluginBase abstract class Drupal\migrate\Plugin\migrate\source core/modules/migrate/src/Plugin/migrate/source/SourcePluginBase.php The base class for source plugins. 6 6
SourceProviderTest class Drupal\Tests\migrate_drupal_ui\Functional core/modules/migrate_drupal_ui/tests/src/Functional/SourceProviderTest.php Tests that a missing source provider error message is displayed.
SourceString class Drupal\locale core/modules/locale/src/SourceString.php Defines the locale source string object. 3
SpaceUsedTest class Drupal\Tests\file\Kernel core/modules/file/tests/src/Kernel/SpaceUsedTest.php Tests the spaceUsed() function.
SpecialAttributesRouteSubscriber class Drupal\Core\EventSubscriber core/lib/Drupal/Core/EventSubscriber/SpecialAttributesRouteSubscriber.php Provides a route subscriber which checks for invalid pattern variables. 1 2
SpecialAttributesRouteSubscriberTest class Drupal\Tests\Core\EventSubscriber core/tests/Drupal/Tests/Core/EventSubscriber/SpecialAttributesRouteSubscriberTest.php @coversDefaultClass \Drupal\Core\EventSubscriber\SpecialAttributesRouteSubscriber[[api-linebreak]] @group EventSubscriber
Sql class Drupal\views\Plugin\views\query core/modules/views/src/Plugin/views/query/Sql.php Views query plugin for an SQL query. 4
Sql class Drupal\migrate\Plugin\migrate\id_map core/modules/migrate/src/Plugin/migrate/id_map/Sql.php Defines the sql based ID map implementation. 1 4
SqlBase abstract class Drupal\migrate\Plugin\migrate\source core/modules/migrate/src/Plugin/migrate/source/SqlBase.php Sources whose data may be fetched via a database connection. 8 9
SqlBase abstract class Drupal\views\Plugin\views\pager core/modules/views/src/Plugin/views/pager/SqlBase.php A common base class for sql based pager. 2
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. 10 19
SqlContentEntityStorageException class Drupal\Core\Entity\Sql core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageException.php Exception thrown when a SQL storage operation fails. 1
SqlContentEntityStorageRevisionDataCleanupTest class Drupal\Tests\system\Functional\Update core/modules/system/tests/src/Functional/Update/SqlContentEntityStorageRevisionDataCleanupTest.php Tests cleaning up revision data tables.
SqlContentEntityStorageSchema class Drupal\Core\Entity\Sql core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php Defines a schema handler that supports revisionable, translatable entities. 10 11
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\Tests\Core\Entity\Sql core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageSchemaTest.php @coversDefaultClass \Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema[[api-linebreak]] @group Entity
SqlContentEntityStorageSchemaTest class Drupal\KernelTests\Core\Entity\Sql core/tests/Drupal/KernelTests/Core/Entity/Sql/SqlContentEntityStorageSchemaTest.php @group Entity

Other projects


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