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
ConfigOverrideTest class Drupal\KernelTests\Core\Config core/tests/Drupal/KernelTests/Core/Config/ConfigOverrideTest.php Tests configuration overrides via $config in settings.php.
ConfigPrefixLengthException class Drupal\Core\Config core/lib/Drupal/Core/Config/ConfigPrefixLengthException.php Exception thrown when the config prefix length is exceeded. 1
ConfigQueryTest class Drupal\config_test\Entity core/modules/config/tests/config_test/src/Entity/ConfigQueryTest.php Defines the ConfigQueryTest configuration entity used by the query test. 1
ConfigRenameEvent class Drupal\Core\Config core/lib/Drupal/Core/Config/ConfigRenameEvent.php Configuration event fired when renaming a configuration object. 2
ConfigSchemaAlterException class Drupal\Core\Config\Schema core/lib/Drupal/Core/Config/Schema/ConfigSchemaAlterException.php Exception for when hook_config_schema_info_alter() adds or removes schema. 2
ConfigSchemaChecker class Drupal\Core\Config\Development core/lib/Drupal/Core/Config/Development/ConfigSchemaChecker.php Listens to the config save event and validates schema. 2
ConfigSchemaDeprecationTest class Drupal\KernelTests\Core\Config core/tests/Drupal/KernelTests/Core/Config/ConfigSchemaDeprecationTest.php Tests config schema deprecation.
ConfigSchemaDiscovery class Drupal\Core\Config\Schema core/lib/Drupal/Core/Config/Schema/ConfigSchemaDiscovery.php Allows YAML files to define config schema types. 1
ConfigSchemaTest class Drupal\KernelTests\Core\Config core/tests/Drupal/KernelTests/Core/Config/ConfigSchemaTest.php Tests schema for configuration objects.
ConfigSingleExportForm class Drupal\config\Form core/modules/config/src/Form/ConfigSingleExportForm.php Provides a form for exporting a single configuration file. 1
ConfigSingleImportExportTest class Drupal\Tests\config\Functional core/modules/config/tests/src/Functional/ConfigSingleImportExportTest.php Tests the user interface for importing/exporting a single configuration.
ConfigSingleImportForm class Drupal\config\Form core/modules/config/src/Form/ConfigSingleImportForm.php Provides a form for importing a single configuration file. 1
ConfigSnapshotSubscriber class Drupal\Core\EventSubscriber core/lib/Drupal/Core/EventSubscriber/ConfigSnapshotSubscriber.php Create a snapshot when config is imported. 2
ConfigSnapshotTest class Drupal\KernelTests\Core\Config core/tests/Drupal/KernelTests/Core/Config/ConfigSnapshotTest.php Tests config snapshot creation and updating.
ConfigStorageStagingTest class Drupal\KernelTests\Core\Config core/tests/Drupal/KernelTests/Core/Config/ConfigStorageStagingTest.php Tests that the service "config.storage.staging" has been deprecated.
ConfigStorageTestBase abstract class Drupal\KernelTests\Core\Config\Storage core/tests/Drupal/KernelTests/Core/Config/Storage/ConfigStorageTestBase.php Base class for testing storage operations. 6
ConfigSubscriber class Drupal\config core/modules/config/src/ConfigSubscriber.php Config subscriber. 2
ConfigSubscriber class Drupal\language\EventSubscriber core/modules/language/src/EventSubscriber/ConfigSubscriber.php Deletes the container if default language has changed. 1 2
ConfigSync class Drupal\config\Form core/modules/config/src/Form/ConfigSync.php Construct the storage changes in a configuration synchronization form. 1
ConfigTest class Drupal\config_test\Entity core/modules/config/tests/config_test/src/Entity/ConfigTest.php Defines the ConfigTest configuration entity. 1 6
ConfigTest class Drupal\Tests\migrate_drupal\Kernel\Plugin\migrate\source\d8 core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/d8/ConfigTest.php Tests the config source plugin.
ConfigTest class Drupal\Tests\migrate\Unit\destination core/modules/migrate/tests/src/Unit/destination/ConfigTest.php @coversDefaultClass \Drupal\migrate\Plugin\migrate\destination\Config @group migrate
ConfigTest class Drupal\Tests\system\Functional\File core/modules/system/tests/src/Functional/File/ConfigTest.php Tests file system configuration operations.
ConfigTest class Drupal\Tests\Composer\Plugin\ProjectMessage core/tests/Drupal/Tests/Composer/Plugin/ProjectMessage/ConfigTest.php @coversDefaultClass Drupal\Composer\Plugin\ProjectMessage\Message @group ProjectMessage
ConfigTest class Drupal\Tests\Composer\Plugin\VendorHardening core/tests/Drupal/Tests/Composer/Plugin/VendorHardening/ConfigTest.php @coversDefaultClass Drupal\Composer\Plugin\VendorHardening\Config @group VendorHardening
ConfigTest class Drupal\Tests\Core\Config core/tests/Drupal/Tests/Core/Config/ConfigTest.php Tests the Config.
ConfigTestAccessControlHandler class Drupal\config_test core/modules/config/tests/config_test/src/ConfigTestAccessControlHandler.php Defines the access control handler for the config_test entity type.
ConfigTestController class Drupal\config_test core/modules/config/tests/config_test/src/ConfigTestController.php Route controller class for the config_test module.
ConfigTestForm class Drupal\config_test core/modules/config/tests/config_test/src/ConfigTestForm.php Form controller for the test config edit forms.
ConfigTestHalJsonAnonTest class Drupal\Tests\hal\Functional\config core/modules/hal/tests/src/Functional/config/ConfigTestHalJsonAnonTest.php @group hal @group legacy
ConfigTestHalJsonBasicAuthTest class Drupal\Tests\hal\Functional\config core/modules/hal/tests/src/Functional/config/ConfigTestHalJsonBasicAuthTest.php @group hal @group legacy
ConfigTestHalJsonCookieTest class Drupal\Tests\hal\Functional\config core/modules/hal/tests/src/Functional/config/ConfigTestHalJsonCookieTest.php @group hal @group legacy
ConfigTestInterface interface Drupal\config_test core/modules/config/tests/config_test/src/ConfigTestInterface.php Provides an interface defining a config_test entity. 1 1
ConfigTestJsonAnonTest class Drupal\Tests\config_test\Functional\Rest core/modules/config/tests/config_test/tests/src/Functional/Rest/ConfigTestJsonAnonTest.php @group rest
ConfigTestJsonBasicAuthTest class Drupal\Tests\config_test\Functional\Rest core/modules/config/tests/config_test/tests/src/Functional/Rest/ConfigTestJsonBasicAuthTest.php @group rest
ConfigTestJsonCookieTest class Drupal\Tests\config_test\Functional\Rest core/modules/config/tests/config_test/tests/src/Functional/Rest/ConfigTestJsonCookieTest.php @group rest
ConfigTestListBuilder class Drupal\config_test core/modules/config/tests/config_test/src/ConfigTestListBuilder.php Defines a class to build a listing of ConfigTest entities.
ConfigTestResourceTestBase abstract class Drupal\Tests\config_test\Functional\Rest core/modules/config/tests/config_test/tests/src/Functional/Rest/ConfigTestResourceTestBase.php 9 3
ConfigTestStorage class Drupal\config_test core/modules/config/tests/config_test/src/ConfigTestStorage.php @todo.
ConfigTestTest class Drupal\Tests\jsonapi\Functional core/modules/jsonapi/tests/src/Functional/ConfigTestTest.php JSON:API integration test for the "ConfigTest" config entity type.
ConfigTestTrait trait Drupal\Tests core/tests/Drupal/Tests/ConfigTestTrait.php Provides helper methods to deal with config system objects in tests. 1
ConfigTestXmlAnonTest class Drupal\Tests\config_test\Functional\Rest core/modules/config/tests/config_test/tests/src/Functional/Rest/ConfigTestXmlAnonTest.php @group rest
ConfigTestXmlBasicAuthTest class Drupal\Tests\config_test\Functional\Rest core/modules/config/tests/config_test/tests/src/Functional/Rest/ConfigTestXmlBasicAuthTest.php @group rest
ConfigTestXmlCookieTest class Drupal\Tests\config_test\Functional\Rest core/modules/config/tests/config_test/tests/src/Functional/Rest/ConfigTestXmlCookieTest.php @group rest
ConfigTranslationAddForm class Drupal\config_translation\Form core/modules/config_translation/src/Form/ConfigTranslationAddForm.php Defines a form for adding configuration translations. 1
ConfigTranslationBlockListBuilder class Drupal\config_translation\Controller core/modules/config_translation/src/Controller/ConfigTranslationBlockListBuilder.php Defines the config translation list builder for blocks.
ConfigTranslationCacheTest class Drupal\Tests\config_translation\Functional core/modules/config_translation/tests/src/Functional/ConfigTranslationCacheTest.php Translate settings and entities to various languages.
ConfigTranslationContextualLink class Drupal\config_translation\Plugin\Menu\ContextualLink core/modules/config_translation/src/Plugin/Menu/ContextualLink/ConfigTranslationContextualLink.php Defines a contextual link plugin with a dynamic title.
ConfigTranslationContextualLinks class Drupal\config_translation\Plugin\Derivative core/modules/config_translation/src/Plugin/Derivative/ConfigTranslationContextualLinks.php Provides dynamic contextual links for configuration translation. 1
ConfigTranslationController class Drupal\config_translation\Controller core/modules/config_translation/src/Controller/ConfigTranslationController.php Provides page callbacks for the configuration translation interface.

Other projects


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