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
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.
Select class Drupal\driver_test\Driver\Database\DrivertestMysql core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysql/Select.php MySQL test implementation of \Drupal\Core\Database\Query\Select.
Select class Drupal\driver_test\Driver\Database\DrivertestMysqlDeprecatedVersion core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysqlDeprecatedVersion/Select.php MySQL test implementation of \Drupal\Core\Database\Query\Select.
Select class Drupal\driver_test\Driver\Database\DrivertestPgsql core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestPgsql/Select.php PostgreSQL implementation of \Drupal\Core\Database\Query\Select.
Select class Drupal\pgsql\Driver\Database\pgsql core/modules/pgsql/src/Driver/Database/pgsql/Select.php PostgreSQL implementation of \Drupal\Core\Database\Query\Select. 2 2
Select class Drupal\sqlite\Driver\Database\sqlite core/modules/sqlite/src/Driver/Database/sqlite/Select.php SQLite implementation of \Drupal\Core\Database\Query\Select. 1 1
Select class Drupal\mysql\Driver\Database\mysql core/modules/mysql/src/Driver/Database/mysql/Select.php MySQL implementation of \Drupal\Core\Database\Query\Select. 2 2
Select class Drupal\corefake\Driver\Database\corefakeWithAllCustomClasses core/tests/fixtures/database_drivers/module/corefake/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. 1
Select

in drupal:9.4.0 and is removed from drupal:11.0.0. The SQLite database driver has been moved to the sqlite module.

class Drupal\Core\Database\Driver\sqlite core/lib/Drupal/Core/Database/Driver/sqlite/Select.php SQLite implementation of \Drupal\Core\Database\Query\Select. 1
Select

in drupal:9.4.0 and is removed from drupal:11.0.0. The PostgreSQL database driver has been moved to the pgsql module.

class Drupal\Core\Database\Driver\pgsql core/lib/Drupal/Core/Database/Driver/pgsql/Select.php PostgreSQL implementation of \Drupal\Core\Database\Query\Select. 1
Select class Drupal\Core\Database\Query core/lib/Drupal/Core/Database/Query/Select.php Query builder for SELECT statements. 5 8
Select class Drupal\Tests\Core\Database\Stub core/tests/Drupal/Tests/Core/Database/Stub/Select.php
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.
SelectInterface interface Drupal\Core\Database\Query core/lib/Drupal/Core/Database/Query/SelectInterface.php Interface definition for a Select Query object. 2 28
SelectionInterface interface Drupal\Core\Entity\EntityReferenceSelection core/lib/Drupal/Core/Entity/EntityReferenceSelection/SelectionInterface.php Interface definition for Entity Reference Selection plugins. 1 1
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 2
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
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. 1 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. 2 1
SerializationInterface interface Drupal\Component\Serialization core/lib/Drupal/Component/Serialization/SerializationInterface.php Defines an interface for serialization formats. 7 7
SerializationServiceProvider class Drupal\serialization core/modules/serialization/src/SerializationServiceProvider.php Serialization dependency injection container.
SerializationSettingsDeletionUpdateTest class Drupal\Tests\serialization\Functional\Update core/modules/serialization/tests/src/Functional/Update/SerializationSettingsDeletionUpdateTest.php Ensures that update hook is run properly for deleting obsolete serialization settings.
SerializationTest class Drupal\Tests\serialization\Kernel core/modules/serialization/tests/src/Kernel/SerializationTest.php Functional tests for serialization system.
SerializationTestEncoder class Drupal\serialization_test core/modules/serialization/tests/serialization_test/src/SerializationTestEncoder.php 2
SerializationTestNormalizer class Drupal\serialization_test core/modules/serialization/tests/serialization_test/src/SerializationTestNormalizer.php 2
Serialized class Drupal\views\Plugin\views\field core/modules/views/src/Plugin/views/field/Serialized.php Field handler to show data of serialized fields.
SerializedColumnNormalizerTrait trait Drupal\serialization\Normalizer core/modules/serialization/src/Normalizer/SerializedColumnNormalizerTrait.php A trait providing methods for serialized columns. 2
SerializedItem class Drupal\entity_test\Plugin\Field\FieldType core/modules/system/tests/modules/entity_test/src/Plugin/Field/FieldType/SerializedItem.php Defines the 'serialized_item' entity field type.
SerializedPropertyItem class Drupal\entity_test\Plugin\Field\FieldType core/modules/system/tests/modules/entity_test/src/Plugin/Field/FieldType/SerializedPropertyItem.php Defines the 'serialized_property_item_test' entity field type.
SerializeQueryTest class Drupal\KernelTests\Core\Database core/tests/Drupal/KernelTests/Core/Database/SerializeQueryTest.php Tests serializing and unserializing a query.
Serializer final class Drupal\jsonapi\Serializer core/modules/jsonapi/src/Serializer/Serializer.php Overrides the Symfony serializer to cordon off our incompatible normalizers. 2

Other projects


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