Classes, traits, and interfaces - 10.3.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
ConfigFactory class Drupal\Core\Config core/lib/Drupal/Core/Config/ConfigFactory.php Defines the configuration object factory. 3 2
ConfigFactoryInterface interface Drupal\Core\Config core/lib/Drupal/Core/Config/ConfigFactoryInterface.php Defines the interface for a configuration object factory. 1 157
ConfigFactoryOverrideBase abstract class Drupal\Core\Config core/lib/Drupal/Core/Config/ConfigFactoryOverrideBase.php Defines a base event listener implementation configuration overrides. 2 2
ConfigFactoryOverrideBaseTest class Drupal\Tests\Core\Config core/tests/Drupal/Tests/Core/Config/ConfigFactoryOverrideBaseTest.php @coversDefaultClass \Drupal\Core\Config\ConfigFactoryOverrideBase @group config
ConfigFactoryOverrideInterface interface Drupal\Core\Config core/lib/Drupal/Core/Config/ConfigFactoryOverrideInterface.php Defines the interface for a configuration factory override object. 8 8
ConfigFactoryTest class Drupal\Tests\Core\Config core/tests/Drupal/Tests/Core/Config/ConfigFactoryTest.php @group Config @coversDefaultClass \Drupal\Core\Config\ConfigFactory
ConfigFieldDefinitionTest class Drupal\Tests\field\Kernel core/modules/field/tests/src/Kernel/ConfigFieldDefinitionTest.php Tests exposing field definitions for configurable fields.
ConfigFieldMapper class Drupal\config_translation core/modules/config_translation/src/ConfigFieldMapper.php Configuration mapper for fields. 1
ConfigFieldMapperTest class Drupal\Tests\config_translation\Unit core/modules/config_translation/tests/src/Unit/ConfigFieldMapperTest.php Tests the functionality provided by the configuration field mapper.
ConfigFileContentTest class Drupal\KernelTests\Core\Config core/tests/Drupal/KernelTests/Core/Config/ConfigFileContentTest.php Tests reading and writing of configuration files.
ConfigFormBase abstract class Drupal\Core\Form core/lib/Drupal/Core/Form/ConfigFormBase.php Base class for implementing system configuration forms. 37 38
ConfigFormBaseTrait trait Drupal\Core\Form core/lib/Drupal/Core/Form/ConfigFormBaseTrait.php Provides access to configuration for forms. 5
ConfigFormBaseTraitTest class Drupal\Tests\Core\Form core/tests/Drupal/Tests/Core/Form/ConfigFormBaseTraitTest.php @coversDefaultClass \Drupal\Core\Form\ConfigFormBaseTrait @group Form
ConfigFormOverrideTest class Drupal\Tests\config\Functional core/modules/config/tests/src/Functional/ConfigFormOverrideTest.php Tests config overrides do not appear on forms that extend ConfigFormBase.
ConfigFormTestBase abstract class Drupal\KernelTests core/tests/Drupal/KernelTests/ConfigFormTestBase.php Full generic test suite for any form that data with the configuration system. 2 2
ConfigHandler class Drupal\views_ui\Form\Ajax core/modules/views_ui/src/Form/Ajax/ConfigHandler.php Provides a form for configuring an item in the Views UI.
ConfigHandlerExtra class Drupal\views_ui\Form\Ajax core/modules/views_ui/src/Form/Ajax/ConfigHandlerExtra.php Provides a form for configuring extra information for a Views UI item.
ConfigHandlerGroup class Drupal\views_ui\Form\Ajax core/modules/views_ui/src/Form/Ajax/ConfigHandlerGroup.php Provides a form for configuring grouping information for a Views UI handler.
ConfigImportAllTest class Drupal\Tests\config\Functional core/modules/config/tests/src/Functional/ConfigImportAllTest.php Tests the largest configuration import possible with all available modules.
ConfigImporter class Drupal\Core\Config core/lib/Drupal/Core/Config/ConfigImporter.php Defines a configuration importer. 21
ConfigImporterBatch class Drupal\Core\Config\Importer core/lib/Drupal/Core/Config/Importer/ConfigImporterBatch.php Methods for running the ConfigImporter in a batch. 3
ConfigImporterEvent class Drupal\Core\Config core/lib/Drupal/Core/Config/ConfigImporterEvent.php 7
ConfigImporterException class Drupal\Core\Config core/lib/Drupal/Core/Config/ConfigImporterException.php Exception thrown when a config import fails. 9
ConfigImporterFieldPurger class Drupal\field core/modules/field/src/ConfigImporterFieldPurger.php Processes field purges before a configuration synchronization. 1
ConfigImporterMissingContentTest class Drupal\KernelTests\Core\Config core/tests/Drupal/KernelTests/Core/Config/ConfigImporterMissingContentTest.php Tests importing configuration which has missing content dependencies.
ConfigImporterTest class Drupal\KernelTests\Core\Config core/tests/Drupal/KernelTests/Core/Config/ConfigImporterTest.php Tests importing configuration from files into active configuration.
ConfigImportForm class Drupal\config\Form core/modules/config/src/Form/ConfigImportForm.php Defines the configuration import form. 1
ConfigImportInstallProfileTest class Drupal\Tests\config\Functional core/modules/config/tests/src/Functional/ConfigImportInstallProfileTest.php Tests the importing/exporting configuration based on the install profile.
ConfigImportModuleUninstallValidatorInterface interface Drupal\Core\Extension core/lib/Drupal/Core/Extension/ConfigImportModuleUninstallValidatorInterface.php Special interface for module uninstall validators for configuration import. 3 2
ConfigImportRecreateTest class Drupal\KernelTests\Core\Config core/tests/Drupal/KernelTests/Core/Config/ConfigImportRecreateTest.php Tests importing recreated configuration entities.
ConfigImportRenameValidationTest class Drupal\KernelTests\Core\Config core/tests/Drupal/KernelTests/Core/Config/ConfigImportRenameValidationTest.php Tests validating renamed configuration in a configuration import.
ConfigImportSubscriber class Drupal\Core\EventSubscriber core/lib/Drupal/Core/EventSubscriber/ConfigImportSubscriber.php Config import subscriber for config import events. 2
ConfigImportSubscriber class Drupal\content_moderation\EventSubscriber core/modules/content_moderation/src/EventSubscriber/ConfigImportSubscriber.php Check moderation states are not being used before updating workflow config. 2
ConfigImportThemeInstallTest class Drupal\KernelTests\Core\Theme core/tests/Drupal/KernelTests/Core/Theme/ConfigImportThemeInstallTest.php Tests installing and uninstalling of themes via configuration import.
ConfigImportUIAjaxTest class Drupal\Tests\config\FunctionalJavascript core/modules/config/tests/src/FunctionalJavascript/ConfigImportUIAjaxTest.php Tests the user interface for importing configuration.
ConfigImportUITest class Drupal\Tests\config\Functional core/modules/config/tests/src/Functional/ConfigImportUITest.php Tests the user interface for importing configuration.
ConfigImportUploadTest class Drupal\Tests\config\Functional core/modules/config/tests/src/Functional/ConfigImportUploadTest.php Tests importing configuration from an uploaded file.
ConfigImportValidateEventSubscriberBase abstract class Drupal\Core\Config core/lib/Drupal/Core/Config/ConfigImportValidateEventSubscriberBase.php Defines a base event listener implementation for config sync validation. 4 4
ConfigInstaller class Drupal\Core\Config core/lib/Drupal/Core/Config/ConfigInstaller.php 1 1 2
ConfigInstaller class Drupal\Core\ProxyClass\Config core/lib/Drupal/Core/ProxyClass/Config/ConfigInstaller.php Provides a proxy class for \Drupal\Core\Config\ConfigInstaller.
ConfigInstallerInterface interface Drupal\Core\Config core/lib/Drupal/Core/Config/ConfigInstallerInterface.php Interface for classes that install config. 2 1
ConfigInstallProfileOverrideTest class Drupal\Tests\config\Functional core/modules/config/tests/src/Functional/ConfigInstallProfileOverrideTest.php Tests that configuration objects are correct after various operations.
ConfigInstallProfileUnmetDependenciesTest class Drupal\Tests\config\Functional core/modules/config/tests/src/Functional/ConfigInstallProfileUnmetDependenciesTest.php Tests install profile config overrides can not add unmet dependencies.
ConfigInstallTest class Drupal\KernelTests\Core\Config core/tests/Drupal/KernelTests/Core/Config/ConfigInstallTest.php Tests installation of configuration objects in installation functionality.
ConfigInstallWebTest class Drupal\Tests\config\Functional core/modules/config/tests/src/Functional/ConfigInstallWebTest.php Tests configuration objects before and after module install and uninstall.
ConfigLanguageOverrideTest class Drupal\KernelTests\Core\Config core/tests/Drupal/KernelTests/Core/Config/ConfigLanguageOverrideTest.php Confirm that language overrides work.
ConfigLanguageOverrideWebTest class Drupal\Tests\config\Functional core/modules/config/tests/src/Functional/ConfigLanguageOverrideWebTest.php Tests language overrides applied through the website.
ConfigLocalTasksTest class Drupal\Tests\config\Unit\Menu core/modules/config/tests/src/Unit/Menu/ConfigLocalTasksTest.php Tests existence of config local tasks.
ConfigManager class Drupal\Core\Config core/lib/Drupal/Core/Config/ConfigManager.php The ConfigManager provides helper functions for the configuration system. 2
ConfigManagerInterface interface Drupal\Core\Config core/lib/Drupal/Core/Config/ConfigManagerInterface.php Provides an interface for configuration manager. 1 23

Other projects


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