Classes, traits, and interfaces - 11.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 1518

Name Deprecated Object type Namespace File name Summary Direct uses Use statements Strings
ConfigRenameEvent class Drupal\Core\Config core/lib/Drupal/Core/Config/ConfigRenameEvent.php Configuration event fired when renaming a configuration object. 3
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.
ConfigSchemaTestHooks class Drupal\config_schema_test\Hook core/modules/config/tests/config_schema_test/src/Hook/ConfigSchemaTestHooks.php Hook implementations for config_schema_test.
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.
ConfigSnapshotTest class Drupal\KernelTests\Core\Config core/tests/Drupal/KernelTests/Core/Config/ConfigSnapshotTest.php Tests config snapshot creation and updating.
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
ConfigSyncReadmeUpdateTest class Drupal\Tests\system\Functional\Update core/modules/system/tests/src/Functional/Update/ConfigSyncReadmeUpdateTest.php Tests update to readme inside the configuration synchronization directory.
ConfigTarget final class Drupal\Core\Form core/lib/Drupal/Core/Form/ConfigTarget.php Represents the mapping of a config property to a form element. 9
ConfigTargetTest class Drupal\Tests\Core\Form core/tests/Drupal/Tests/Core/Form/ConfigTargetTest.php @coversDefaultClass \Drupal\Core\Form\ConfigTarget @group Form
ConfigTargetTest class Drupal\Tests\system\Functional\Form core/modules/system/tests/src/Functional/Form/ConfigTargetTest.php Tests forms using #config_target.
ConfigTargetTest class Drupal\Tests\system\FunctionalJavascript\Form core/modules/system/tests/src/FunctionalJavascript/Form/ConfigTargetTest.php Tests forms using #config_target and #ajax together.
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\migrate\Unit\destination core/modules/migrate/tests/src/Unit/destination/ConfigTest.php @coversDefaultClass \Drupal\migrate\Plugin\migrate\destination\Config @group migrate
ConfigTest class Drupal\config_test\Entity core/modules/config/tests/config_test/src/Entity/ConfigTest.php Defines the ConfigTest configuration entity. 3 10
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\Core\Config core/tests/Drupal/Tests/Core/Config/ConfigTest.php Tests the Config.
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
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. 1
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. 2
ConfigTestHooks class Drupal\config_test\Hook core/modules/config/tests/config_test/src/Hook/ConfigTestHooks.php Hook implementations for config_test.
ConfigTestHooksHooks class Drupal\config_test\Hook core/modules/config/tests/config_test/src/Hook/ConfigTestHooksHooks.php Hook implementations for config_test.
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. 1
ConfigTestResourceTestBase abstract class Drupal\Tests\config_test\Functional\Rest core/modules/config/tests/config_test/tests/src/Functional/Rest/ConfigTestResourceTestBase.php 6
ConfigTestRestHooks class Drupal\config_test_rest\Hook core/modules/rest/tests/modules/config_test_rest/src/Hook/ConfigTestRestHooks.php Hook implementations for config_test_rest.
ConfigTestStorage class Drupal\config_test core/modules/config/tests/config_test/src/ConfigTestStorage.php 2
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.

Other projects


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