Classes, traits, and interfaces - 9.5.x - drupal
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 |
|---|---|---|---|---|---|---|---|---|
| StringFormatterTest | class | Drupal\Tests\field\Kernel\String | core/ |
Tests the creation of text fields. | ||||
| StringIdEntityTest | class | Drupal\migrate_entity_test\Entity | core/ |
Defines a content entity type that has a string ID. | 1 | |||
| StringInterface | interface | Drupal\Core\TypedData\Type | core/ |
Interface for strings. | 2 | 8 | ||
| StringInterface | interface | Drupal\locale | core/ |
Defines the locale string interface. | 1 | 3 | ||
| StringItem | class | Drupal\Core\Field\Plugin\Field\FieldType | core/ |
Defines the 'string' entity field type. | 8 | 6 | ||
| StringItemBase | abstract class | Drupal\Core\Field\Plugin\Field\FieldType | core/ |
Base class for string field types. | 2 | |||
| StringListField | class | Drupal\options\Plugin\views\argument | core/ |
Argument handler for list field to show the human readable name in summary. | ||||
| StringLoader | class | Drupal\Core\Template\Loader | core/ |
Loads string templates, also known as inline templates. | 3 | 2 | ||
| StringLongItem | class | Drupal\Core\Field\Plugin\Field\FieldType | core/ |
Defines the 'string_long' field type. | ||||
| StringNormalizer | class | Drupal\jsonapi_test_data_type\Normalizer | core/ |
Normalizes string data weirdly: replaces 'super' with 'NOT' and vice versa. | 2 | |||
| StringNormalizer | class | Drupal\jsonapi_test_field_type\Normalizer | core/ |
Normalizes string fields weirdly: replaces 'super' with 'NOT' and vice versa. | 2 | |||
| StringObject | class | Drupal\Tests\Component\Assertion | core/ |
Quick class for testing for objects with __toString. | ||||
| StringSerializationTest | class | Drupal\KernelTests\Core\DependencyInjection | core/ |
Tests serialization of string services. | ||||
| StringStorageException | class | Drupal\locale | core/ |
Defines an exception thrown when storage operations fail. | 1 | |||
| StringStorageInterface | interface | Drupal\locale | core/ |
Defines the locale string storage interface. | 1 | 1 | ||
| StringTextareaWidget | class | Drupal\Core\Field\Plugin\Field\FieldWidget | core/ |
Plugin implementation of the 'string_textarea' widget. | 1 | 1 | ||
| StringTextfieldWidget | class | Drupal\Core\Field\Plugin\Field\FieldWidget | core/ |
Plugin implementation of the 'string_textfield' widget. | 2 | 2 | ||
| StringTranslationTrait | trait | Drupal\Core\StringTranslation | core/ |
Wrapper methods for \Drupal\Core\StringTranslation\TranslationInterface. | 154 | |||
| StringTranslationTraitTest | class | Drupal\Tests\Core\StringTranslation | core/ |
@coversDefaultClass \Drupal\Core\StringTranslation\StringTranslationTrait[[api-linebreak]] @group StringTranslation | ||||
| StubConnection | class | Drupal\Tests\Core\Database\Stub | core/ |
A stub of the abstract Connection class for testing purposes. | 5 | |||
| StubFallbackPluginManager | class | Drupal\Tests\Component\Plugin | core/ |
Stubs \Drupal\Component\Plugin\FallbackPluginManagerInterface. | ||||
| StubForm | class | Drupal\Tests\system\Functional\Form | core/ |
Provides a stub form for testing purposes. | ||||
| StubNegotiationMiddleware | class | Drupal\Tests\Core\StackMiddleware | core/ |
|||||
| StubPDO | class | Drupal\Tests\Core\Database\Stub | core/ |
A stub of \PDO for testing purposes. | 9 | |||
| StubPluginManagerBaseWithMapper | final class | Drupal\Tests\Component\Plugin | core/ |
Stubs \Drupal\Component\Plugin\PluginManagerBase to take a MapperInterface. | ||||
| StubReflectionFactory | class | Drupal\Tests\Component\Plugin\Factory | core/ |
Override ReflectionFactory because ::createInstance() calls a static method. | ||||
| StubRequestHandlerResourcePlugin | class | Drupal\Tests\rest\Kernel | core/ |
Stub class where we can prophesize methods. | ||||
| StubSourceGeneratorPlugin | class | Drupal\Tests\migrate\Unit | core/ |
Defines a stubbed source plugin with a generator as iterator. | ||||
| StubSourcePlugin | class | Drupal\Tests\migrate\Unit | core/ |
Stubbed source plugin for testing base class implementations. | 1 | |||
| StubTestSuiteBase | class | Drupal\Tests\Core\Test | core/ |
Stub subclass of TestSuiteBase. | ||||
| StubTestTrait | trait | Drupal\migrate_drupal\Tests | core/ |
Provides common functionality for testing stubbing. | 10 | |||
| StubThemeHandler | class | Drupal\Tests\Core\Extension | core/ |
Extends the default theme handler to mock some drupal_ methods. | ||||
| StubVariableTestClass | class | Drupal\Tests\Component\Utility | core/ |
No-op test class for VariableTest::testExport(). | ||||
| Style | class | Drupal\ckeditor5\Plugin\CKEditor5Plugin | core/ |
CKEditor 5 Style plugin configuration. | 3 | 1 | ||
| StyleFieldsTest | class | Drupal\Tests\views\Kernel\Plugin | core/ |
Tests fields style functionality. | ||||
| StyleGridTest | class | Drupal\Tests\views\Kernel\Plugin | core/ |
Tests the grid style plugin. | ||||
| StyleHtmlListTest | class | Drupal\Tests\views\Kernel\Plugin | core/ |
Tests the HTML list style plugin. | ||||
| StyleMappingTest | class | Drupal\Tests\views\Kernel\Plugin | core/ |
Tests mapping style functionality. | ||||
| StyleOpmlTest | class | Drupal\Tests\aggregator\Functional\Views\Plugin | core/ |
Tests the OPML feed style plugin. | ||||
| StylePluginBase | abstract class | Drupal\views\Plugin\views\style | core/ |
Base class for views style plugins. | 12 | 4 | ||
| StylePluginTest | class | Drupal\Tests\ckeditor5\Unit | core/ |
@coversDefaultClass \Drupal\ckeditor5\Plugin\CKEditor5Plugin\Style[[api-linebreak]] @group ckeditor5 @internal | ||||
| StylesCombo | class | Drupal\ckeditor\Plugin\CKEditorPlugin | core/ |
Defines the "stylescombo" plugin. | ||||
| StyleSensibleElementConstraint | class | Drupal\ckeditor5\Plugin\Validation\Constraint | core/ |
Styles can only be specified for HTML5 tags and extra classes. | ||||
| StyleSensibleElementConstraintValidator | class | Drupal\ckeditor5\Plugin\Validation\Constraint | core/ |
Styles can only be specified for HTML5 tags and extra classes. | ||||
| StyleSerializerKernelTest | class | Drupal\Tests\hal\Kernel\rest\Views | core/ |
@coversDefaultClass \Drupal\rest\Plugin\views\style\Serializer[[api-linebreak]] @group hal @group legacy | ||||
| StyleSerializerKernelTest | class | Drupal\Tests\rest\Kernel\Views | core/ |
@coversDefaultClass \Drupal\rest\Plugin\views\style\Serializer[[api-linebreak]] @group views | ||||
| StyleSerializerTest | class | Drupal\Tests\rest\Functional\Views | core/ |
Tests the serializer style plugin. | ||||
| StyleSerializerTest | class | Drupal\Tests\hal\Functional\rest\Views | core/ |
Tests the serializer style plugin. | ||||
| StyleSummaryTest | class | Drupal\Tests\views\Functional\Plugin | core/ |
Tests the summary style plugin. | ||||
| StyleTableTest | class | Drupal\Tests\views\Functional\Plugin | core/ |
Tests the table style views plugin. |
Pagination
- Previous page
- Page 157
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.