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
LocalActionTest class Drupal\menu_test\Plugin\Derivative core/modules/system/tests/modules/menu_test/src/Plugin/Derivative/LocalActionTest.php Test derivative to check local action title escaping. 1
LocalAwareRedirectResponseTrait trait Drupal\Core\Routing core/lib/Drupal/Core/Routing/LocalAwareRedirectResponseTrait.php Provides a trait which ensures that a URL is safe to redirect to.
Locale class Drupal\locale core/modules/locale/src/Locale.php Static service container wrapper for locale. 4
LocaleBuildTest class Drupal\Tests\locale\Kernel core/modules/locale/tests/src/Kernel/LocaleBuildTest.php Tests building the translatable project information.
LocaleConfigManager class Drupal\locale core/modules/locale/src/LocaleConfigManager.php Manages configuration supported in part by interface translation. 2 2
LocaleConfigManagerTest class Drupal\Tests\locale\Kernel core/modules/locale/tests/src/Kernel/LocaleConfigManagerTest.php Tests that the locale config manager operates correctly.
LocaleConfigSubscriber class Drupal\locale core/modules/locale/src/LocaleConfigSubscriber.php Updates strings translation when configuration translations change. 2
LocaleConfigSubscriberForeignTest class Drupal\Tests\locale\Kernel core/modules/locale/tests/src/Kernel/LocaleConfigSubscriberForeignTest.php Tests default configuration handling with a foreign default language.
LocaleConfigSubscriberTest class Drupal\Tests\locale\Kernel core/modules/locale/tests/src/Kernel/LocaleConfigSubscriberTest.php Tests that shipped configuration translations are updated correctly. 1
LocaleConfigTranslationImportTest class Drupal\Tests\locale\Functional core/modules/locale/tests/src/Functional/LocaleConfigTranslationImportTest.php Tests translation update's effects on configuration translations.
LocaleConfigTranslationTest class Drupal\Tests\locale\Functional core/modules/locale/tests/src/Functional/LocaleConfigTranslationTest.php Tests translation of configuration strings.
LocaleConfigurableLanguageManagerTest class Drupal\Tests\locale\Kernel core/modules/locale/tests/src/Kernel/LocaleConfigurableLanguageManagerTest.php Tests that the configurable language manager and locale operate correctly.
LocaleContentTest class Drupal\Tests\locale\Functional core/modules/locale/tests/src/Functional/LocaleContentTest.php Tests you can enable multilingual support on content types and configure a language for a node.
LocaleController class Drupal\locale\Controller core/modules/locale/src/Controller/LocaleController.php Return response for manual check translations.
LocaleDefaultConfigStorage class Drupal\locale core/modules/locale/src/LocaleDefaultConfigStorage.php Provides access to default configuration for locale integration. 2
LocaleDeprecationsTest class Drupal\Tests\locale\Kernel core/modules/locale/tests/src/Kernel/LocaleDeprecationsTest.php Tests deprecations in the locale module.
LocaleEvent class Drupal\locale core/modules/locale/src/LocaleEvent.php Defines a Locale event. 1
LocaleEvents final class Drupal\locale core/modules/locale/src/LocaleEvents.php Defines events for locale translation. 2
LocaleExportTest class Drupal\Tests\locale\Functional core/modules/locale/tests/src/Functional/LocaleExportTest.php Tests the exportation of locale files.
LocaleFileSystemFormTest class Drupal\Tests\locale\Functional core/modules/locale/tests/src/Functional/LocaleFileSystemFormTest.php Tests the locale functionality in the altered file settings form.
LocaleImportFunctionalTest class Drupal\Tests\locale\Functional core/modules/locale/tests/src/Functional/LocaleImportFunctionalTest.php Tests the import of locale files.
LocaleJavascriptTranslationTest class Drupal\Tests\locale\Functional core/modules/locale/tests/src/Functional/LocaleJavascriptTranslationTest.php Tests parsing js files for translatable strings.
LocaleLibraryAlterTest class Drupal\Tests\locale\Kernel core/modules/locale/tests/src/Kernel/LocaleLibraryAlterTest.php Tests localization of the JavaScript libraries.
LocaleLocaleLookupTest class Drupal\Tests\locale\Functional core/modules/locale/tests/src/Functional/LocaleLocaleLookupTest.php Tests LocaleLookup.
LocaleLocalTasksTest class Drupal\Tests\locale\Unit\Menu core/modules/locale/tests/src/Unit/Menu/LocaleLocalTasksTest.php Tests locale local tasks.
LocaleLookup class Drupal\locale core/modules/locale/src/LocaleLookup.php A cache collector to allow for dynamic building of the locale cache. 1
LocaleLookupTest class Drupal\Tests\locale\Unit core/modules/locale/tests/src/Unit/LocaleLookupTest.php @coversDefaultClass \Drupal\locale\LocaleLookup @group locale
LocaleNonInteractiveDevInstallTest class Drupal\Tests\locale\Functional core/modules/locale/tests/src/Functional/LocaleNonInteractiveDevInstallTest.php Tests installing in a different language with a dev version string.
LocaleNonInteractiveInstallTest class Drupal\Tests\locale\Functional core/modules/locale/tests/src/Functional/LocaleNonInteractiveInstallTest.php Tests installing in a different language with a non-dev version string. 1
LocalePathTest class Drupal\Tests\locale\Functional core/modules/locale/tests/src/Functional/LocalePathTest.php Tests you can configure a language for individual URL aliases.
LocalePluralFormatTest class Drupal\Tests\locale\Functional core/modules/locale/tests/src/Functional/LocalePluralFormatTest.php Tests plural handling for various languages.
LocaleProjectStorage class Drupal\locale core/modules/locale/src/LocaleProjectStorage.php Provides the locale project storage system using a key value store. 2
LocaleProjectStorageInterface interface Drupal\locale core/modules/locale/src/LocaleProjectStorageInterface.php Defines the locale project storage interface. 1
LocaleSettingsForm class Drupal\locale\Form core/modules/locale/src/Form/LocaleSettingsForm.php Configure locale settings for this site. 1
LocaleStringIsSafeTest class Drupal\Tests\locale\Kernel core/modules/locale/tests/src/Kernel/LocaleStringIsSafeTest.php Tests locale translation safe string handling.
LocaleStringTest class Drupal\Tests\locale\Kernel core/modules/locale/tests/src/Kernel/LocaleStringTest.php Tests the locale string storage, string objects and data API.
LocaleTranslatedSchemaDefinitionTest class Drupal\Tests\locale\Functional core/modules/locale/tests/src/Functional/LocaleTranslatedSchemaDefinitionTest.php Adds and configures languages to check field schema definition.
LocaleTranslateStringTourTest class Drupal\Tests\locale\Functional core/modules/locale/tests/src/Functional/LocaleTranslateStringTourTest.php Tests the Translate Interface tour.
LocaleTranslation class Drupal\locale core/modules/locale/src/LocaleTranslation.php String translator using the locale module. 2 2
LocaleTranslation class Drupal\locale\Plugin\QueueWorker core/modules/locale/src/Plugin/QueueWorker/LocaleTranslation.php Executes interface translation queue tasks.
LocaleTranslationCacheTag class Drupal\locale\EventSubscriber core/modules/locale/src/EventSubscriber/LocaleTranslationCacheTag.php A subscriber invalidating cache tags when translating a string. 2
LocaleTranslationDownloadTest class Drupal\Tests\locale\Functional core/modules/locale/tests/src/Functional/LocaleTranslationDownloadTest.php Tests locale translation download.
LocaleTranslationProjectsTest class Drupal\Tests\locale\Kernel core/modules/locale/tests/src/Kernel/LocaleTranslationProjectsTest.php Tests locale translation project handling.
LocaleTranslationTest class Drupal\Tests\locale\Unit core/modules/locale/tests/src/Unit/LocaleTranslationTest.php @coversDefaultClass \Drupal\locale\LocaleTranslation @group locale
LocaleTranslationTest class Drupal\Tests\locale\Kernel core/modules/locale/tests/src/Kernel/LocaleTranslationTest.php @coversDefaultClass \Drupal\locale\LocaleTranslation @group locale
LocaleTranslationUiTest class Drupal\Tests\locale\Functional core/modules/locale/tests/src/Functional/LocaleTranslationUiTest.php Adds a new locale and translates its name. Checks the validation of translation strings and search results.
LocaleUpdateBase abstract class Drupal\Tests\locale\Functional core/modules/locale/tests/src/Functional/LocaleUpdateBase.php Base class for testing updates to string translations. 4
LocaleUpdateCronTest class Drupal\Tests\locale\Functional core/modules/locale/tests/src/Functional/LocaleUpdateCronTest.php Tests for using cron to update project interface translations.
LocaleUpdateDevelopmentReleaseTest class Drupal\Tests\locale\Functional core/modules/locale/tests/src/Functional/LocaleUpdateDevelopmentReleaseTest.php Test for proper version fallback in case of a development release.
LocaleUpdateInterfaceTest class Drupal\Tests\locale\Functional core/modules/locale/tests/src/Functional/LocaleUpdateInterfaceTest.php Tests for the user interface of project interface translations.

Other projects


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