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
ConfigEntityStorageTest class Drupal\KernelTests\Core\Config core/tests/Drupal/KernelTests/Core/Config/ConfigEntityStorageTest.php Tests configuration entity storage.
ConfigEntityTest class Drupal\Tests\config\FunctionalJavascript core/modules/config/tests/src/FunctionalJavascript/ConfigEntityTest.php Tests the Config operations through the UI.
ConfigEntityTest class Drupal\Tests\config\Functional core/modules/config/tests/src/Functional/ConfigEntityTest.php Tests configuration entities.
ConfigEntityType class Drupal\Core\Config\Entity core/lib/Drupal/Core/Config/Entity/ConfigEntityType.php Provides an implementation of a configuration entity type and its metadata. 5
ConfigEntityType class Drupal\Core\Entity\Annotation core/lib/Drupal/Core/Entity/Annotation/ConfigEntityType.php Defines a config entity type annotation object.
ConfigEntityType class Drupal\Core\Entity\Attribute core/lib/Drupal/Core/Entity/Attribute/ConfigEntityType.php Defines a configuration entity type attribute object. 35
ConfigEntityTypeInterface interface Drupal\Core\Config\Entity core/lib/Drupal/Core/Config/Entity/ConfigEntityTypeInterface.php Provides an interface for a configuration entity type and its metadata. 1 12
ConfigEntityTypeTest class Drupal\Tests\Core\Config\Entity core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityTypeTest.php @coversDefaultClass \Drupal\Core\Config\Entity\ConfigEntityType @group Config
ConfigEntityUnitTest class Drupal\KernelTests\Core\Config core/tests/Drupal/KernelTests/Core/Config/ConfigEntityUnitTest.php Unit tests for configuration entity base methods.
ConfigEntityUpdater class Drupal\Core\Config\Entity core/lib/Drupal/Core/Config/Entity/ConfigEntityUpdater.php A utility class to make updating configuration entities simple. 5
ConfigEntityUpdaterTest class Drupal\KernelTests\Core\Config\Entity core/tests/Drupal/KernelTests/Core/Config/Entity/ConfigEntityUpdaterTest.php Tests \Drupal\Core\Config\Entity\ConfigEntityUpdater.
ConfigEntityValidationTestBase abstract class Drupal\KernelTests\Core\Config core/tests/Drupal/KernelTests/Core/Config/ConfigEntityValidationTestBase.php Base class for testing validation of config entities. 31 31
ConfigEvents final class Drupal\Core\Config core/lib/Drupal/Core/Config/ConfigEvents.php Defines events for the configuration system. 24
ConfigEventsTest class Drupal\KernelTests\Core\Config core/tests/Drupal/KernelTests/Core/Config/ConfigEventsTest.php Tests events fired on configuration objects.
ConfigException class Drupal\Core\Config core/lib/Drupal/Core/Config/ConfigException.php A base exception thrown in any configuration system operations. 13 3
ConfigExistsConstraint class Drupal\Core\Config\Plugin\Validation\Constraint core/lib/Drupal/Core/Config/Plugin/Validation/Constraint/ConfigExistsConstraint.php Checks that the value is the name of an existing config object.
ConfigExistsConstraintValidator class Drupal\Core\Config\Plugin\Validation\Constraint core/lib/Drupal/Core/Config/Plugin/Validation/Constraint/ConfigExistsConstraintValidator.php Validates that a given config object exists.
ConfigExistsConstraintValidatorTest class Drupal\KernelTests\Core\Config core/tests/Drupal/KernelTests/Core/Config/ConfigExistsConstraintValidatorTest.php Tests the ConfigExists constraint validator.
ConfigExportForm class Drupal\config\Form core/modules/config/src/Form/ConfigExportForm.php Defines the configuration export form. 1
ConfigExportImportUITest class Drupal\Tests\config\Functional core/modules/config/tests/src/Functional/ConfigExportImportUITest.php Tests the user interface for importing/exporting configuration.
ConfigExportStorageTest class Drupal\KernelTests\Core\Config core/tests/Drupal/KernelTests/Core/Config/ConfigExportStorageTest.php Tests configuration export storage.
ConfigExportTest class Drupal\Tests\config\FunctionalJavascript core/modules/config/tests/src/FunctionalJavascript/ConfigExportTest.php Tests the config export form.
ConfigExportUITest class Drupal\Tests\config\Functional core/modules/config/tests/src/Functional/ConfigExportUITest.php Tests the user interface for exporting configuration.
ConfigFactory class Drupal\Core\Config core/lib/Drupal/Core/Config/ConfigFactory.php Defines the configuration object factory. 3
ConfigFactoryInterface interface Drupal\Core\Config core/lib/Drupal/Core/Config/ConfigFactoryInterface.php Defines the interface for a configuration object factory. 1 166
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.
ConfigHooks class Drupal\config\Hook core/modules/config/src/Hook/ConfigHooks.php Hook implementations for config.
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.

Other projects


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