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
ConfigurableImageEffectInterface interface Drupal\image core/modules/image/src/ConfigurableImageEffectInterface.php Defines the interface for configurable image effects. 1 2
ConfigurableInterface interface Drupal\Component\Plugin core/lib/Drupal/Component/Plugin/ConfigurableInterface.php Provides an interface for a configurable plugin. 16 24
ConfigurableLanguage class Drupal\language\Entity core/modules/language/src/Entity/ConfigurableLanguage.php Defines the ConfigurableLanguage entity. 213
ConfigurableLanguageInterface interface Drupal\language core/modules/language/src/ConfigurableLanguageInterface.php Provides an interface defining a language entity. 1 7
ConfigurableLanguageJsonAnonTest class Drupal\Tests\language\Functional\Rest core/modules/language/tests/src/Functional/Rest/ConfigurableLanguageJsonAnonTest.php @group rest
ConfigurableLanguageJsonBasicAuthTest class Drupal\Tests\language\Functional\Rest core/modules/language/tests/src/Functional/Rest/ConfigurableLanguageJsonBasicAuthTest.php @group rest
ConfigurableLanguageJsonCookieTest class Drupal\Tests\language\Functional\Rest core/modules/language/tests/src/Functional/Rest/ConfigurableLanguageJsonCookieTest.php @group rest
ConfigurableLanguageManager class Drupal\language core/modules/language/src/ConfigurableLanguageManager.php Overrides default LanguageManager to provide configured languages. 3
ConfigurableLanguageManagerInterface interface Drupal\language core/modules/language/src/ConfigurableLanguageManagerInterface.php Common interface for language negotiation services. 1 15
ConfigurableLanguageManagerTest class Drupal\Tests\language\Kernel core/modules/language/tests/src/Kernel/ConfigurableLanguageManagerTest.php Tests the ConfigurableLanguage entity.
ConfigurableLanguageManagerTest class Drupal\Tests\language\Functional core/modules/language/tests/src/Functional/ConfigurableLanguageManagerTest.php Tests Language Negotiation.
ConfigurableLanguageRenderer class Drupal\views\Entity\Render core/modules/views/src/Entity/Render/ConfigurableLanguageRenderer.php Renders entities in a configured language.
ConfigurableLanguageResourceTestBase abstract class Drupal\Tests\language\Functional\Rest core/modules/language/tests/src/Functional/Rest/ConfigurableLanguageResourceTestBase.php 6
ConfigurableLanguageTest class Drupal\Tests\language\Kernel core/modules/language/tests/src/Kernel/ConfigurableLanguageTest.php Tests the ConfigurableLanguage entity.
ConfigurableLanguageTest class Drupal\Tests\jsonapi\Functional core/modules/jsonapi/tests/src/Functional/ConfigurableLanguageTest.php JSON:API integration test for the "ConfigurableLanguage" config entity type.
ConfigurableLanguageUnitTest class Drupal\Tests\language\Unit core/modules/language/tests/src/Unit/ConfigurableLanguageUnitTest.php Tests the ConfigurableLanguage entity class.
ConfigurableLanguageValidationTest class Drupal\Tests\language\Kernel core/modules/language/tests/src/Kernel/ConfigurableLanguageValidationTest.php Tests validation of configurable_language entities.
ConfigurableLanguageXmlAnonTest class Drupal\Tests\language\Functional\Rest core/modules/language/tests/src/Functional/Rest/ConfigurableLanguageXmlAnonTest.php @group rest
ConfigurableLanguageXmlBasicAuthTest class Drupal\Tests\language\Functional\Rest core/modules/language/tests/src/Functional/Rest/ConfigurableLanguageXmlBasicAuthTest.php @group rest
ConfigurableLanguageXmlCookieTest class Drupal\Tests\language\Functional\Rest core/modules/language/tests/src/Functional/Rest/ConfigurableLanguageXmlCookieTest.php @group rest
ConfigurablePlugin class Drupal\Tests\Core\Plugin core/tests/Drupal/Tests/Core/Plugin/DefaultSingleLazyPluginCollectionTest.php
ConfigurablePluginTest class Drupal\Tests\ckeditor5\Kernel core/modules/ckeditor5/tests/src/Kernel/ConfigurablePluginTest.php Tests configurable plugins.
ConfigurableSearchPluginBase abstract class Drupal\search\Plugin core/modules/search/src/Plugin/ConfigurableSearchPluginBase.php Provides a base implementation for a configurable Search plugin. 2 3
ConfigurableSearchPluginInterface interface Drupal\search\Plugin core/modules/search/src/Plugin/ConfigurableSearchPluginInterface.php Provides an interface for a configurable Search plugin. 1
ConfigurationTest class Drupal\Tests\action\Functional core/modules/action/tests/src/Functional/ConfigurationTest.php Tests complex actions configuration.
ConfigureBlockFormBase abstract class Drupal\layout_builder\Form core/modules/layout_builder/src/Form/ConfigureBlockFormBase.php Provides a base form for configuring a block. 2
ConfiguredTrait class Drupal\Tests\Core\Form core/tests/Drupal/Tests/Core/Form/ConfigFormBaseTraitTest.php
ConfigureSectionForm class Drupal\layout_builder\Form core/modules/layout_builder/src/Form/ConfigureSectionForm.php Provides a form for configuring a layout section. 1
ConfigValidation class Drupal\config_test core/modules/config/tests/config_test/src/ConfigValidation.php Provides a collection of validation callbacks for testing purposes. 1
ConfigValidationTest class Drupal\KernelTests\Core\Recipe core/tests/Drupal/KernelTests/Core/Recipe/ConfigValidationTest.php @group Recipe
ConfigValueException class Drupal\Core\Config core/lib/Drupal/Core/Config/ConfigValueException.php Exception thrown when config object values are invalid. 2
ConfirmDeleteMultiple class Drupal\comment\Form core/modules/comment/src/Form/ConfirmDeleteMultiple.php Provides the comment multiple delete confirmation form. 1
ConfirmFormArrayPathTestForm class Drupal\form_test core/modules/system/tests/modules/form_test/src/ConfirmFormArrayPathTestForm.php Provides a test confirmation form with a complex cancellation destination. 1
ConfirmFormBase abstract class Drupal\Core\Form core/lib/Drupal/Core/Form/ConfirmFormBase.php Provides a generic base class for a confirmation form. 33 33
ConfirmFormHelper class Drupal\Core\Form core/lib/Drupal/Core/Form/ConfirmFormHelper.php Provides common functionality to confirmation forms. 3
ConfirmFormHelperTest class Drupal\Tests\Core\Form core/tests/Drupal/Tests/Core/Form/ConfirmFormHelperTest.php @coversDefaultClass \Drupal\Core\Form\ConfirmFormHelper @group Form
ConfirmFormInterface interface Drupal\Core\Form core/lib/Drupal/Core/Form/ConfirmFormInterface.php Defines the behavior a confirmation form. 3 2
ConfirmFormTest class Drupal\Tests\system\Functional\Form core/modules/system/tests/src/Functional/Form/ConfirmFormTest.php Tests confirmation forms.
ConfirmFormTestForm class Drupal\form_test core/modules/system/tests/modules/form_test/src/ConfirmFormTestForm.php Provides a test confirmation form. 1 1
Connection

