Classes, traits, and interfaces - main - 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 1529

Name Deprecated Object type Namespace File name Summary Direct uses Use statements Strings
LocaleStringTest class Drupal\Tests\locale\Kernel core/modules/locale/tests/src/Kernel/LocaleStringTest.php Tests the locale string storage, string objects and data API.
LocaleTestDevelopmentReleaseHooks class Drupal\locale_test_development_release\Hook core/modules/locale/tests/modules/locale_test_development_release/src/Hook/LocaleTestDevelopmentReleaseHooks.php Hook implementations for locale_test_development_release.
LocaleTestHooks class Drupal\locale_test\Hook core/modules/locale/tests/modules/locale_test/src/Hook/LocaleTestHooks.php Hook implementations for locale_test.
LocaleTestTranslateHooks class Drupal\locale_test_translate\Hook core/modules/locale/tests/modules/locale_test_translate/src/Hook/LocaleTestTranslateHooks.php Hook implementations for locale_test_translate.
LocaleThemeHooks class Drupal\locale\Hook core/modules/locale/src/Hook/LocaleThemeHooks.php Hook implementations for locale.
LocaleTranslatableProject class Drupal\locale core/modules/locale/src/LocaleTranslatableProject.php Translatable project for interface translation. 2
LocaleTranslatedSchemaDefinitionTest class Drupal\Tests\locale\Functional core/modules/locale/tests/src/Functional/LocaleTranslatedSchemaDefinitionTest.php Adds and configures languages to check field schema definition.
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
LocaleTranslationChangeProjectVersionTest class Drupal\Tests\locale\Functional core/modules/locale/tests/src/Functional/LocaleTranslationChangeProjectVersionTest.php Tests how translations are handled when a project gets updated.
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.
LocaleTranslationSource class Drupal\locale core/modules/locale/src/LocaleTranslationSource.php Provides source and translation status information for a project/langcode. 1
LocaleTranslationTest class Drupal\Tests\locale\Unit core/modules/locale/tests/src/Unit/LocaleTranslationTest.php Tests Drupal\locale\LocaleTranslation.
LocaleTranslationTest class Drupal\Tests\locale\Kernel core/modules/locale/tests/src/Kernel/LocaleTranslationTest.php Tests Drupal\locale\LocaleTranslation.
LocaleTranslationUiTest class Drupal\Tests\locale\Functional core/modules/locale/tests/src/Functional/LocaleTranslationUiTest.php Tests 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. 6
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.
LocaleUpdateTest class Drupal\Tests\locale\Kernel core/modules/locale/tests/src/Kernel/LocaleUpdateTest.php Tests for updating the interface translations of projects.
LocaleUpdateTest class Drupal\Tests\locale\Functional core/modules/locale/tests/src/Functional/LocaleUpdateTest.php Tests for updating the interface translations of projects.
LocalReadOnlyStream abstract class Drupal\Core\StreamWrapper core/lib/Drupal/Core/StreamWrapper/LocalReadOnlyStream.php Defines a read-only Drupal stream wrapper base class for local files. 2 1
LocalRedirectResponse class Drupal\Core\Routing core/lib/Drupal/Core/Routing/LocalRedirectResponse.php Provides a redirect response which cannot redirect to an external URL. 4
LocalStream abstract class Drupal\Core\StreamWrapper core/lib/Drupal/Core/StreamWrapper/LocalStream.php Defines a Drupal stream wrapper base class for local files. 6 5
LocalTaskDefault class Drupal\Core\Menu core/lib/Drupal/Core/Menu/LocalTaskDefault.php Default object used for LocalTaskPlugins. 5 5 4
LocalTaskDefaultTest class Drupal\Tests\Core\Menu core/tests/Drupal/Tests/Core/Menu/LocalTaskDefaultTest.php Tests Drupal\Core\Menu\LocalTaskDefault.
LocalTaskIntegrationTestBase abstract class Drupal\Tests\Core\Menu core/tests/Drupal/Tests/Core/Menu/LocalTaskIntegrationTestBase.php Defines a base unit test for testing existence of local tasks. 11 11
LocalTaskInterface interface Drupal\Core\Menu core/lib/Drupal/Core/Menu/LocalTaskInterface.php Defines an interface for menu local tasks. 1 1
LocalTaskManager class Drupal\Core\Menu core/lib/Drupal/Core/Menu/LocalTaskManager.php Provides the default local task manager using YML as primary definition. 2 2
LocalTaskManagerInterface interface Drupal\Core\Menu core/lib/Drupal/Core/Menu/LocalTaskManagerInterface.php Manages discovery and instantiation of menu local task plugins. 1 2
LocalTaskManagerTest class Drupal\Tests\Core\Menu core/tests/Drupal/Tests/Core/Menu/LocalTaskManagerTest.php Tests Drupal\Core\Menu\LocalTaskManager.
LocalTasksBlock class Drupal\Core\Menu\Plugin\Block core/lib/Drupal/Core/Menu/Plugin/Block/LocalTasksBlock.php Provides a "Tabs" block to display the local tasks.
LocalTasksTest class Drupal\Tests\system\Functional\Menu core/modules/system/tests/src/Functional/Menu/LocalTasksTest.php Tests local tasks derived from router and added/altered via hooks.
LocalTaskTest class Drupal\menu_test\Plugin\Derivative core/modules/system/tests/modules/menu_test/src/Plugin/Derivative/LocalTaskTest.php Tests derivative for testing local tasks. 1
LocalTaskTestWithUnsafeTitle class Drupal\menu_test\Plugin\Derivative core/modules/system/tests/modules/menu_test/src/Plugin/Derivative/LocalTaskTestWithUnsafeTitle.php Test derivative to check local task title escaping. 1
Lock final class Drupal\Core\TempStore core/lib/Drupal/Core/TempStore/Lock.php Provides a value object representing the lock from a TempStore. 4
LockAcquiringException class Drupal\Core\Lock core/lib/Drupal/Core/Lock/LockAcquiringException.php LockAcquiringException is thrown when a lock cannot be acquired. 5
LockBackendAbstract abstract class Drupal\Core\Lock core/lib/Drupal/Core/Lock/LockBackendAbstract.php Non backend related common methods implementation for lock backends. 2 2
LockBackendAbstractTest class Drupal\Tests\Core\Lock core/tests/Drupal/Tests/Core/Lock/LockBackendAbstractTest.php Tests Drupal\Core\Lock\LockBackendAbstract.
LockBackendInterface interface Drupal\Core\Lock core/lib/Drupal/Core/Lock/LockBackendInterface.php Lock backend interface. 4 46
LockFileValidator final class Drupal\package_manager\Validator core/modules/package_manager/src/Validator/LockFileValidator.php Checks that the active lock file is unchanged during stage operations. 2
LockFileValidatorTest class Drupal\Tests\package_manager\Kernel core/modules/package_manager/tests/src/Kernel/LockFileValidatorTest.php Tests Drupal\package_manager\Validator\LockFileValidator.
LockFunctionalTest class Drupal\Tests\system\Functional\Lock core/modules/system/tests/src/Functional/Lock/LockFunctionalTest.php Confirm locking works between two separate requests.
LockTest class Drupal\KernelTests\Core\Lock core/tests/Drupal/KernelTests/Core/Lock/LockTest.php Tests the Database lock backend.
Log class Drupal\migrate\Plugin\migrate\process core/modules/migrate/src/Plugin/migrate/process/Log.php Logs values without changing them. 1
Log class Drupal\Core\Database core/lib/Drupal/Core/Database/Log.php Database query logger. 3
LoggerAwarePass class Drupal\Core\DependencyInjection\Compiler core/lib/Drupal/Core/DependencyInjection/Compiler/LoggerAwarePass.php Sets the logger on all services that implement LoggerAwareInterface. 2
LoggerAwarePassTest class Drupal\Tests\system\Kernel\DependencyInjection\CompilerPass core/modules/system/tests/src/Kernel/DependencyInjection/CompilerPass/LoggerAwarePassTest.php Tests the logger aware compiler pass.

Other projects


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