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
LayoutEntityHelperTraitTest class Drupal\Tests\layout_builder\Unit core/modules/layout_builder/tests/src/Unit/LayoutEntityHelperTraitTest.php Tests Drupal\layout_builder\LayoutEntityHelperTrait.
LayoutEntityHelperTraitTest class Drupal\Tests\layout_builder\Kernel core/modules/layout_builder/tests/src/Kernel/LayoutEntityHelperTraitTest.php Tests Drupal\layout_builder\LayoutEntityHelperTrait.
LayoutForm final class Drupal\navigation\Form core/modules/navigation/src/Form/LayoutForm.php Defines a form for configuring navigation blocks. 1
LayoutInterface interface Drupal\Core\Layout core/lib/Drupal/Core/Layout/LayoutInterface.php Provides an interface for static Layout plugins. 1 5 1
LayoutOverrideFieldHelper class Drupal\layout_builder core/modules/layout_builder/src/LayoutOverrideFieldHelper.php Provides methods to help with entities using Layout Builder. 1
LayoutPluginManager class Drupal\Core\Layout core/lib/Drupal/Core/Layout/LayoutPluginManager.php Provides a plugin manager for layouts. 3 2
LayoutPluginManagerExceptionTest class Drupal\Tests\Core\Layout core/tests/Drupal/Tests/Core/Layout/LayoutPluginManagerExceptionTest.php Tests Drupal\Core\Layout\LayoutPluginManager exceptions.
LayoutPluginManagerInterface interface Drupal\Core\Layout core/lib/Drupal/Core/Layout/LayoutPluginManagerInterface.php Provides the interface for a plugin manager of layouts. 1 5
LayoutPluginManagerTest class Drupal\Tests\Core\Layout core/tests/Drupal/Tests/Core/Layout/LayoutPluginManagerTest.php Tests Drupal\Core\Layout\LayoutPluginManager.
LayoutPluginManagerTest class Drupal\KernelTests\Core\Layout core/tests/Drupal/KernelTests/Core/Layout/LayoutPluginManagerTest.php Tests Drupal\Core\Layout\LayoutPluginManager.
LayoutPreviewAccessAllowed class Drupal\layout_builder\Access core/modules/layout_builder/src/Access/LayoutPreviewAccessAllowed.php Accessible class to allow access for inline blocks in the Layout Builder. 2
LayoutRebuildConfirmFormBase abstract class Drupal\layout_builder\Form core/modules/layout_builder/src/Form/LayoutRebuildConfirmFormBase.php Provides a base class for confirmation forms that rebuild the Layout Builder. 2
LayoutRebuildTrait trait Drupal\layout_builder\Controller core/modules/layout_builder/src/Controller/LayoutRebuildTrait.php Provides AJAX responses to rebuild the Layout Builder. 4
LayoutRestTestBase abstract class Drupal\Tests\layout_builder\Functional\Rest core/modules/layout_builder/tests/src/Functional/Rest/LayoutRestTestBase.php Base class for Layout Builder REST tests. 1
LayoutSectionItem class Drupal\layout_builder\Plugin\Field\FieldType core/modules/layout_builder/src/Plugin/Field/FieldType/LayoutSectionItem.php Plugin implementation of the 'layout_section' field type. 1
LayoutSectionItemList class Drupal\layout_builder\Field core/modules/layout_builder/src/Field/LayoutSectionItemList.php Defines an item list class for layout section fields. 2
LayoutSectionItemListTest class Drupal\Tests\layout_builder\Kernel core/modules/layout_builder/tests/src/Kernel/LayoutSectionItemListTest.php Tests the field type for Layout Sections.
LayoutSectionStorageParamConverter class Drupal\layout_builder\Routing core/modules/layout_builder/src/Routing/LayoutSectionStorageParamConverter.php Loads the section storage from the routing defaults. 1 2
LayoutSectionStorageParamConverterTest class Drupal\Tests\layout_builder\Unit core/modules/layout_builder/tests/src/Unit/LayoutSectionStorageParamConverterTest.php Tests Drupal\layout_builder\Routing\LayoutSectionStorageParamConverter.
LayoutSectionTest class Drupal\Tests\layout_builder\Functional core/modules/layout_builder/tests/src/Functional/LayoutSectionTest.php Tests the rendering of a layout section field.
LayoutTempstoreRepository class Drupal\layout_builder core/modules/layout_builder/src/LayoutTempstoreRepository.php Provides a mechanism for loading layouts from tempstore. 1 2 2
LayoutTempstoreRepositoryInterface interface Drupal\layout_builder core/modules/layout_builder/src/LayoutTempstoreRepositoryInterface.php Provides an interface for loading layouts from tempstore. 1 17
LayoutTempstoreRepositoryTest class Drupal\Tests\layout_builder\Unit core/modules/layout_builder/tests/src/Unit/LayoutTempstoreRepositoryTest.php Tests Drupal\layout_builder\LayoutTempstoreRepository.
LayoutTempstoreRouteEnhancer class Drupal\layout_builder\Routing core/modules/layout_builder/src/Routing/LayoutTempstoreRouteEnhancer.php Loads the section storage from the layout tempstore. 1 2
LayoutTempstoreRouteEnhancerTest class Drupal\Tests\layout_builder\Unit core/modules/layout_builder/tests/src/Unit/LayoutTempstoreRouteEnhancerTest.php Tests Drupal\layout_builder\Routing\LayoutTempstoreRouteEnhancer.
LayoutTest class Drupal\Tests\layout_discovery\Kernel core/modules/layout_discovery/tests/src/Kernel/LayoutTest.php Tests Layout functionality.
LayoutTestDependenciesPlugin class Drupal\layout_test\Plugin\Layout core/modules/system/tests/modules/layout_test/src/Plugin/Layout/LayoutTestDependenciesPlugin.php Provides a plugin that contains config dependencies.
LayoutTestPlugin class Drupal\layout_test\Plugin\Layout core/modules/system/tests/modules/layout_test/src/Plugin/Layout/LayoutTestPlugin.php The plugin that handles the default layout template.
LayoutTestThemeHooks class Drupal\layout_test\Hook core/modules/system/tests/modules/layout_test/src/Hook/LayoutTestThemeHooks.php Hook implementations for layout_test.
LayoutWithoutLabel class Drupal\layout_builder_test\Plugin\Layout core/modules/layout_builder/tests/modules/layout_builder_test/src/Plugin/Layout/LayoutWithoutLabel.php Layout plugin without a label configuration.
LazyBuilderPlaceholderTest class Drupal\KernelTests\Core\Render core/tests/Drupal/KernelTests/Core/Render/LazyBuilderPlaceholderTest.php Tests Fiber suspension within Twig templates during placeholder rendering.
LazyBuilders final class Drupal\announcements_feed core/modules/announcements_feed/src/LazyBuilders.php Defines a class for lazy building render arrays. 2
LazyContextRepository class Drupal\Core\Plugin\Context core/lib/Drupal/Core/Plugin/Context/LazyContextRepository.php Provides a context repository which uses context provider services. 1 2
LazyContextRepositoryTest class Drupal\Tests\Core\Plugin\Context core/tests/Drupal/Tests/Core/Plugin/Context/LazyContextRepositoryTest.php Tests Drupal\Core\Plugin\Context\LazyContextRepository.
LazyPluginCollection abstract class Drupal\Component\Plugin core/lib/Drupal/Component/Plugin/LazyPluginCollection.php Defines an object which stores multiple plugin instances to lazy load them. 3 3
LazyPluginCollectionTestBase abstract class Drupal\Tests\Core\Plugin core/tests/Drupal/Tests/Core/Plugin/LazyPluginCollectionTestBase.php Provides a base class for plugin collection tests. 2
LazyRouteCollection class Drupal\Core\Routing core/lib/Drupal/Core/Routing/LazyRouteCollection.php The lazy route collection. 1
LazyRouteCollectionTest class Drupal\Tests\Core\Routing core/tests/Drupal/Tests/Core/Routing/LazyRouteCollectionTest.php Tests Drupal\Core\Routing\LazyRouteCollection.
LazyRouteProviderInstallTest class Drupal\FunctionalTests\Routing core/tests/Drupal/FunctionalTests/Routing/LazyRouteProviderInstallTest.php Tests Lazy Route Provider Install.
LazyRouteProviderInstallTestHooks class Drupal\lazy_route_provider_install_test\Hook core/modules/system/tests/modules/lazy_route_provider_install_test/src/Hook/LazyRouteProviderInstallTestHooks.php Hook implementations for lazy_route_provider_install_test.
LeaveProfileNode class Drupal\sdc_other_node_visitor\Twig\Profiler core/modules/system/tests/modules/sdc_other_node_visitor/src/Twig/Profiler/LeaveProfileNode.php Represents a profile leave node. 1
LegacyFileSystemTest class Drupal\KernelTests\Core\File core/tests/Drupal/KernelTests/Core/File/LegacyFileSystemTest.php Tests the legacy file system functions.
LegacyHook class Drupal\Core\Hook\Attribute core/lib/Drupal/Core/Hook/Attribute/LegacyHook.php Defines a LegacyHook attribute object. 6
LegacyHookTest class Drupal\Tests\system\Functional\Extension core/modules/system/tests/src/Functional/Extension/LegacyHookTest.php Tests the LegacyHook attribute.
LegacyMimeTypeMapLoadedSubscriber final class Drupal\Core\File\EventSubscriber core/lib/Drupal/Core/File/EventSubscriber/LegacyMimeTypeMapLoadedSubscriber.php Modifies the MIME type map by calling hook_file_mimetype_mapping_alter().
LegacyMimeTypeTest class Drupal\KernelTests\Core\File\MimeType core/tests/Drupal/KernelTests/Core/File/MimeType/LegacyMimeTypeTest.php Tests deprecated file features.
LegacyModuleImplementsAlter class Drupal\Core\Hook\Attribute core/lib/Drupal/Core/Hook/Attribute/LegacyModuleImplementsAlter.php Prevents procedural hook_module_implements_alter from executing. 1
LegacyRequirementSeverityTest class Drupal\KernelTests\Core\Extension core/tests/Drupal/KernelTests/Core/Extension/LegacyRequirementSeverityTest.php Tests the legacy requirements severity deprecations.
LegacyRequirementsHook class Drupal\Core\Hook\Attribute core/lib/Drupal/Core/Hook/Attribute/LegacyRequirementsHook.php Prevents procedural requirements hook from executing. 4
LegacySessionTest class Drupal\Tests\system\Functional\Session core/modules/system/tests/src/Functional/Session/LegacySessionTest.php Drupal legacy session handling tests.

Other projects


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