in drupal:10.1.0 and is removed from drupal:11.0.0. There is no replacement.

class Drupal\database_statement_monitoring_test\sqlite core/modules/system/tests/modules/database_statement_monitoring_test/src/sqlite/Connection.php SQlite Connection class that can log executed queries.
Connection

in drupal:10.1.0 and is removed from drupal:11.0.0. There is no replacement.

class Drupal\database_statement_monitoring_test\mysql core/modules/system/tests/modules/database_statement_monitoring_test/src/mysql/Connection.php MySQL Connection class that can log executed queries.
Connection

in drupal:10.1.0 and is removed from drupal:11.0.0. There is no replacement.

class Drupal\database_statement_monitoring_test\pgsql core/modules/system/tests/modules/database_statement_monitoring_test/src/pgsql/Connection.php PostgreSQL Connection class that can log executed queries.
Connection class Drupal\driver_test\Driver\Database\DrivertestMysql core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysql/Connection.php MySQL test implementation of \Drupal\Core\Database\Connection.
Connection class Drupal\driver_test\Driver\Database\DrivertestMysqlDeprecatedVersion core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysqlDeprecatedVersion/Connection.php MySQL test implementation of \Drupal\Core\Database\Connection.
Connection class Drupal\driver_test\Driver\Database\DrivertestPgsql core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestPgsql/Connection.php PostgreSQL implementation of \Drupal\Core\Database\Connection.
Connection class Drupal\pgsql\Driver\Database\pgsql core/modules/pgsql/src/Driver/Database/pgsql/Connection.php PostgreSQL implementation of \Drupal\Core\Database\Connection. 3 3
Connection class Drupal\core_fake\Driver\Database\CoreFake core/tests/fixtures/database_drivers/module/core_fake/src/Driver/Database/CoreFake/Connection.php CoreFake implementation of \Drupal\Core\Database\Connection.
Connection class Drupal\core_fake\Driver\Database\CoreFakeWithAllCustomClasses core/tests/fixtures/database_drivers/module/core_fake/src/Driver/Database/CoreFakeWithAllCustomClasses/Connection.php CoreFakeWithAllCustomClasses implementation of \Drupal\Core\Database\Connection.
Connection class Drupal\Core\Database\Driver\CoreFake core/tests/fixtures/database_drivers/core/CoreFake/Connection.php 1 1
Connection class Drupal\Driver\Database\CoreFake core/tests/fixtures/database_drivers/custom/CoreFake/Connection.php

Other projects


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