Classes, traits, and interfaces - 10.3.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 1518

Name Deprecated Object type Namespace File name Summary Direct uses Use statements Strings
MenuLinkContentJsonAnonTest class Drupal\Tests\menu_link_content\Functional\Rest core/modules/menu_link_content/tests/src/Functional/Rest/MenuLinkContentJsonAnonTest.php @group rest
MenuLinkContentJsonBasicAuthTest class Drupal\Tests\menu_link_content\Functional\Rest core/modules/menu_link_content/tests/src/Functional/Rest/MenuLinkContentJsonBasicAuthTest.php @group rest
MenuLinkContentJsonCookieTest class Drupal\Tests\menu_link_content\Functional\Rest core/modules/menu_link_content/tests/src/Functional/Rest/MenuLinkContentJsonCookieTest.php @group rest
MenuLinkContentResourceTestBase abstract class Drupal\Tests\menu_link_content\Functional\Rest core/modules/menu_link_content/tests/src/Functional/Rest/MenuLinkContentResourceTestBase.php ResourceTestBase for MenuLinkContent entity. 6
MenuLinkContentStorage class Drupal\menu_link_content core/modules/menu_link_content/src/MenuLinkContentStorage.php Storage handler for menu_link_content entities.
MenuLinkContentStorageInterface interface Drupal\menu_link_content core/modules/menu_link_content/src/MenuLinkContentStorageInterface.php Defines an interface for menu_link_content entity storage classes. 1 1
MenuLinkContentStorageSchema class Drupal\menu_link_content core/modules/menu_link_content/src/MenuLinkContentStorageSchema.php Defines the menu_link_content schema handler.
MenuLinkContentTest class Drupal\Tests\jsonapi\Functional core/modules/jsonapi/tests/src/Functional/MenuLinkContentTest.php JSON:API integration test for the "MenuLinkContent" content entity type.
MenuLinkContentTranslationUITest class Drupal\Tests\menu_link_content\Functional core/modules/menu_link_content/tests/src/Functional/MenuLinkContentTranslationUITest.php Tests the menu link content translation UI.
MenuLinkContentXmlAnonTest class Drupal\Tests\menu_link_content\Functional\Rest core/modules/menu_link_content/tests/src/Functional/Rest/MenuLinkContentXmlAnonTest.php @group rest
MenuLinkContentXmlBasicAuthTest class Drupal\Tests\menu_link_content\Functional\Rest core/modules/menu_link_content/tests/src/Functional/Rest/MenuLinkContentXmlBasicAuthTest.php @group rest
MenuLinkContentXmlCookieTest class Drupal\Tests\menu_link_content\Functional\Rest core/modules/menu_link_content/tests/src/Functional/Rest/MenuLinkContentXmlCookieTest.php @group rest
MenuLinkDefault class Drupal\Core\Menu core/lib/Drupal/Core/Menu/MenuLinkDefault.php Provides a default implementation for menu link plugins. 1 4
MenuLinkDefaultForm class Drupal\Core\Menu\Form core/lib/Drupal/Core/Menu/Form/MenuLinkDefaultForm.php Provides an edit form for static menu links. 1 2
MenuLinkDefaultFormTest class Drupal\Tests\Core\Menu core/tests/Drupal/Tests/Core/Menu/MenuLinkDefaultFormTest.php @coversDefaultClass \Drupal\Core\Menu\Form\MenuLinkDefaultForm[[api-linebreak]] @group Menu @runTestsInSeparateProcesses
MenuLinkDefaultIntegrationTest class Drupal\KernelTests\Core\Menu core/tests/Drupal/KernelTests/Core/Menu/MenuLinkDefaultIntegrationTest.php Tests integration of static menu links.
MenuLinkDefaultTest class Drupal\Tests\Core\Menu core/tests/Drupal/Tests/Core/Menu/MenuLinkDefaultTest.php @coversDefaultClass \Drupal\Core\Menu\MenuLinkDefault[[api-linebreak]] @group Menu
MenuLinkEditForm class Drupal\menu_ui\Form core/modules/menu_ui/src/Form/MenuLinkEditForm.php Defines a generic edit form for all menu link plugin types. 1
MenuLinkFieldDefinitions trait Drupal\Core\Menu core/lib/Drupal/Core/Menu/MenuLinkFieldDefinitions.php Provides base field definitions for an entity type.
MenuLinkFormInterface interface Drupal\Core\Menu\Form core/lib/Drupal/Core/Menu/Form/MenuLinkFormInterface.php Defines an interface for edit forms of menu links. 1
MenuLinkInterface interface Drupal\Core\Menu core/lib/Drupal/Core/Menu/MenuLinkInterface.php Defines an interface for classes providing a type of menu link. 1 8
MenuLinkListBuilder class Drupal\menu_link_content core/modules/menu_link_content/src/MenuLinkListBuilder.php Provides a menu link list builder.
MenuLinkLocalized class Drupal\menu_link_content\Plugin\migrate\source\d7 core/modules/menu_link_content/src/Plugin/migrate/source/d7/MenuLinkLocalized.php Drupal 7 localized menu link translations source from database.
MenuLinkLocalizedTest class Drupal\Tests\menu_link_content\Kernel\Plugin\migrate\source\d7 core/modules/menu_link_content/tests/src/Kernel/Plugin/migrate/source/d7/MenuLinkLocalizedTest.php Tests menu link localized translation source plugin.
MenuLinkManager class Drupal\Core\Menu core/lib/Drupal/Core/Menu/MenuLinkManager.php Manages discovery, instantiation, and tree building of menu link plugins. 2
MenuLinkManagerInterface interface Drupal\Core\Menu core/lib/Drupal/Core/Menu/MenuLinkManagerInterface.php Defines an interface for managing menu links and storing their definitions. 1 11
MenuLinkMock class Drupal\Tests\Core\Menu core/tests/Drupal/Tests/Core/Menu/MenuLinkMock.php Defines a mock implementation of a menu link used in tests only. 1 5
MenuLinkParent class Drupal\migrate\Plugin\migrate\process core/modules/migrate/src/Plugin/migrate/process/MenuLinkParent.php Determines the parent of a menu link. 1
MenuLinkParentTest class Drupal\Tests\migrate\Unit\process core/modules/migrate/tests/src/Unit/process/MenuLinkParentTest.php Tests the menu link parent process plugin.
MenuLinkPluginConverter class Drupal\Core\ParamConverter core/lib/Drupal/Core/ParamConverter/MenuLinkPluginConverter.php Parameter converter for upcasting entity ids to full objects. 2
MenuLinkPluginConverter class Drupal\Core\ProxyClass\ParamConverter core/lib/Drupal/Core/ProxyClass/ParamConverter/MenuLinkPluginConverter.php Provides a proxy class for \Drupal\Core\ParamConverter\MenuLinkPluginConverter.
MenuLinkPluginTest class Drupal\Tests\menu_link_content\Unit core/modules/menu_link_content/tests/src/Unit/MenuLinkPluginTest.php @coversDefaultClass \Drupal\menu_link_content\Plugin\Menu\MenuLinkContent[[api-linebreak]]
MenuLinkReorderTest class Drupal\Tests\menu_ui\Functional core/modules/menu_ui/tests/src/Functional/MenuLinkReorderTest.php Reorder menu items.
MenuLinkResetForm class Drupal\menu_ui\Form core/modules/menu_ui/src/Form/MenuLinkResetForm.php Defines a confirmation form for resetting a single modified menu link. 1
MenuLinkSecurityTest class Drupal\Tests\system\Functional\Menu core/modules/system/tests/src/Functional/Menu/MenuLinkSecurityTest.php Ensures that menu links don't cause XSS issues.
MenuLinksetRoutes class Drupal\system\Routing core/modules/system/src/Routing/MenuLinksetRoutes.php Dynamically defines routes for menu linkset endpoints. 2
MenuLinksetSettingsForm class Drupal\system\Form core/modules/system/src/Form/MenuLinksetSettingsForm.php Configure System settings for this site. 1
MenuLinksetSettingsFormTest class Drupal\Tests\system\Functional\Form core/modules/system/tests/src/Functional/Form/MenuLinksetSettingsFormTest.php Tests the menu_linkset_settings form.
MenuLinksetSettingsUpdateTest class Drupal\Tests\system\Functional\Update core/modules/system/tests/src/Functional/Update/MenuLinksetSettingsUpdateTest.php Tests creation of system linkset settings.
MenuLinksTest class Drupal\Tests\menu_link_content\Kernel core/modules/menu_link_content/tests/src/Kernel/MenuLinksTest.php Tests handling of menu links hierarchies.
MenuLinkTest class Drupal\Tests\menu_link_content\Kernel\Plugin\migrate\source core/modules/menu_link_content/tests/src/Kernel/Plugin/migrate/source/MenuLinkTest.php Tests the menu link source plugin.
MenuLinkTest class Drupal\Tests\views\Functional\Plugin core/modules/views/tests/src/Functional/Plugin/MenuLinkTest.php Tests the menu links created in views.
MenuLinkTestWithUnsafeTitle class Drupal\menu_test\Plugin\Derivative core/modules/system/tests/modules/menu_test/src/Plugin/Derivative/MenuLinkTestWithUnsafeTitle.php Test derivative with an unsafe string. 1
MenuLinkTranslation class Drupal\menu_link_content\Plugin\migrate\source\d6 core/modules/menu_link_content/src/Plugin/migrate/source/d6/MenuLinkTranslation.php Drupal 6 i18n menu link translations source from database.
MenuLinkTranslation class Drupal\menu_link_content\Plugin\migrate\source\d7 core/modules/menu_link_content/src/Plugin/migrate/source/d7/MenuLinkTranslation.php Drupal 7 i18n menu link translations source from database.
MenuLinkTranslationTest class Drupal\Tests\menu_link_content\Kernel\Plugin\migrate\source\d6 core/modules/menu_link_content/tests/src/Kernel/Plugin/migrate/source/d6/MenuLinkTranslationTest.php Tests menu link translation source plugin.
MenuLinkTranslationTest class Drupal\Tests\menu_link_content\Kernel\Plugin\migrate\source\d7 core/modules/menu_link_content/tests/src/Kernel/Plugin/migrate/source/d7/MenuLinkTranslationTest.php Tests menu link localized translation source plugin.
MenuLinkTree class Drupal\Core\Menu core/lib/Drupal/Core/Menu/MenuLinkTree.php Implements the loading, transforming and rendering of menu link trees. 2 3 2
MenuLinkTreeElement class Drupal\Core\Menu core/lib/Drupal/Core/Menu/MenuLinkTreeElement.php Provides a value object to model an element in a menu link tree. 5
MenuLinkTreeElementTest class Drupal\Tests\Core\Menu core/tests/Drupal/Tests/Core/Menu/MenuLinkTreeElementTest.php Tests the menu link tree element value object.

Other projects


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