Classes, traits, and interfaces - 8.9.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 1511
Name | Deprecated | Object type | Namespace | File name | Summary | Direct uses | Use statements | Strings |
---|---|---|---|---|---|---|---|---|
JsonEncoder | class | Drupal\hal\Encoder | core/ |
Encodes HAL data in JSON. | 1 | 2 | ||
JsonEncoderTest | class | Drupal\Tests\serialization\Unit\Encoder | core/ |
@coversDefaultClass \Drupal\serialization\Encoder\JsonEncoder @group serialization | ||||
JsonRenderer | class | Drupal\common_test\Render\MainContent | core/ |
Default main content renderer for JSON requests. | 2 | |||
JsonTest | class | Drupal\Tests\Component\Serialization | core/ |
@coversDefaultClass \Drupal\Component\Serialization\Json @group Serialization | ||||
JsOptimizer | class | Drupal\Core\Asset | core/ |
Optimizes a JavaScript asset. | 1 | 2 | ||
JsOptimizerUnitTest | class | Drupal\Tests\Core\Asset | core/ |
Tests the JS asset optimizer. | ||||
JSWebAssert | class | Drupal\FunctionalJavascriptTests | core/ |
Defines a class with methods for asserting presence of elements during tests. | 1 | |||
JSWebAssertTest | class | Drupal\FunctionalJavascriptTests\Tests | core/ |
Tests for the JSWebAssert class. | 1 | |||
JsWebAssertTestForm | class | Drupal\js_webassert_test\Form | core/ |
Test form for JSWebAssert JavaScriptTestBase. | 1 | |||
JSWebWithWebDriverAssertTest | class | Drupal\FunctionalJavascriptTests\Tests | core/ |
Tests for the JSWebAssert class using webdriver. | ||||
JUnitConverter | class | Drupal\Core\Test | core/ |
Converts JUnit XML to Drupal's {simpletest} schema. | 2 | |||
JUnitConverterTest | class | Drupal\Tests\Core\Test | core/ |
Tests Drupal\Core\Test\JUnitConverter. | ||||
Kale | class | Drupal\plugin_test\Plugin\plugin_test\fruit | core/ |
Plugin annotation @Plugin( id = "kale", label = "Kale", color = "green" ) | ||||
KernelAssertLegacyTraitTest | class | Drupal\Tests\Core\Assert | core/ |
@coversDefaultClass \Drupal\KernelTests\AssertLegacyTrait @group Assert @group legacy | ||||
KernelDestructionSubscriber | class | Drupal\Core\EventSubscriber | core/ |
Destructs services that are initiated and tagged with "needs_destruction". | 2 | |||
KernelMissingDependentModuleMethodTest | class | Drupal\KernelTests | core/ |
A fixture test class with requires annotation. | ||||
KernelMissingDependentModuleTest | class | Drupal\KernelTests | core/ |
A fixture test class with requires annotation. | ||||
KernelPreHandle | class | Drupal\Core\StackMiddleware | core/ |
Prepares the environment after page caching ran. | 2 | |||
KernelTestBase | abstract class | Drupal\KernelTests | core/ |
Base class for functional integration tests. | 539 | 543 | ||
KernelTestBase | in drupal:8.0.0 and is removed from drupal:9.0.0. Use \Drupal\KernelTests\KernelTestBase instead. |
abstract class | Drupal\simpletest | core/ |
Base class for functional integration tests. | 4 | 4 | |
KernelTestBaseShutdownTest | class | Drupal\KernelTests | core/ |
@coversDefaultClass \Drupal\KernelTests\KernelTestBase | ||||
KernelTestBaseTest | class | Drupal\KernelTests | core/ |
@coversDefaultClass \Drupal\KernelTests\KernelTestBase | 1 | |||
KernelTestBaseTest | class | Drupal\Tests\Core\Test | core/ |
@group Test @group legacy | ||||
KernelTestBaseTest | class | Drupal\simpletest\Tests | core/ |
Tests KernelTestBase functionality. | ||||
KernelTestSuite | class | Drupal\Tests\TestSuites | core/ |
Discovers tests for the kernel test suite. | ||||
KeyValueContentEntityStorage | class | Drupal\Core\Entity\KeyValueStore | core/ |
Provides a key value backend for content entities. | ||||
KeyValueContentEntityStorageTest | class | Drupal\KernelTests\Core\KeyValueStore | core/ |
Tests KeyValueEntityStorage for content entities. | ||||
KeyValueDatabaseExpirableFactory | class | Drupal\Core\KeyValueStore | core/ |
Defines the key/value store factory for the database backend. | 1 | 2 | ||
KeyValueDatabaseFactory | class | Drupal\Core\KeyValueStore | core/ |
Defines the key/value store factory for the database backend. | 2 | |||
KeyValueEntityStorage | class | Drupal\Core\Entity\KeyValueStore | core/ |
Provides a key value backend for entities. | 1 | 1 | ||
KeyValueEntityStorageTest | class | Drupal\Tests\Core\Entity\KeyValueStore | core/ |
@coversDefaultClass \Drupal\Core\Entity\KeyValueStore\KeyValueEntityStorage @group Entity | ||||
KeyValueExpirableFactory | class | Drupal\Core\KeyValueStore | core/ |
Defines the key/value store factory. | 2 | 2 | ||
KeyValueExpirableFactoryInterface | interface | Drupal\Core\KeyValueStore | core/ |
Defines the expirable key/value store factory interface. | 3 | 4 | ||
KeyValueFactory | class | Drupal\Core\KeyValueStore | core/ |
Defines the key/value store factory. | 1 | 3 | 2 | |
KeyValueFactoryInterface | interface | Drupal\Core\KeyValueStore | core/ |
Defines the key/value store factory interface. | 3 | 17 | ||
KeyValueMemoryFactory | class | Drupal\Core\KeyValueStore | core/ |
Defines the key/value store factory for the memory backend. | 5 | |||
KeyValueNullExpirableFactory | class | Drupal\Core\KeyValueStore | core/ |
Defines the key/value store factory for the null backend. | ||||
KeyValueStoreExpirableInterface | interface | Drupal\Core\KeyValueStore | core/ |
Defines the interface for expiring data in a key/value store. | 2 | 6 | ||
KeyValueStoreInterface | interface | Drupal\Core\KeyValueStore | core/ |
Defines the interface for key/value store implementations. | 2 | 8 | ||
KillSwitch | class | Drupal\Core\PageCache\ResponsePolicy | core/ |
A policy evaluating to static::DENY when the kill switch was triggered. | 1 | 2 | ||
Label | class | Drupal\Core\Render\Element | core/ |
Provides a render element for displaying the label for a form element. | ||||
LabelOnlyResourceObject | final class | Drupal\jsonapi\JsonApiResource | core/ |
Value object decorating a ResourceObject; only its label is available. | 2 | |||
LangcodeToAsciiUpdateFilledTest | class | Drupal\Tests\system\Functional\Entity\Update | core/ |
Runs LangcodeToAsciiUpdateTest with a dump filled with content. | ||||
LangcodeToAsciiUpdateTest | class | Drupal\Tests\system\Functional\Entity\Update | core/ |
Tests that the entity langcode fields have been updated to varchar_ascii. | 1 | |||
Language | class | Drupal\ckeditor\Plugin\CKEditorPlugin | core/ |
Defines the "language" plugin. | 1 | |||
Language | class | Drupal\Core\TypedData\Plugin\DataType | core/ |
Defines the 'language' data type. | ||||
Language | class | Drupal\Core\Language | core/ |
An object containing the information for an interface language. | 58 | |||
Language | class | Drupal\language\Plugin\migrate\source | core/ |
Plugin annotation @MigrateSource( id = "language", source_module = "locale" ) | ||||
Language | class | Drupal\language\Plugin\Condition | core/ |
Provides a 'Language' condition. | ||||
LanguageAccessControlHandler | class | Drupal\language | core/ |
Defines the access control handler for the language entity type. |
Pagination
- Previous page
- Page 90
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.