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
LayoutBuilderTestPluginHooks class Drupal\layout_builder_test\Hook core/modules/layout_builder/tests/modules/layout_builder_test/src/Hook/LayoutBuilderTestPluginHooks.php Plugin hook implementations for layout_builder_test.
LayoutBuilderTestThemeHooks class Drupal\layout_builder_test\Hook core/modules/layout_builder/tests/modules/layout_builder_test/src/Hook/LayoutBuilderTestThemeHooks.php Theme hook implementations for layout_builder_test.
LayoutBuilderThemeHooks class Drupal\layout_builder\Hook core/modules/layout_builder/src/Hook/LayoutBuilderThemeHooks.php Hook implementations for layout_builder.
LayoutBuilderThemeSuggestionsTest class Drupal\Tests\layout_builder\Functional core/modules/layout_builder/tests/src/Functional/LayoutBuilderThemeSuggestionsTest.php Tests template suggestions.
LayoutBuilderThemeSuggestionsTestThemeHooks class Drupal\layout_builder_theme_suggestions_test\Hook core/modules/layout_builder/tests/modules/layout_builder_theme_suggestions_test/src/Hook/LayoutBuilderThemeSuggestionsTestThemeHooks.php Theme hook implementations for layout_builder_theme_suggestions_test.
LayoutBuilderToolbarTest class Drupal\Tests\layout_builder\FunctionalJavascript core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderToolbarTest.php Test Layout Builder integration with Toolbar.
LayoutBuilderTranslationTest class Drupal\Tests\layout_builder\Functional core/modules/layout_builder/tests/src/Functional/LayoutBuilderTranslationTest.php Tests that the Layout Builder works with translated content.
LayoutBuilderUiCacheContext class Drupal\layout_builder\Cache core/modules/layout_builder/src/Cache/LayoutBuilderUiCacheContext.php Determines if an entity is being viewed in the Layout Builder UI. 2
LayoutBuilderUiTest class Drupal\Tests\layout_builder\FunctionalJavascript core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderUiTest.php Tests the Layout Builder UI.
LayoutBuilderViewModeTest class Drupal\Tests\layout_builder\Functional core/modules/layout_builder/tests/src/Functional/LayoutBuilderViewModeTest.php Tests the Layout Builder UI with view modes.
LayoutBuilderWidget class Drupal\layout_builder\Plugin\Field\FieldWidget core/modules/layout_builder/src/Plugin/Field/FieldWidget/LayoutBuilderWidget.php A widget to display the layout form.
LayoutDefault class Drupal\Core\Layout core/lib/Drupal/Core/Layout/LayoutDefault.php Provides a default class for Layout plugins. 8 13 2
LayoutDefaultTest class Drupal\Tests\Core\Layout core/tests/Drupal/Tests/Core/Layout/LayoutDefaultTest.php Tests Drupal\Core\Layout\LayoutDefault.
LayoutDefinition class Drupal\Core\Layout core/lib/Drupal/Core/Layout/LayoutDefinition.php Provides an implementation of a layout definition and its metadata. 7
LayoutDeriver class Drupal\Tests\Core\Layout core/tests/Drupal/Tests/Core/Layout/LayoutPluginManagerTest.php Provides a dynamic layout deriver for the test.
LayoutDiscoveryHooks class Drupal\layout_discovery\Hook core/modules/layout_discovery/src/Hook/LayoutDiscoveryHooks.php Hook implementations for layout_discovery.
LayoutDiscoveryRequirements class Drupal\layout_discovery\Install\Requirements core/modules/layout_discovery/src/Install/Requirements/LayoutDiscoveryRequirements.php Install time requirements for the layout_discovery module.
LayoutDiscoveryThemeHooks class Drupal\layout_discovery\Hook core/modules/layout_discovery/src/Hook/LayoutDiscoveryThemeHooks.php Theme hooks for layout_discovery. 3
LayoutDisplayTest class Drupal\Tests\layout_builder\Functional core/modules/layout_builder/tests/src/Functional/LayoutDisplayTest.php Tests functionality of the entity view display with regard to Layout Builder.
LayoutEntityDisplayInterface interface Drupal\layout_builder\Entity core/modules/layout_builder/src/Entity/LayoutEntityDisplayInterface.php Provides an interface for entity displays that have layout. 1 10
LayoutEntityDisplayNormalizer class Drupal\layout_builder\Normalizer core/modules/layout_builder/src/Normalizer/LayoutEntityDisplayNormalizer.php Normalizes/denormalizes LayoutEntityDisplay objects into an array structure. 1
LayoutEntityHelperTrait trait Drupal\layout_builder core/modules/layout_builder/src/LayoutEntityHelperTrait.php Methods to help with entities using the layout builder. 5
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 16
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.

Other projects


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