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
SecuredRedirectResponseTest class Drupal\Tests\Component\HttpFoundation core/tests/Drupal/Tests/Component/HttpFoundation/SecuredRedirectResponseTest.php Test secure redirect base class.
SecuredRedirectStub class Drupal\Tests\Component\HttpFoundation core/tests/Drupal/Tests/Component/HttpFoundation/SecuredRedirectResponseTest.php Test class for safe redirects.
SecurityAdvisoriesFetcher final class Drupal\system\SecurityAdvisories core/modules/system/src/SecurityAdvisories/SecurityAdvisoriesFetcher.php Defines a service to get security advisories. 2 2
SecurityAdvisoriesFetcherTest class Drupal\Tests\system\Kernel\SecurityAdvisories core/modules/system/tests/src/Kernel/SecurityAdvisories/SecurityAdvisoriesFetcherTest.php Tests Drupal\system\SecurityAdvisories\SecurityAdvisoriesFetcher.
SecurityAdvisory final class Drupal\system\SecurityAdvisories core/modules/system/src/SecurityAdvisories/SecurityAdvisory.php Provides a security advisory value object. 1
SecurityAdvisoryTest class Drupal\Tests\system\Unit\SecurityAdvisories core/modules/system/tests/src/Unit/SecurityAdvisories/SecurityAdvisoryTest.php Tests Drupal\system\SecurityAdvisories\SecurityAdvisory.
SecurityAdvisoryTest class Drupal\Tests\system\Functional\SecurityAdvisories core/modules/system/tests/src/Functional/SecurityAdvisories/SecurityAdvisoryTest.php Tests of security advisories functionality.
SecurityFileUploadEventSubscriber class Drupal\system\EventSubscriber core/modules/system/src/EventSubscriber/SecurityFileUploadEventSubscriber.php The final subscriber to 'file.upload.sanitize.name'. 1 2
SecurityFileUploadEventSubscriberTest class Drupal\Tests\system\Unit\Event core/modules/system/tests/src/Unit/Event/SecurityFileUploadEventSubscriberTest.php SecurityFileUploadEventSubscriber tests.
SeeTest abstract class Drupal\Tests\Core\Foo core/tests/PHPStan/fixtures/test-classes-with-metadata.php With some docs.
Select class Drupal\core_fake\Driver\Database\CoreFakeWithAllCustomClasses core/tests/fixtures/database_drivers/module/core_fake/src/Driver/Database/CoreFakeWithAllCustomClasses/Select.php CoreFakeWithAllCustomClasses implementation of \Drupal\Core\Database\Select.
Select class Drupal\Core\Render\Element core/lib/Drupal/Core/Render/Element/Select.php Provides a form element for a drop-down menu or scrolling selection box. 2
Select class Drupal\Tests\Core\Database\Stub core/tests/Drupal/Tests/Core/Database/Stub/Select.php A stub of the MySQL query builder for SELECT statements.
Select class Drupal\pgsql\Driver\Database\pgsql core/modules/pgsql/src/Driver/Database/pgsql/Select.php PostgreSQL implementation of \Drupal\Core\Database\Query\Select.
Select class Drupal\Core\Database\Query core/lib/Drupal/Core/Database/Query/Select.php Query builder for SELECT statements. 4 11
Select class Drupal\sqlite\Driver\Database\sqlite core/modules/sqlite/src/Driver/Database/sqlite/Select.php SQLite implementation of \Drupal\Core\Database\Query\Select.
SelectCloneTest class Drupal\KernelTests\Core\Database core/tests/Drupal/KernelTests/Core/Database/SelectCloneTest.php Tests cloning Select queries.
SelectComplexTest class Drupal\KernelTests\Core\Database core/tests/Drupal/KernelTests/Core/Database/SelectComplexTest.php Tests the Select query builder with more complex queries.
SelectExtender class Drupal\Core\Database\Query core/lib/Drupal/Core/Database/Query/SelectExtender.php The base extender class for Select queries. 3 5
SelectExtenderTest class Drupal\KernelTests\Core\Database core/tests/Drupal/KernelTests/Core/Database/SelectExtenderTest.php Tests the Select query extender classes.
SelectGetRangeTest final class Drupal\KernelTests\Core\Database core/tests/Drupal/KernelTests/Core/Database/SelectGetRangeTest.php Tests SelectInterface::getRange().
SelectInterface interface Drupal\Core\Database\Query core/lib/Drupal/Core/Database/Query/SelectInterface.php Interface definition for a Select Query object. 2 32
SelectionInterface interface Drupal\Core\Entity\EntityReferenceSelection core/lib/Drupal/Core/Entity/EntityReferenceSelection/SelectionInterface.php Interface definition for Entity Reference Selection plugins. 1 3 2
SelectionPluginBase abstract class Drupal\Core\Entity\EntityReferenceSelection core/lib/Drupal/Core/Entity/EntityReferenceSelection/SelectionPluginBase.php Provides a base class for configurable selection handlers. 3 3
SelectionPluginManager class Drupal\Core\Entity\EntityReferenceSelection core/lib/Drupal/Core/Entity/EntityReferenceSelection/SelectionPluginManager.php Plugin type manager for Entity Reference Selection plugins. 2
SelectionPluginManagerInterface interface Drupal\Core\Entity\EntityReferenceSelection core/lib/Drupal/Core/Entity/EntityReferenceSelection/SelectionPluginManagerInterface.php Defines an interface for the entity reference selection plugin manager. 1 5
SelectionTest class Drupal\Tests\field\Kernel\EntityReference\Views core/modules/field/tests/src/Kernel/EntityReference/Views/SelectionTest.php Tests entity reference selection handler.
SelectionTest class Drupal\Tests\field\Functional\EntityReference\Views core/modules/field/tests/src/Functional/EntityReference/Views/SelectionTest.php Tests entity reference selection handler.
SelectionWithAutocreateInterface interface Drupal\Core\Entity\EntityReferenceSelection core/lib/Drupal/Core/Entity/EntityReferenceSelection/SelectionWithAutocreateInterface.php Interface for Selection plugins that support newly created entities. 1 3
SelectLanguageForm class Drupal\Core\Installer\Form core/lib/Drupal/Core/Installer/Form/SelectLanguageForm.php Provides the language selection form.
SelectLeastTest class Drupal\KernelTests\Core\Database core/tests/Drupal/KernelTests/Core/Database/SelectLeastTest.php Tests the SQL LEAST operator.
SelectOrderedTest class Drupal\KernelTests\Core\Database core/tests/Drupal/KernelTests/Core/Database/SelectOrderedTest.php Tests the Select query builder.
SelectPagerDefaultTest class Drupal\Tests\system\Functional\Database core/modules/system/tests/src/Functional/Database/SelectPagerDefaultTest.php Tests the pager query select extender.
SelectProfileForm class Drupal\Core\Installer\Form core/lib/Drupal/Core/Installer/Form/SelectProfileForm.php Provides the profile selection form. 1
SelectSubqueryTest class Drupal\KernelTests\Core\Database core/tests/Drupal/KernelTests/Core/Database/SelectSubqueryTest.php Tests the Select query builder.
SelectTableSortDefaultTest class Drupal\Tests\system\Functional\Database core/modules/system/tests/src/Functional/Database/SelectTableSortDefaultTest.php Tests the tablesort query extender.
SelectTest class Drupal\KernelTests\Core\Database core/tests/Drupal/KernelTests/Core/Database/SelectTest.php Tests the Select query builder.
SemanticVersion class Drupal\Composer\Util composer/Util/SemanticVersion.php Utility methods for manipulating semantic versions. 1
SemVer final class Drupal\Composer\Plugin\RecipeUnpack composer/Plugin/RecipeUnpack/SemVer.php Helper class to manipulate semantic versioning constraints. 1
SemVerTest class Drupal\Tests\Composer\Plugin\Unpack core/tests/Drupal/Tests/Composer/Plugin/Unpack/SemVerTest.php Tests Drupal\Composer\Plugin\RecipeUnpack\SemVer.
SendmailCommandValidationTransportFactory class Drupal\Core\Mailer\Transport core/lib/Drupal/Core/Mailer/Transport/SendmailCommandValidationTransportFactory.php Command validation decorator for sendmail transport factory.
SeparatorTranslationTest class Drupal\Tests\datetime_range\Kernel core/modules/datetime_range/tests/src/Kernel/SeparatorTranslationTest.php Test to ensure the datetime range separator is translatable.
Sequence class Drupal\Core\Config\Schema core/lib/Drupal/Core/Config/Schema/Sequence.php Defines a configuration element of type Sequence. 2 1
SequenceDataDefinition class Drupal\Core\Config\Schema core/lib/Drupal/Core/Config/Schema/SequenceDataDefinition.php A typed data definition class for defining sequences in configuration. 4 1
SequencesTableRemovalUpdateTest class Drupal\Tests\system\Functional\Update core/modules/system/tests/src/Functional/Update/SequencesTableRemovalUpdateTest.php Tests the upgrade path for removing the sequences table.
SequentiallyConstraint class Drupal\Core\Validation\Plugin\Validation\Constraint core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/SequentiallyConstraint.php Checks constraints sequentially and shows the error from the first. 1
SequentiallyConstraintValidatorTest class Drupal\KernelTests\Core\Validation core/tests/Drupal/KernelTests/Core/Validation/SequentiallyConstraintValidatorTest.php Tests Sequentially validation constraint with both valid and invalid values.
SerializationHooks class Drupal\serialization\Hook core/modules/serialization/src/Hook/SerializationHooks.php Hook implementations for serialization.
SerializationInterface interface Drupal\Component\Serialization core/lib/Drupal/Component/Serialization/SerializationInterface.php Defines an interface for serialization formats. 4 5
SerializationServiceProvider class Drupal\serialization core/modules/serialization/src/SerializationServiceProvider.php Serialization dependency injection container.

Other projects


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