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
SchemaConfigListenerTest class Drupal\FunctionalTests\Core\Config core/tests/Drupal/FunctionalTests/Core/Config/SchemaConfigListenerTest.php Tests the functionality of ConfigSchemaChecker in BrowserTestBase tests.
SchemaConfigListenerTestTrait trait Drupal\Tests\Traits\Core\Config core/tests/Drupal/Tests/Traits/Core/Config/SchemaConfigListenerTestTrait.php Adds a test for the configuration schema checker use in tests. 2
SchemaConfigListenerWebTest class Drupal\Tests\config\Functional core/modules/config/tests/src/Functional/SchemaConfigListenerWebTest.php Tests the functionality of ConfigSchemaChecker in BrowserTestBase tests.
SchemaException class Drupal\Core\Database core/lib/Drupal/Core/Database/SchemaException.php Base exception for Schema-related errors. 5 7
SchemaIncompleteException class Drupal\Core\Config\Schema core/lib/Drupal/Core/Config/Schema/SchemaIncompleteException.php An exception thrown when a config schema is incomplete. 11
SchemaInspector class Drupal\TestTools\Extension core/tests/Drupal/TestTools/Extension/SchemaInspector.php Provides methods to access modules' schema. 2
SchemaIntrospectionTestTrait trait Drupal\Tests\Core\Database core/tests/Drupal/Tests/Core/Database/SchemaIntrospectionTestTrait.php Provides methods for testing database schema characteristics. 1
SchemaListenerController class Drupal\config_test core/modules/config/tests/config_test/src/SchemaListenerController.php Controller for testing \Drupal\Core\Config\Development\ConfigSchemaChecker.
SchemaObjectDoesNotExistException class Drupal\Core\Database core/lib/Drupal/Core/Database/SchemaObjectDoesNotExistException.php Exception thrown if an object being modified doesn't exist yet. 4
SchemaObjectExistsException class Drupal\Core\Database core/lib/Drupal/Core/Database/SchemaObjectExistsException.php Exception thrown if an object being created already exists. 5
SchemaPrimaryKeyMustBeDroppedException class Drupal\Core\Database\Exception core/lib/Drupal/Core/Database/Exception/SchemaPrimaryKeyMustBeDroppedException.php Exception thrown if the Primary Key must be dropped before an operation. 2
SchemaTableColumnSizeTooLargeException class Drupal\Core\Database\Exception core/lib/Drupal/Core/Database/Exception/SchemaTableColumnSizeTooLargeException.php Exception thrown if a column size is too large on table creation. 3
SchemaTableKeyTooLargeException class Drupal\Core\Database\Exception core/lib/Drupal/Core/Database/Exception/SchemaTableKeyTooLargeException.php Exception thrown if a key is too large. 3
SchemaTest class Drupal\Tests\mysqli\Kernel\mysqli core/modules/mysqli/tests/src/Kernel/mysqli/SchemaTest.php Tests schema API for the MySQL driver.
SchemaTest class Drupal\Tests\pgsql\Unit core/modules/pgsql/tests/src/Unit/SchemaTest.php Tests Drupal\pgsql\Driver\Database\pgsql\Schema.
SchemaTest class Drupal\Tests\pgsql\Kernel\pgsql core/modules/pgsql/tests/src/Kernel/pgsql/SchemaTest.php Tests schema API for the PostgreSQL driver.
SchemaTest class Drupal\Tests\mysql\Kernel\mysql core/modules/mysql/tests/src/Kernel/mysql/SchemaTest.php Tests schema API for the MySQL driver. 1 1
SchemaTest class Drupal\Tests\sqlite\Kernel\sqlite core/modules/sqlite/tests/src/Kernel/sqlite/SchemaTest.php Tests schema API for the SQLite driver.
SchematicNormalizerFallbackTrait trait Drupal\serialization\Normalizer core/modules/serialization/src/Normalizer/SchematicNormalizerFallbackTrait.php Trait for generating helpful schema-generation fallback messages. 1
SchematicNormalizerHelperTrait trait Drupal\serialization\Normalizer core/modules/serialization/src/Normalizer/SchematicNormalizerHelperTrait.php Methods for normalizing JSON schema.
SchematicNormalizerTrait trait Drupal\serialization\Normalizer core/modules/serialization/src/Normalizer/SchematicNormalizerTrait.php Trait for normalizers which can also provide JSON Schema. 5
SchemaUniquePrefixedKeysIndexTest class Drupal\Tests\sqlite\Kernel\sqlite core/modules/sqlite/tests/src/Kernel/sqlite/SchemaUniquePrefixedKeysIndexTest.php Tests adding UNIQUE keys to tables.
SchemaUniquePrefixedKeysIndexTest class Drupal\Tests\mysql\Kernel\mysql core/modules/mysql/tests/src/Kernel/mysql/SchemaUniquePrefixedKeysIndexTest.php Tests adding UNIQUE keys to tables.
SchemaUniquePrefixedKeysIndexTest class Drupal\Tests\pgsql\Kernel\pgsql core/modules/pgsql/tests/src/Kernel/pgsql/SchemaUniquePrefixedKeysIndexTest.php Tests adding UNIQUE keys to tables.
SchemaUniquePrefixedKeysIndexTestBase abstract class Drupal\KernelTests\Core\Database core/tests/Drupal/KernelTests/Core/Database/SchemaUniquePrefixedKeysIndexTestBase.php Tests adding UNIQUE keys to tables. 3 3
Score class Drupal\search\Plugin\views\sort core/modules/search/src/Plugin/views/sort/Score.php Sort handler for sorting by search score.
Score class Drupal\search\Plugin\views\field core/modules/search/src/Plugin/views/field/Score.php Field handler for search score.
ScrollTopCommand class Drupal\Core\Ajax core/lib/Drupal/Core/Ajax/ScrollTopCommand.php Provides an AJAX command for scrolling to the top of an element. 1
Search class Drupal\Core\Render\Element core/lib/Drupal/Core/Render/Element/Search.php Provides an HTML5 input element with type of "search".
Search class Drupal\search\Attribute core/modules/search/src/Attribute/Search.php Defines a Search type attribute for plugin discovery. 6
Search class Drupal\search\Plugin\views\filter core/modules/search/src/Plugin/views/filter/Search.php Filter handler for search keywords.
Search class Drupal\search\Plugin\views\argument core/modules/search/src/Plugin/views/argument/Search.php Argument handler for search keywords.
SearchableHelpInterface interface Drupal\help core/modules/help/src/SearchableHelpInterface.php Provides an interface for a HelpSection plugin that also supports search. 2 4
SearchAdminThemeTest class Drupal\Tests\search\Functional core/modules/search/tests/src/Functional/SearchAdminThemeTest.php Verify the search results using administration theme for specific plugins.
SearchAdvancedSearchFormTest class Drupal\Tests\search\Functional core/modules/search/tests/src/Functional/SearchAdvancedSearchFormTest.php Indexes content and tests the advanced search form.
SearchBlock class Drupal\search\Plugin\Block core/modules/search/src/Plugin/Block/SearchBlock.php Provides a 'Search form' block.
SearchBlockForm class Drupal\search\Form core/modules/search/src/Form/SearchBlockForm.php Builds the search form for the search block. 1
SearchBlockPageIdUpdatePathTest class Drupal\Tests\search\Functional\Update core/modules/search/tests/src/Functional/Update/SearchBlockPageIdUpdatePathTest.php Tests update path for the search block's `page_id` setting from '' to NULL.
SearchBlockTest class Drupal\Tests\search\Functional core/modules/search/tests/src/Functional/SearchBlockTest.php Tests if the search form block is available.
SearchCommentCountToggleTest class Drupal\Tests\search\Functional core/modules/search/tests/src/Functional/SearchCommentCountToggleTest.php Tests that comment count display toggles properly on comment status of node.
SearchCommentTest class Drupal\Tests\search\Functional core/modules/search/tests/src/Functional/SearchCommentTest.php Tests integration searching comments.
SearchConfigSettingsFormTest class Drupal\Tests\search\Functional core/modules/search/tests/src/Functional/SearchConfigSettingsFormTest.php Verify the search config settings form.
SearchConfigurationRankings

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

