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
Condition class Drupal\core_fake\Driver\Database\CoreFakeWithAllCustomClasses core/tests/fixtures/database_drivers/module/core_fake/src/Driver/Database/CoreFakeWithAllCustomClasses/Condition.php CoreFakeWithAllCustomClasses implementation of \Drupal\Core\Database\Condition.
Condition class Drupal\Core\Config\Entity\Query core/lib/Drupal/Core/Config/Entity/Query/Condition.php Defines the condition class for the config entity query. 1 1
Condition class Drupal\Core\Database\Query core/lib/Drupal/Core/Database/Query/Condition.php Generic class for a series of conditions in a query. 2 6
Condition class Drupal\Core\Entity\Query\Sql core/lib/Drupal/Core/Entity/Query/Sql/Condition.php Implements entity query conditions for SQL databases. 1 1
Condition class Drupal\Core\Entity\Query\Sql\pgsql core/lib/Drupal/Core/Entity/Query/Sql/pgsql/Condition.php Implements entity query conditions for PostgreSQL databases.
Condition class Drupal\Core\Entity\Query\Null core/lib/Drupal/Core/Entity/Query/Null/Condition.php Defines the condition class for the null entity query.
ConditionAccessResolverTrait trait Drupal\Core\Condition core/lib/Drupal/Core/Condition/ConditionAccessResolverTrait.php Resolves a set of conditions. 1
ConditionAccessResolverTraitTest class Drupal\Tests\Core\Condition core/tests/Drupal/Tests/Core/Condition/ConditionAccessResolverTraitTest.php @coversDefaultClass \Drupal\Core\Condition\ConditionAccessResolverTrait @group Condition
ConditionAggregate class Drupal\Core\Entity\Query\Sql core/lib/Drupal/Core/Entity/Query/Sql/ConditionAggregate.php Defines the aggregate condition for sql based storage. 1
ConditionAggregateBase abstract class Drupal\Core\Entity\Query core/lib/Drupal/Core/Entity/Query/ConditionAggregateBase.php Defines a common base class for all aggregation entity condition implementations. 1 1
ConditionAggregateInterface interface Drupal\Core\Entity\Query core/lib/Drupal/Core/Entity/Query/ConditionAggregateInterface.php Defines aggregated entity query conditions. 1 1
ConditionBase abstract class Drupal\Core\Entity\Query core/lib/Drupal/Core/Entity/Query/ConditionBase.php Defines a common base class for all entity condition implementations. 3 3
ConditionFormTest class Drupal\Tests\system\Functional\Condition core/modules/system/tests/src/Functional/Condition/ConditionFormTest.php Tests that condition plugins basic form handling is working.
ConditionFundamentals abstract class Drupal\Core\Entity\Query core/lib/Drupal/Core/Entity/Query/ConditionFundamentals.php Common code for all implementations of the entity query condition interfaces. 2
ConditionInterface interface Drupal\Core\Database\Query core/lib/Drupal/Core/Database/Query/ConditionInterface.php Interface for a conditional clause in a query. 5 3
ConditionInterface interface Drupal\Core\Entity\Query core/lib/Drupal/Core/Entity/Query/ConditionInterface.php Defines the entity query condition interface. 1 2
ConditionInterface interface Drupal\Core\Condition core/lib/Drupal/Core/Condition/ConditionInterface.php An interface for condition plugins. 1 1
ConditionManager class Drupal\Core\Condition core/lib/Drupal/Core/Condition/ConditionManager.php A plugin manager for condition plugins. 2
ConditionPluginBase abstract class Drupal\Core\Condition core/lib/Drupal/Core/Condition/ConditionPluginBase.php Provides a basis for fulfilling contexts for condition plugins. 11 11
ConditionPluginCollection class Drupal\Core\Condition core/lib/Drupal/Core/Condition/ConditionPluginCollection.php Provides a collection of condition plugins. 2
ConditionPluginCollectionTest class Drupal\KernelTests\Core\Condition core/tests/Drupal/KernelTests/Core/Condition/ConditionPluginCollectionTest.php @coversDefaultClass \Drupal\Core\Condition\ConditionPluginCollection
ConditionTest class Drupal\Tests\Core\Database core/tests/Drupal/Tests/Core/Database/ConditionTest.php @coversDefaultClass \Drupal\Core\Database\Query\Condition
ConditionTestDualUser class Drupal\condition_test\Plugin\Condition core/modules/system/tests/modules/condition_test/src/Plugin/Condition/ConditionTestDualUser.php Provides a condition that requires two users.
ConditionTestDualUserTest class Drupal\KernelTests\Core\Plugin\Condition core/tests/Drupal/KernelTests/Core/Plugin/Condition/ConditionTestDualUserTest.php Tests a condition that requires two users.
ConditionTestNoExistingType class Drupal\condition_test\Plugin\Condition core/modules/system/tests/modules/condition_test/src/Plugin/Condition/ConditionTestNoExistingType.php Provides a condition that has a no existing context.
Config class Drupal\migrate\Plugin\migrate\destination core/modules/migrate/src/Plugin/migrate/destination/Config.php Provides Configuration Management destination plugin. 1 4
Config class Drupal\Core\Config core/lib/Drupal/Core/Config/Config.php Defines the default configuration object. 1 28
Config class Drupal\Composer\Plugin\VendorHardening composer/Plugin/VendorHardening/Config.php Determine configuration. 3
Config class Drupal\migrate_drupal\Plugin\migrate\source\d8 core/modules/migrate_drupal/src/Plugin/migrate/source/d8/Config.php Drupal 8+ configuration source from database.
ConfigAccessTest class Drupal\Tests\settings_tray\FunctionalJavascript core/modules/settings_tray/tests/src/FunctionalJavascript/ConfigAccessTest.php Tests handling of configuration overrides.
ConfigAction final class Drupal\Core\Config\Action\Attribute core/lib/Drupal/Core/Config/Action/Attribute/ConfigAction.php Defines a ConfigAction attribute object. 13
ConfigActionAttributeTest class Drupal\Tests\Core\Config\Action core/tests/Drupal/Tests/Core/Config/Action/ConfigActionAttributeTest.php @coversDefaultClass \Drupal\Core\Config\Action\Attribute\ConfigAction @group Config
ConfigActionException final class Drupal\Core\Config\Action core/lib/Drupal/Core/Config/Action/ConfigActionException.php @internal This API is experimental. 16
ConfigActionManager class Drupal\Core\Config\Action core/lib/Drupal/Core/Config/Action/ConfigActionManager.php 10
ConfigActionPluginInterface interface Drupal\Core\Config\Action core/lib/Drupal/Core/Config/Action/ConfigActionPluginInterface.php @internal This API is experimental. 11 11
ConfigActionsTest class Drupal\Tests\media\Kernel core/modules/media/tests/src/Kernel/ConfigActionsTest.php @group media
ConfigActionsTest class Drupal\Tests\language\Kernel core/modules/language/tests/src/Kernel/ConfigActionsTest.php @group language
ConfigActionsTest class Drupal\Tests\field\Kernel core/modules/field/tests/src/Kernel/ConfigActionsTest.php @group field
ConfigActionsTest class Drupal\Tests\contact\Kernel core/modules/contact/tests/src/Kernel/ConfigActionsTest.php @group contact
ConfigActionsTest class Drupal\Tests\node\Kernel core/modules/node/tests/src/Kernel/ConfigActionsTest.php @group node
ConfigActionsTest class Drupal\Tests\image\Kernel core/modules/image/tests/src/Kernel/ConfigActionsTest.php @group image
ConfigActionsTest class Drupal\Tests\block\Kernel core/modules/block/tests/src/Kernel/ConfigActionsTest.php @covers \Drupal\block\Plugin\ConfigAction\PlaceBlock @covers \Drupal\block\Plugin\ConfigAction\PlaceBlockDeriver @group block
ConfigActionsTest class Drupal\Tests\layout_builder\Kernel core/modules/layout_builder/tests/src/Kernel/ConfigActionsTest.php @group Recipe
ConfigActionTest class Drupal\KernelTests\Core\Config\Action core/tests/Drupal/KernelTests/Core/Config/Action/ConfigActionTest.php Tests the config action system.
ConfigActionValidationTest class Drupal\KernelTests\Core\Recipe core/tests/Drupal/KernelTests/Core/Recipe/ConfigActionValidationTest.php @group Recipe
ConfigAfterInstallerTestBase abstract class Drupal\FunctionalTests\Installer core/tests/Drupal/FunctionalTests/Installer/ConfigAfterInstallerTestBase.php Provides a class for install profiles to check their installed config. 2
ConfigBase abstract class Drupal\Core\Config core/lib/Drupal/Core/Config/ConfigBase.php Provides a base class for configuration objects with get/set support. 2 1
ConfigCacheTag class Drupal\system\EventSubscriber core/modules/system/src/EventSubscriber/ConfigCacheTag.php A subscriber invalidating cache tags when system config objects are saved. 2
ConfigCollectionEvents final class Drupal\Core\Config core/lib/Drupal/Core/Config/ConfigCollectionEvents.php Defines events for working with configuration collections. 8
ConfigCollectionInfo class Drupal\Core\Config core/lib/Drupal/Core/Config/ConfigCollectionInfo.php Gets information on all the possible configuration collections. 3

Other projects


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