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
StatusExtraTest class Drupal\Tests\node\Functional\Views core/modules/node/tests/src/Functional/Views/StatusExtraTest.php Tests the node.status_extra field handler.
StatusItem class Drupal\user core/modules/user/src/StatusItem.php Defines the 'status' entity field type. 3
StatusMessages class Drupal\Core\Render\Element core/lib/Drupal/Core/Render/Element/StatusMessages.php Provides a messages element.
StatusProfileWithoutVersionTest class Drupal\Tests\system\Functional\System core/modules/system/tests/src/Functional/System/StatusProfileWithoutVersionTest.php Tests the Status Report page if the installation profile has no version.
StatusReport class Drupal\Core\Render\Element core/lib/Drupal/Core/Render/Element/StatusReport.php Creates status report page element. 2
StatusReportPage class Drupal\system\Element core/modules/system/src/Element/StatusReportPage.php Creates status report page element. 1
StatusReportPageTest class Drupal\Tests\system\Kernel\Element core/modules/system/tests/src/Kernel/Element/StatusReportPageTest.php Tests the status report page element.
StatusReportTest class Drupal\KernelTests\Core\Render\Element core/tests/Drupal/KernelTests/Core/Render/Element/StatusReportTest.php Tests the status report element.
StatusTest class Drupal\Tests\system\Functional\System core/modules/system/tests/src/Functional/System/StatusTest.php Tests output on the status overview page.
StickyNode class Drupal\node\Plugin\Action core/modules/node/src/Plugin/Action/StickyNode.php Makes a node sticky.
StorableConfigBase abstract class Drupal\Core\Config core/lib/Drupal/Core/Config/StorableConfigBase.php Provides a base class for configuration objects with storage support. 2 4
StorageBase abstract class Drupal\Core\KeyValueStore core/lib/Drupal/Core/KeyValueStore/StorageBase.php Provides a base class for key/value storage implementations. 2
StorageCacheInterface interface Drupal\Core\Config core/lib/Drupal/Core/Config/StorageCacheInterface.php Defines an interface for cached configuration storage. 1
StorageComparer class Drupal\Core\Config core/lib/Drupal/Core/Config/StorageComparer.php Defines a config storage comparer. 16
StorageComparerInterface interface Drupal\Core\Config core/lib/Drupal/Core/Config/StorageComparerInterface.php Defines an interface for comparison of configuration storage objects. 1
StorageComparerTest class Drupal\Tests\Core\Config core/tests/Drupal/Tests/Core/Config/StorageComparerTest.php Tests Drupal\Core\Config\StorageComparer.
StorageCopyTrait trait Drupal\Core\Config core/lib/Drupal/Core/Config/StorageCopyTrait.php Utility trait to copy configuration from one storage to another. 4
StorageCopyTraitTest class Drupal\Tests\Core\Config core/tests/Drupal/Tests/Core/Config/StorageCopyTraitTest.php Tests Drupal\Core\Config\StorageCopyTrait.
StorageException class Drupal\Core\Config core/lib/Drupal/Core/Config/StorageException.php An exception thrown in case of storage operation errors. 1
StorageInterface interface Drupal\Core\Config core/lib/Drupal/Core/Config/StorageInterface.php Defines an interface for configuration storage. 13 56
StorageManagerInterface interface Drupal\Core\Config core/lib/Drupal/Core/Config/StorageManagerInterface.php Interface for a storage manager. 2 1
StorageReplaceDataWrapper class Drupal\config core/modules/config/src/StorageReplaceDataWrapper.php Wraps a configuration storage to allow replacing specific configuration data. 2
StorageReplaceDataWrapperTest class Drupal\KernelTests\Core\Config\Storage core/tests/Drupal/KernelTests/Core/Config/Storage/StorageReplaceDataWrapperTest.php Tests StorageReplaceDataWrapper operations.
StorageTest class Drupal\Tests\views_ui\Functional core/modules/views_ui/tests/src/Functional/StorageTest.php Tests the UI of storage properties of views.
StorageTest class Drupal\Tests\system\Functional\Form core/modules/system/tests/src/Functional/Form/StorageTest.php Tests a multistep form using form storage.
StorageTestBase abstract class Drupal\KernelTests\Core\KeyValueStore core/tests/Drupal/KernelTests/Core/KeyValueStore/StorageTestBase.php Base class for testing key-value storages. 3
StorageTransformerException class Drupal\Core\Config core/lib/Drupal/Core/Config/StorageTransformerException.php Thrown by config storage transformers if they cannot acquire a lock. 2
StorageTransformEvent class Drupal\Core\Config core/lib/Drupal/Core/Config/StorageTransformEvent.php Class StorageTransformEvent. 2
StreamCapturer class Drupal\Tests core/tests/Drupal/Tests/StreamCapturer.php Captures output to a stream and stores it for retrieval.
StreamFileUploaderTest class Drupal\Tests\file\Kernel\Upload core/modules/file/tests/src/Kernel/Upload/StreamFileUploaderTest.php Tests the stream file uploader.
StreamWrapperInterface interface Drupal\Core\StreamWrapper core/lib/Drupal/Core/StreamWrapper/StreamWrapperInterface.php Defines a Drupal stream wrapper extension. 2 14
StreamWrapperManager class Drupal\Core\StreamWrapper core/lib/Drupal/Core/StreamWrapper/StreamWrapperManager.php Provides a StreamWrapper manager. 21 2
StreamWrapperManagerInterface interface Drupal\Core\StreamWrapper core/lib/Drupal/Core/StreamWrapper/StreamWrapperManagerInterface.php Provides a StreamWrapper manager. 1 25
StreamWrapperManagerTest class Drupal\KernelTests\Core\StreamWrapper core/tests/Drupal/KernelTests/Core/StreamWrapper/StreamWrapperManagerTest.php Tests Drupal\Core\StreamWrapper\StreamWrapperManager.
StreamWrapperTest class Drupal\KernelTests\Core\File core/tests/Drupal/KernelTests/Core/File/StreamWrapperTest.php Tests stream wrapper functions.
StringArgument class Drupal\views\Plugin\views\argument core/modules/views/src/Plugin/views/argument/StringArgument.php Argument handler for string. 2 2
StringBase abstract class Drupal\locale core/modules/locale/src/StringBase.php Defines the locale string base class. 2 1
StringBaseTest class Drupal\Tests\locale\Unit core/modules/locale/tests/src/Unit/StringBaseTest.php Tests Drupal\locale\StringBase.
StringData class Drupal\Core\TypedData\Plugin\DataType core/lib/Drupal/Core/TypedData/Plugin/DataType/StringData.php The string data type. 7 10 1
StringDatabaseStorage class Drupal\locale core/modules/locale/src/StringDatabaseStorage.php Defines a class to store localized strings in the database. 2
StringEqualsConcatenatedValuesConstraint class Drupal\Core\Validation\Plugin\Validation\Constraint core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/StringEqualsConcatenatedValuesConstraint.php Checks a string consists of specific values found in the mapping. 1
StringEqualsConcatenatedValuesConstraintValidator class Drupal\Core\Validation\Plugin\Validation\Constraint core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/StringEqualsConcatenatedValuesConstraintValidator.php Validates the StringEqualsConcatenatedValues constraint. 1
StringEqualsConcatenatedValuesConstraintValidatorTest class Drupal\KernelTests\Core\Validation core/tests/Drupal/KernelTests/Core/Validation/StringEqualsConcatenatedValuesConstraintValidatorTest.php Tests the StringEqualsConcatenatedValues validator.
StringFieldTest class Drupal\Tests\field\Functional\FunctionalString core/modules/field/tests/src/Functional/FunctionalString/StringFieldTest.php Tests the creation of string fields. 1 1
StringFilter class Drupal\views\Plugin\views\filter core/modules/views/src/Plugin/views/filter/StringFilter.php Basic textfield filter to handle string filtering commands. 1
StringFormatter class Drupal\Core\Field\Plugin\Field\FieldFormatter core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/StringFormatter.php Plugin implementation of the 'string' formatter. 2 2
StringFormatterTest final class Drupal\Tests\field\Unit\Plugin\Field\FieldFormatter core/modules/field/tests/src/Unit/Plugin/Field/FieldFormatter/StringFormatterTest.php Tests the string field formatter.
StringFormatterTest class Drupal\Tests\field\Kernel\KernelString core/modules/field/tests/src/Kernel/KernelString/StringFormatterTest.php Tests the creation of text fields.
StringIdEntityTest class Drupal\migrate_entity_test\Entity core/modules/migrate/tests/modules/migrate_entity_test/src/Entity/StringIdEntityTest.php Defines a content entity type that has a string ID. 1
StringInterface interface Drupal\locale core/modules/locale/src/StringInterface.php Defines the locale string interface. 1 3

Other projects


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