class Drupal\search\Plugin\migrate\process core/modules/search/src/Plugin/migrate/process/SearchConfigurationRankings.php Generate configuration rankings.
SearchController class Drupal\search\Controller core/modules/search/src/Controller/SearchController.php Route controller for search.
SearchDateIntervalTest class Drupal\Tests\search\Functional core/modules/search/tests/src/Functional/SearchDateIntervalTest.php Tests searching with date filters that exclude some translations.
SearchDateQueryAlterHooks class Drupal\search_date_query_alter\Hook core/modules/search/tests/modules/search_date_query_alter/src/Hook/SearchDateQueryAlterHooks.php Hook implementations for search_date_query_alter.
SearchEmbeddedForm class Drupal\search_embedded_form\Form core/modules/search/tests/modules/search_embedded_form/src/Form/SearchEmbeddedForm.php Form controller for search_embedded_form form. 1
SearchEmbeddedFormThemeHooks class Drupal\search_embedded_form\Hook core/modules/search/tests/modules/search_embedded_form/src/Hook/SearchEmbeddedFormThemeHooks.php Theme hook implementations for search_embedded_form module.
SearchEmbedFormTest class Drupal\Tests\search\Functional core/modules/search/tests/src/Functional/SearchEmbedFormTest.php Verifies that a form embedded in search results works.
SearchEntityOperationsCacheabilityTest class Drupal\Tests\search\Kernel core/modules/search/tests/src/Kernel/SearchEntityOperationsCacheabilityTest.php Tests cacheability added by entity operations.

Other projects


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