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
LanguageAddForm class Drupal\language\Form core/modules/language/src/Form/LanguageAddForm.php Controller for language addition forms.
LanguageArgument class Drupal\views\Plugin\views\argument core/modules/views/src/Plugin/views/argument/LanguageArgument.php Defines an argument handler to accept a language.
LanguageBlock class Drupal\language\Plugin\Derivative core/modules/language/src/Plugin/Derivative/LanguageBlock.php Provides language switcher block plugin definitions for all languages.
LanguageBlock class Drupal\language\Plugin\Block core/modules/language/src/Plugin/Block/LanguageBlock.php Provides a 'Language switcher' block.
LanguageBlockSettingsVisibilityTest class Drupal\Tests\language\Functional core/modules/language/tests/src/Functional/LanguageBlockSettingsVisibilityTest.php Tests that the language settings on block config appears correctly.
LanguageBreadcrumbTest class Drupal\Tests\language\Functional core/modules/language/tests/src/Functional/LanguageBreadcrumbTest.php Tests breadcrumbs functionality.
LanguageBrowserDetectionAcceptLanguageTest class Drupal\Tests\language\Functional core/modules/language/tests/src/Functional/LanguageBrowserDetectionAcceptLanguageTest.php Tests browser language detection with different accept-language headers.
LanguageBrowserDetectionTest class Drupal\Tests\language\Functional core/modules/language/tests/src/Functional/LanguageBrowserDetectionTest.php Tests browser language detection.
LanguageConditionTest class Drupal\Tests\language\Kernel\Condition core/modules/language/tests/src/Kernel/Condition/LanguageConditionTest.php Tests that the language condition, provided by the language module, is working properly.
LanguageConfigCollectionNameTrait trait Drupal\language\Config core/modules/language/src/Config/LanguageConfigCollectionNameTrait.php Provides a common trait for working with language override collection names.
LanguageConfigFactoryOverride class Drupal\language\Config core/modules/language/src/Config/LanguageConfigFactoryOverride.php Provides language overrides for the configuration factory. 2
LanguageConfigFactoryOverrideInterface interface Drupal\language\Config core/modules/language/src/Config/LanguageConfigFactoryOverrideInterface.php Defines the interface for a configuration factory language override object. 1 1
LanguageConfigFactoryOverrideTest class Drupal\Tests\language\Kernel core/modules/language/tests/src/Kernel/LanguageConfigFactoryOverrideTest.php Tests \Drupal\language\Config\LanguageConfigFactoryOverride.
LanguageConfigOverride class Drupal\language\Config core/modules/language/src/Config/LanguageConfigOverride.php Defines language configuration overrides. 5
LanguageConfigOverrideCrudEvent class Drupal\language\Config core/modules/language/src/Config/LanguageConfigOverrideCrudEvent.php Provides a language override event for event listeners. 1
LanguageConfigOverrideEvents final class Drupal\language\Config core/modules/language/src/Config/LanguageConfigOverrideEvents.php Defines events for language configuration overrides. 1
LanguageConfigOverrideImportTest class Drupal\Tests\language\Functional core/modules/language/tests/src/Functional/LanguageConfigOverrideImportTest.php Ensures the language config overrides can be synchronized.
LanguageConfigOverrideInstallTest class Drupal\Tests\language\Kernel core/modules/language/tests/src/Kernel/LanguageConfigOverrideInstallTest.php Ensures the language config overrides can be installed.
LanguageConfigOverrideTest class Drupal\Tests\language\Unit\Config core/modules/language/tests/src/Unit/Config/LanguageConfigOverrideTest.php @coversDefaultClass \Drupal\language\Config\LanguageConfigOverride @group Config @group language
LanguageConfigSchemaTest class Drupal\Tests\language\Functional core/modules/language/tests/src/Functional/LanguageConfigSchemaTest.php Ensures the language config schema is correct.
LanguageConfiguration class Drupal\language\Element core/modules/language/src/Element/LanguageConfiguration.php Defines an element for language configuration for a single field.
LanguageConfigurationElement class Drupal\language_elements_test\Form core/modules/language/tests/language_elements_test/src/Form/LanguageConfigurationElement.php A form containing a language configuration element. 1
LanguageConfigurationElementTest class Drupal\Tests\language\Functional core/modules/language/tests/src/Functional/LanguageConfigurationElementTest.php Tests the features of the language configuration element field.
LanguageConfigurationElementTest class Drupal\language_elements_test\Form core/modules/language/tests/language_elements_test/src/Form/LanguageConfigurationElementTest.php A form containing a language select element. 1
LanguageConfigurationTest class Drupal\Tests\language\Functional core/modules/language/tests/src/Functional/LanguageConfigurationTest.php Adds and configures languages to check negotiation changes.
LanguageContentSettings class Drupal\language\Plugin\migrate\source\d6 core/modules/language/src/Plugin/migrate/source/d6/LanguageContentSettings.php Drupal multilingual node settings from database.
LanguageContentSettings class Drupal\language\Plugin\migrate\source\d7 core/modules/language/src/Plugin/migrate/source/d7/LanguageContentSettings.php Drupal multilingual node settings from database.
LanguageContentSettingsTaxonomyVocabulary class Drupal\language\Plugin\migrate\source\d6 core/modules/language/src/Plugin/migrate/source/d6/LanguageContentSettingsTaxonomyVocabulary.php Drupal 6 i18n vocabularies source from database.
LanguageContentSettingsTaxonomyVocabulary class Drupal\language\Plugin\migrate\source\d7 core/modules/language/src/Plugin/migrate/source/d7/LanguageContentSettingsTaxonomyVocabulary.php Drupal 7 i18n vocabularies source from database.
LanguageContentSettingsTest class Drupal\Tests\language\Kernel\Plugin\migrate\source\d6 core/modules/language/tests/src/Kernel/Plugin/migrate/source/d6/LanguageContentSettingsTest.php Tests menu source plugin.
LanguageContentSettingsTest class Drupal\Tests\language\Kernel\Plugin\migrate\source\d7 core/modules/language/tests/src/Kernel/Plugin/migrate/source/d7/LanguageContentSettingsTest.php Tests menu source plugin.
LanguageContentTaxonomyVocabularySettingsTest class Drupal\Tests\language\Kernel\Plugin\migrate\source\d6 core/modules/language/tests/src/Kernel/Plugin/migrate/source/d6/LanguageContentTaxonomyVocabularySettingsTest.php Tests i18ntaxonomy vocabulary setting source plugin.
LanguageContentTaxonomyVocabularySettingsTest class Drupal\Tests\language\Kernel\Plugin\migrate\source\d7 core/modules/language/tests/src/Kernel/Plugin/migrate/source/d7/LanguageContentTaxonomyVocabularySettingsTest.php Tests i18ntaxonomy vocabulary setting source plugin.
LanguageConverter class Drupal\language\ProxyClass core/modules/language/src/ProxyClass/LanguageConverter.php Provides a proxy class for \Drupal\language\LanguageConverter.
LanguageConverter class Drupal\language core/modules/language/src/LanguageConverter.php Converts parameters for upcasting entity IDs to full objects. 2
LanguageCustomLanguageConfigurationTest class Drupal\Tests\language\Functional core/modules/language/tests/src/Functional/LanguageCustomLanguageConfigurationTest.php Adds and configures custom languages.
LanguageDefault class Drupal\Core\Language core/lib/Drupal/Core/Language/LanguageDefault.php Provides a simple get and set wrapper to the default language object. 9 2
LanguageDeleteForm class Drupal\language\Form core/modules/language/src/Form/LanguageDeleteForm.php Defines a confirmation form for deleting a language entity.
LanguageDependencyInjectionTest class Drupal\Tests\language\Kernel core/modules/language/tests/src/Kernel/LanguageDependencyInjectionTest.php Compares the default language from $GLOBALS against the dependency injected language object.
LanguageDomains class Drupal\language\Plugin\migrate\process core/modules/language/src/Plugin/migrate/process/LanguageDomains.php This plugin makes sure that no domain is empty if domain negotiation is used. 1
LanguageDomainsTest class Drupal\Tests\language\Unit\process core/modules/language/tests/src/Unit/process/LanguageDomainsTest.php @coversDefaultClass \Drupal\language\Plugin\migrate\process\LanguageDomains @group language
LanguageEditForm class Drupal\language\Form core/modules/language/src/Form/LanguageEditForm.php Controller for language edit forms.
LanguageEntityFieldAccessHookTest class Drupal\Tests\language\Functional core/modules/language/tests/src/Functional/LanguageEntityFieldAccessHookTest.php Tests language picker compatibility with hook_entity_field_access.
LanguageException class Drupal\language\Exception core/modules/language/src/Exception/LanguageException.php A base exception thrown in any language system operations. 1
LanguageFallbackTest class Drupal\Tests\language\Kernel core/modules/language/tests/src/Kernel/LanguageFallbackTest.php Tests the language fallback behavior.
LanguageField class Drupal\views\Plugin\views\field core/modules/views/src/Plugin/views/field/LanguageField.php Defines a field handler to translate a language into its readable form.
LanguageFilter class Drupal\views\Plugin\views\filter core/modules/views/src/Plugin/views/filter/LanguageFilter.php Provides filtering by language.
LanguageFormatter class Drupal\Core\Field\Plugin\Field\FieldFormatter core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/LanguageFormatter.php Plugin implementation of the 'language' formatter.
LanguageFormBase abstract class Drupal\language\Form core/modules/language/src/Form/LanguageFormBase.php Base form for language add and edit forms. 2
LanguageInterface interface Drupal\Core\Language core/lib/Drupal/Core/Language/LanguageInterface.php Defines a language. 2 231

Other projects


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