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
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. 1
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. 8 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 Tests that a language object can be injected.
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[[api-linebreak]] @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 an interface for languages. 2 242
LanguageItem class Drupal\Core\Field\Plugin\Field\FieldType core/lib/Drupal/Core/Field/Plugin/Field/FieldType/LanguageItem.php Defines the 'language' entity field item. 1 1
LanguageListBuilder class Drupal\language core/modules/language/src/LanguageListBuilder.php Defines a class to build a listing of language entities.
LanguageListModuleInstallTest class Drupal\Tests\language\Functional core/modules/language/tests/src/Functional/LanguageListModuleInstallTest.php Tests that the language list is not empty when language is installed.
LanguageListTest class Drupal\Tests\language\Functional core/modules/language/tests/src/Functional/LanguageListTest.php Adds a new language and tests changing its status and the default language.
LanguageLocaleListTest class Drupal\Tests\language\Functional core/modules/language/tests/src/Functional/LanguageLocaleListTest.php Adds a new language with translations and tests language list order.
LanguageLocalTasksTest class Drupal\Tests\language\Unit\Menu core/modules/language/tests/src/Unit/Menu/LanguageLocalTasksTest.php Tests existence of language local tasks.
LanguageManager class Drupal\Core\Language core/lib/Drupal/Core/Language/LanguageManager.php Class responsible for providing language support on language-unaware sites. 1 14 2
LanguageManagerInterface interface Drupal\Core\Language core/lib/Drupal/Core/Language/LanguageManagerInterface.php Common interface for the language manager service. 2 118
LanguageNegotiation class Drupal\language\Attribute core/modules/language/src/Attribute/LanguageNegotiation.php Defines a language negotiation attribute object. 12
LanguageNegotiation class Drupal\language\Annotation core/modules/language/src/Annotation/LanguageNegotiation.php Defines a language negotiation annotation object.
LanguageNegotiation class Drupal\language\Plugin\migrate\process core/modules/language/src/Plugin/migrate/process/LanguageNegotiation.php Processes the arrays for the language types' negotiation methods and weights. 1
LanguageNegotiationBrowser class Drupal\language\Plugin\LanguageNegotiation core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationBrowser.php Class for identifying language from the browser Accept-language HTTP header. 1
LanguageNegotiationContentEntity class Drupal\language\Plugin\LanguageNegotiation core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationContentEntity.php Class for identifying the content translation language. 4
LanguageNegotiationContentEntityTest class Drupal\Tests\language\Unit\Plugin\LanguageNegotiation core/modules/language/tests/src/Unit/Plugin/LanguageNegotiation/LanguageNegotiationContentEntityTest.php Tests the LanguageNegotiationContentEntity plugin class.
LanguageNegotiationContentEntityTest class Drupal\Tests\language\Functional core/modules/language/tests/src/Functional/LanguageNegotiationContentEntityTest.php Tests language negotiation with the language negotiator content entity.
LanguageNegotiationFormOverrideTest class Drupal\Tests\config\Functional core/modules/config/tests/src/Functional/LanguageNegotiationFormOverrideTest.php Tests language-negotiation overrides are not on language-negotiation form.
LanguageNegotiationInfoTest class Drupal\Tests\language\Functional core/modules/language/tests/src/Functional/LanguageNegotiationInfoTest.php Tests alterations to language types/negotiation info.
LanguageNegotiationMethodBase abstract class Drupal\language core/modules/language/src/LanguageNegotiationMethodBase.php Base class for language negotiation methods. 10 10
LanguageNegotiationMethodInterface interface Drupal\language core/modules/language/src/LanguageNegotiationMethodInterface.php Interface for language negotiation classes. 1
LanguageNegotiationMethodManager class Drupal\language core/modules/language/src/LanguageNegotiationMethodManager.php Manages language negotiation methods. 2
LanguageNegotiationSelected class Drupal\language\Plugin\LanguageNegotiation core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationSelected.php Class for identifying language from a selected language. 3
LanguageNegotiationSession class Drupal\language\Plugin\LanguageNegotiation core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationSession.php Identify language from a request/session parameter. 1
LanguageNegotiationSessionTest class Drupal\Tests\language\Functional core/modules/language/tests/src/Functional/LanguageNegotiationSessionTest.php Tests the session language negotiation method.
LanguageNegotiationTest class Drupal\language_test\Plugin\LanguageNegotiation core/modules/language/tests/language_test/src/Plugin/LanguageNegotiation/LanguageNegotiationTest.php Class for identifying language from a selected language. 1
LanguageNegotiationTest class Drupal\Tests\language\Unit\process core/modules/language/tests/src/Unit/process/LanguageNegotiationTest.php @coversDefaultClass \Drupal\language\Plugin\migrate\process\LanguageNegotiation[[api-linebreak]] @group language
LanguageNegotiationTestBase abstract class Drupal\Tests\language\Unit\Plugin\LanguageNegotiation core/modules/language/tests/src/Unit/Plugin/LanguageNegotiation/LanguageNegotiationTestBase.php Base class used for testing the various LanguageNegotiation plugins. 1
LanguageNegotiationTestTs class Drupal\language_test\Plugin\LanguageNegotiation core/modules/language/tests/language_test/src/Plugin/LanguageNegotiation/LanguageNegotiationTestTs.php Class for identifying language from a selected language.
LanguageNegotiationUI class Drupal\language\Plugin\LanguageNegotiation core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationUI.php Identifies the language from the interface text language selected for page. 4

Other projects


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