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
SearchPageTest class Drupal\Tests\search\Kernel\Migrate\d7 core/modules/search/tests/src/Kernel/Migrate/d7/SearchPageTest.php Tests D7 search page source plugin.
SearchPageTest class Drupal\Tests\search\Functional\Jsonapi core/modules/search/tests/src/Functional/Jsonapi/SearchPageTest.php JSON:API integration test for the "SearchPage" config entity type.
SearchPageTextTest class Drupal\Tests\search\Functional core/modules/search/tests/src/Functional/SearchPageTextTest.php Tests the search help text and search page text.
SearchPageValidationTest class Drupal\Tests\search\Kernel core/modules/search/tests/src/Kernel/SearchPageValidationTest.php Tests validation of search_page entities.
SearchPageXmlAnonTest class Drupal\Tests\search\Functional\Rest core/modules/search/tests/src/Functional/Rest/SearchPageXmlAnonTest.php Tests Search Page Xml Anon.
SearchPageXmlBasicAuthTest class Drupal\Tests\search\Functional\Rest core/modules/search/tests/src/Functional/Rest/SearchPageXmlBasicAuthTest.php Tests Search Page Xml Basic Auth.
SearchPageXmlCookieTest class Drupal\Tests\search\Functional\Rest core/modules/search/tests/src/Functional/Rest/SearchPageXmlCookieTest.php Tests Search Page Xml Cookie.
SearchPlugin class Drupal\search\Annotation core/modules/search/src/Annotation/SearchPlugin.php Defines a SearchPlugin type annotation object.
SearchPluginBase abstract class Drupal\search\Plugin core/modules/search/src/Plugin/SearchPluginBase.php Defines a base class for plugins wishing to support search. 4 3
SearchPluginCollection class Drupal\search\Plugin core/modules/search/src/Plugin/SearchPluginCollection.php Provides a container for lazily loading search plugins. 2
SearchPluginCollectionTest class Drupal\Tests\search\Unit core/modules/search/tests/src/Unit/SearchPluginCollectionTest.php Tests Drupal\search\Plugin\SearchPluginCollection.
SearchPluginManager class Drupal\search core/modules/search/src/SearchPluginManager.php SearchExecute plugin manager. 1 2
SearchPreprocessLangcodeTest class Drupal\Tests\search\Functional core/modules/search/tests/src/Functional/SearchPreprocessLangcodeTest.php Tests that the search preprocessing uses the correct language code.
SearchQuery class Drupal\search core/modules/search/src/SearchQuery.php Search query extender and helper functions. 2 5
SearchQuery class Drupal\core_fake\Driver\Database\CoreFakeWithAllCustomClasses core/tests/fixtures/database_drivers/module/core_fake/src/Driver/Database/CoreFakeWithAllCustomClasses/SearchQuery.php CoreFakeWithAllCustomClasses implementation of \Drupal\search\SearchQuery.
SearchQueryAlterHooks class Drupal\search_query_alter\Hook core/modules/search/tests/modules/search_query_alter/src/Hook/SearchQueryAlterHooks.php Hook implementations for search_query_alter.
SearchQueryAlterTest class Drupal\Tests\search\Functional core/modules/search/tests/src/Functional/SearchQueryAlterTest.php Tests that the node search query can be altered via the query alter hook.
SearchRankingTest class Drupal\Tests\search\Functional core/modules/search/tests/src/Functional/SearchRankingTest.php Indexes content and tests ranking factors.
SearchRequirements class Drupal\search\Hook core/modules/search/src/Hook/SearchRequirements.php Requirements for the Search module.
SearchRow class Drupal\search\Plugin\views\row core/modules/search/src/Plugin/views/row/SearchRow.php Row handler plugin for displaying search results.
SearchSetLocaleTest class Drupal\Tests\search\Kernel core/modules/search/tests/src/Kernel/SearchSetLocaleTest.php Tests that search works with numeric locale settings.
SearchTextProcessor class Drupal\search core/modules/search/src/SearchTextProcessor.php Processes search text for indexing. 2
SearchTextProcessorInterface interface Drupal\search core/modules/search/src/SearchTextProcessorInterface.php Processes search text for indexing. 1 3
SearchTextProcessorTest class Drupal\Tests\search\Kernel core/modules/search/tests/src/Kernel/SearchTextProcessorTest.php Test search text preprocessing functionality.
SearchThemeHooks class Drupal\search\Hook core/modules/search/src/Hook/SearchThemeHooks.php Theme hook implementations for search.
SearchTokenizerTest class Drupal\Tests\search\Kernel core/modules/search/tests/src/Kernel/SearchTokenizerTest.php Tests that CJK tokenizer works as intended.
SearchUpdateTest class Drupal\Tests\search\Functional\Update core/modules/search/tests/src/Functional/Update/SearchUpdateTest.php Tests moving search from node to search_node.
Section class Drupal\layout_builder core/modules/layout_builder/src/Section.php Provides a domain object for layout sections. 30
SectionComponent class Drupal\layout_builder core/modules/layout_builder/src/SectionComponent.php Provides a value object for a section component. 19
SectionComponentBuildRenderArrayEvent class Drupal\layout_builder\Event core/modules/layout_builder/src/Event/SectionComponentBuildRenderArrayEvent.php Event fired when a section component's render array is being built. 4
SectionComponentTest class Drupal\Tests\layout_builder\Unit core/modules/layout_builder/tests/src/Unit/SectionComponentTest.php Tests Drupal\layout_builder\SectionComponent.
SectionData class Drupal\layout_builder\Plugin\DataType core/modules/layout_builder/src/Plugin/DataType/SectionData.php Provides a data type wrapping \Drupal\layout_builder\Section. 1
SectionDataTest class Drupal\Tests\layout_builder\Kernel core/modules/layout_builder/tests/src/Kernel/SectionDataTest.php Tests Drupal\layout_builder\Plugin\DataType\SectionData.
SectionListInterface interface Drupal\layout_builder core/modules/layout_builder/src/SectionListInterface.php Defines the interface for an object that stores layout sections. 4 6
SectionListTestBase abstract class Drupal\Tests\layout_builder\Kernel core/modules/layout_builder/tests/src/Kernel/SectionListTestBase.php Provides a base class for testing implementations of a section list. 4
SectionListTrait trait Drupal\layout_builder core/modules/layout_builder/src/SectionListTrait.php Provides a trait for maintaining a list of sections. 5
SectionListTraitTest class Drupal\Tests\layout_builder\Kernel core/modules/layout_builder/tests/src/Kernel/SectionListTraitTest.php Tests Drupal\layout_builder\SectionListTrait.
SectionRenderTest class Drupal\Tests\layout_builder\Unit core/modules/layout_builder/tests/src/Unit/SectionRenderTest.php Tests Drupal\layout_builder\Section.
SectionStorage class Drupal\layout_builder\Attribute core/modules/layout_builder/src/Attribute/SectionStorage.php Defines a SectionStorage attribute. 6
SectionStorage class Drupal\layout_builder\Annotation core/modules/layout_builder/src/Annotation/SectionStorage.php Defines a Section Storage type annotation object.
SectionStorageBase abstract class Drupal\layout_builder\Plugin\SectionStorage core/modules/layout_builder/src/Plugin/SectionStorage/SectionStorageBase.php Provides a base class for Section Storage types. 3 1
SectionStorageDefinition class Drupal\layout_builder\SectionStorage core/modules/layout_builder/src/SectionStorage/SectionStorageDefinition.php Provides section storage type plugin definition. 9
SectionStorageInterface interface Drupal\layout_builder core/modules/layout_builder/src/SectionStorageInterface.php Defines an interface for Section Storage type plugins. 4 40
SectionStorageLocalTaskProviderInterface interface Drupal\layout_builder\Plugin\SectionStorage core/modules/layout_builder/src/Plugin/SectionStorage/SectionStorageLocalTaskProviderInterface.php Allows section storage plugins to provide local tasks. 3 3
SectionStorageManager class Drupal\layout_builder\SectionStorage core/modules/layout_builder/src/SectionStorage/SectionStorageManager.php Provides the Section Storage type plugin manager. 1 2
SectionStorageManagerInterface interface Drupal\layout_builder\SectionStorage core/modules/layout_builder/src/SectionStorage/SectionStorageManagerInterface.php Provides the interface for a plugin manager of section storage types. 1 16
SectionStorageManagerTest class Drupal\Tests\layout_builder\Unit core/modules/layout_builder/tests/src/Unit/SectionStorageManagerTest.php Tests Drupal\layout_builder\SectionStorage\SectionStorageManager.
SectionTest class Drupal\Tests\layout_builder\Unit core/modules/layout_builder/tests/src/Unit/SectionTest.php Tests Drupal\layout_builder\Section.
Secure class Drupal\Tests\Component\Annotation\Doctrine\Fixtures\Annotation core/tests/Drupal/Tests/Component/Annotation/Doctrine/Fixtures/Annotation/Secure.php
SecuredRedirectResponse abstract class Drupal\Component\HttpFoundation core/lib/Drupal/Component/HttpFoundation/SecuredRedirectResponse.php Provides a common base class for safe redirects. 2 4

Other projects


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