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
ListFloatItem class Drupal\options\Plugin\Field\FieldType core/modules/options/src/Plugin/Field/FieldType/ListFloatItem.php Plugin implementation of the 'list_float' field type.
ListingEmpty class Drupal\node\Plugin\views\area core/modules/node/src/Plugin/views/area/ListingEmpty.php Defines an area plugin to display a node/add link.
ListingEmpty

in drupal:11.3.0 and is removed from drupal:13.0.0. There is no replacement.

class Drupal\block_content\Plugin\views\area core/modules/block_content/src/Plugin/views/area/ListingEmpty.php Defines an area plugin to display a block add link.
ListIntegerItem class Drupal\options\Plugin\Field\FieldType core/modules/options/src/Plugin/Field/FieldType/ListIntegerItem.php Plugin implementation of the 'list_integer' field type. 1
ListInterface interface Drupal\Core\TypedData core/lib/Drupal/Core/TypedData/ListInterface.php Interface for a list of typed data. 2 7
ListItemBase abstract class Drupal\options\Plugin\Field\FieldType core/modules/options/src/Plugin/Field/FieldType/ListItemBase.php Plugin base class inherited by the options field types. 3
ListNormalizer class Drupal\serialization\Normalizer core/modules/serialization/src/Normalizer/ListNormalizer.php Converts list objects to arrays. 1 1 2
ListNormalizerTest class Drupal\Tests\serialization\Unit\Normalizer core/modules/serialization/tests/src/Unit/Normalizer/ListNormalizerTest.php Tests Drupal\serialization\Normalizer\ListNormalizer.
ListPlugin class Drupal\ckeditor5\Plugin\CKEditor5Plugin core/modules/ckeditor5/src/Plugin/CKEditor5Plugin/ListPlugin.php CKEditor 5 List plugin. 1 1
ListPluginTest class Drupal\Tests\ckeditor5\Unit core/modules/ckeditor5/tests/src/Unit/ListPluginTest.php Tests Drupal\ckeditor5\Plugin\CKEditor5Plugin\ListPlugin.
ListStringItem class Drupal\options\Plugin\Field\FieldType core/modules/options/src/Plugin/Field/FieldType/ListStringItem.php Plugin implementation of the 'list_string' field type.
LoadMultipleTest class Drupal\Tests\taxonomy\Kernel core/modules/taxonomy/tests/src/Kernel/LoadMultipleTest.php Tests the loading of multiple taxonomy terms at once.
LoadTest class Drupal\Tests\file\Kernel core/modules/file/tests/src/Kernel/LoadTest.php Tests \Drupal\file\Entity\File::load().
LocalActionDefault class Drupal\Core\Menu core/lib/Drupal/Core/Menu/LocalActionDefault.php Provides a default implementation for local action plugins. 7 8 2
LocalActionDefaultTest class Drupal\Tests\Core\Menu core/tests/Drupal/Tests/Core/Menu/LocalActionDefaultTest.php Tests Drupal\Core\Menu\LocalActionDefault.
LocalActionInterface interface Drupal\Core\Menu core/lib/Drupal/Core/Menu/LocalActionInterface.php Defines an interface for menu local actions. 1
LocalActionManager class Drupal\Core\Menu core/lib/Drupal/Core/Menu/LocalActionManager.php Provides the default local action manager using YML as primary definition. 1 2 2
LocalActionManagerInterface interface Drupal\Core\Menu core/lib/Drupal/Core/Menu/LocalActionManagerInterface.php Manages discovery and instantiation of menu local action plugins. 1 2
LocalActionManagerTest class Drupal\Tests\Core\Menu core/tests/Drupal/Tests/Core/Menu/LocalActionManagerTest.php Tests Drupal\Core\Menu\LocalActionManager.
LocalActionManagerTest class Drupal\KernelTests\Core\Menu core/tests/Drupal/KernelTests/Core/Menu/LocalActionManagerTest.php Tests the local action manager.
LocalActionsBlock class Drupal\Core\Menu\Plugin\Block core/lib/Drupal/Core/Menu/Plugin/Block/LocalActionsBlock.php Provides a block to display the local actions.
LocalActionTest class Drupal\Tests\block_content\Functional core/modules/block_content/tests/src/Functional/LocalActionTest.php Tests block_content local action links.
LocalActionTest class Drupal\Tests\system\Functional\Menu core/modules/system/tests/src/Functional/Menu/LocalActionTest.php Tests local actions derived from router and added/altered via hooks.
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
LocalActionWithDestination class Drupal\Core\Menu core/lib/Drupal/Core/Menu/LocalActionWithDestination.php Modifies the local action to add a destination. 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.
LocaleBatchTest class Drupal\Tests\locale\Kernel core/modules/locale/tests/src/Kernel/LocaleBatchTest.php Tests locale batches.
LocaleBuildTest class Drupal\Tests\locale\Kernel core/modules/locale/tests/src/Kernel/LocaleBuildTest.php Tests building the translatable project information.
LocaleBulkDeprecationTest class Drupal\Tests\locale\Unit core/modules/locale/tests/src/Unit/LocaleBulkDeprecationTest.php Tests locale.bulk.inc.
LocaleConfigManager class Drupal\locale core/modules/locale/src/LocaleConfigManager.php Manages configuration supported in part by interface translation. 5 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 multilingual support for content types and individual nodes.
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. 1 2
LocaleDefaultConfigStorageTest class Drupal\Tests\locale\Kernel core/modules/locale/tests/src/Kernel/LocaleDefaultConfigStorageTest.php Tests Locale Default Config Storage.
LocaleDefaultOptions class Drupal\locale core/modules/locale/src/LocaleDefaultOptions.php Provides the locale default update options. 7
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.
LocaleFetch class Drupal\locale core/modules/locale/src/LocaleFetch.php Provides the locale source services. 6
LocaleFile final class Drupal\locale\File core/modules/locale/src/File/LocaleFile.php Defines the locale file value object. 5
LocaleFileHashTest class Drupal\Tests\locale\Functional core/modules/locale/tests/src/Functional/LocaleFileHashTest.php Tests that file hash is used for local translation file change detection.
LocaleFileManager class Drupal\locale\File core/modules/locale/src/File/LocaleFileManager.php Provide Locale File helper methods. 6
LocaleFileSystemFormTest class Drupal\Tests\locale\Functional core/modules/locale/tests/src/Functional/LocaleFileSystemFormTest.php Tests the locale functionality in the altered file settings form.

Other projects


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