Classes, traits, and interfaces - 8.9.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 1511

Name Deprecated Object type Namespace File name Summary Direct uses Use statements Strings
ConfigTranslationUiThemeTest class Drupal\Tests\config_translation\Functional core/modules/config_translation/tests/src/Functional/ConfigTranslationUiThemeTest.php Verifies theme configuration translation settings.
ConfigTranslationViewListUiTest class Drupal\Tests\config_translation\Functional core/modules/config_translation/tests/src/Functional/ConfigTranslationViewListUiTest.php Visit view list and test if translate is available.
ConfigUninstallViaCliImportTest class Drupal\Tests\config\Kernel core/modules/config/tests/src/Kernel/ConfigUninstallViaCliImportTest.php Tests importing configuration from files into active configuration.
ConfigurableActionBase abstract class Drupal\Core\Action core/lib/Drupal/Core/Action/ConfigurableActionBase.php Provides a base implementation for a configurable Action plugin. 8 8
ConfigurableEntityReferenceItem

in drupal:8.0.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Field\Plugin\Field\FieldType\EntityReferenceItem instead.

class Drupal\entity_reference core/modules/entity_reference/src/ConfigurableEntityReferenceItem.php Deprecated. Alternative implementation of the 'entity_reference' field type.
ConfigurableImageEffectBase abstract class Drupal\image core/modules/image/src/ConfigurableImageEffectBase.php Provides a base class for configurable image effects. 4 4
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. 15 17
ConfigurableLanguage class Drupal\language\Entity core/modules/language/src/Entity/ConfigurableLanguage.php Defines the ConfigurableLanguage entity. 193
ConfigurableLanguageHalJsonAnonTest class Drupal\Tests\language\Functional\Hal core/modules/language/tests/src/Functional/Hal/ConfigurableLanguageHalJsonAnonTest.php @group hal
ConfigurableLanguageHalJsonBasicAuthTest class Drupal\Tests\language\Functional\Hal core/modules/language/tests/src/Functional/Hal/ConfigurableLanguageHalJsonBasicAuthTest.php @group hal
ConfigurableLanguageHalJsonCookieTest class Drupal\Tests\language\Functional\Hal core/modules/language/tests/src/Functional/Hal/ConfigurableLanguageHalJsonCookieTest.php @group hal
ConfigurableLanguageInterface interface Drupal\language core/modules/language/src/ConfigurableLanguageInterface.php Provides an interface defining a language entity. 1 6
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 13
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 10 4
ConfigurableLanguageResourceTestBase

in drupal:8.6.0 and is removed from drupal:9.0.0. Use Drupal\Tests\language\Functional\Rest\ConfigurableLanguageResourceTestBase instead.

abstract class Drupal\Tests\rest\Functional\EntityResource\ConfigurableLanguage core/modules/rest/tests/src/Functional/EntityResource/ConfigurableLanguage/ConfigurableLanguageResourceTestBase.php
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.
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
ConfigurableLinkManagerInterface

in drupal:8.3.0 and is removed from drupal:9.0.0. This has been moved to the hal module. This exists solely for BC.

interface Drupal\rest\LinkManager core/modules/rest/src/LinkManager/ConfigurableLinkManagerInterface.php
ConfigurableLinkManagerInterface interface Drupal\hal\LinkManager core/modules/hal/src/LinkManager/ConfigurableLinkManagerInterface.php Defines an interface for a link manager with a configurable domain. 3 1
ConfigurablePlugin class Drupal\Tests\Core\Plugin core/tests/Drupal/Tests/Core/Plugin/DefaultSingleLazyPluginCollectionTest.php
ConfigurablePluginInterface

Drupal\Component\Plugin\ConfigurablePluginInterface is deprecated in Drupal 8.7.0 and will be removed before Drupal 9.0.0. You should implement ConfigurableInterface and/or DependentPluginInterface directly as needed. If you implement ConfigurableInterface you may choose to implement ConfigurablePluginInterface in Drupal 8 as well for maximum compatibility, however this must be removed prior to Drupal 9.

interface Drupal\Component\Plugin core/lib/Drupal/Component/Plugin/ConfigurablePluginInterface.php Provides an interface for a configurable plugin. 13 14
ConfigurablePluginInterfaceTest class Drupal\Tests\Component\Plugin core/tests/Drupal/Tests/Component/Plugin/ConfigurablePluginInterfaceTest.php Tests ConfigurablePluginInterface deprecation.
ConfigurablePluginInterfaceTestClass class Drupal\Tests\Component\Plugin core/tests/Drupal/Tests/Component/Plugin/ConfigurablePluginInterfaceTest.php Test Class to trigger deprecation error.
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 by adding, editing, and deleting a complex action.
ConfigureBlockFormBase abstract class Drupal\layout_builder\Form core/modules/layout_builder/src/Form/ConfigureBlockFormBase.php Provides a base form for configuring a block. 2
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
ConfigValueException class Drupal\Core\Config core/lib/Drupal/Core/Config/ConfigValueException.php Exception thrown when config object values are invalid. 2
ConfirmClassyCopiesTest class Drupal\KernelTests\Core\Theme core/tests/Drupal/KernelTests/Core/Theme/ConfirmClassyCopiesTest.php Confirms that theme assets copied from Classy have not been changed.
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 an generic base class for a confirmation form. 29 29
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.

Other projects


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