Classes, traits, and interfaces - 11.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 1519

Name Deprecated Object type Namespace File name Summary Direct uses Use statements Strings
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 Tests Drupal\menu_link_content\Plugin\Menu\MenuLinkContent.
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.
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. 8
MenuLinkTreeElementTest class Drupal\Tests\Core\Menu core/tests/Drupal/Tests/Core/Menu/MenuLinkTreeElementTest.php Tests the menu link tree element value object.
MenuLinkTreeInterface interface Drupal\Core\Menu core/lib/Drupal/Core/Menu/MenuLinkTreeInterface.php Defines an interface for loading, transforming and rendering menu link trees. 1 8
MenuLinkTreeTest class Drupal\KernelTests\Core\Menu core/tests/Drupal/KernelTests/Core/Menu/MenuLinkTreeTest.php Tests the menu link tree.
MenuLinkTreeTest class Drupal\Tests\system\Unit\Menu core/modules/system/tests/src/Unit/Menu/MenuLinkTreeTest.php Tests Drupal\Core\Menu\MenuLinkTree.
MenuListBuilder class Drupal\menu_ui core/modules/menu_ui/src/MenuListBuilder.php Defines a class to build a listing of menu entities.
MenuOperationsLinkTestHooks class Drupal\menu_operations_link_test\Hook core/modules/menu_link_content/tests/menu_operations_link_test/src/Hook/MenuOperationsLinkTestHooks.php Hook implementations for menu_operations_link_test.
MenuParentFormSelector class Drupal\Core\Menu core/lib/Drupal/Core/Menu/MenuParentFormSelector.php Default implementation of the menu parent form selector service. 1 2
MenuParentFormSelectorInterface interface Drupal\Core\Menu core/lib/Drupal/Core/Menu/MenuParentFormSelectorInterface.php Defines an interface for menu selector form elements and menu link options. 1 7
MenuPreprocess class Drupal\Core\Menu core/lib/Drupal/Core/Menu/MenuPreprocess.php Menu theme preprocess. 2 2
MenuResourceTestBase abstract class Drupal\Tests\system\Functional\Rest core/modules/system/tests/src/Functional/Rest/MenuResourceTestBase.php Resource test base for the menu entity. 6
MenuRouterRebuildSubscriber class Drupal\Core\EventSubscriber core/lib/Drupal/Core/EventSubscriber/MenuRouterRebuildSubscriber.php Rebuilds the default menu links and runs menu-specific code if necessary. 2
MenuRouterTest class Drupal\Tests\system\Functional\Menu core/modules/system/tests/src/Functional/Menu/MenuRouterTest.php Tests menu router and default menu link functionality.
MenuSettingsConstraint class Drupal\menu_ui\Plugin\Validation\Constraint core/modules/menu_ui/src/Plugin/Validation/Constraint/MenuSettingsConstraint.php Validation constraint for changing the menu settings in pending revisions.
MenuSettingsConstraintValidator class Drupal\menu_ui\Plugin\Validation\Constraint core/modules/menu_ui/src/Plugin/Validation/Constraint/MenuSettingsConstraintValidator.php Constraint validator for changing the menu settings in pending revisions.
MenuStorage class Drupal\system core/modules/system/src/MenuStorage.php Defines the storage class for menu configuration entities. 5
MenuStorageTest class Drupal\Tests\system\Kernel\Menu core/modules/system/tests/src/Kernel/Menu/MenuStorageTest.php Tests MenuStorage.
MenuTest class Drupal\Tests\system\Kernel\Plugin\migrate\source core/modules/system/tests/src/Kernel/Plugin/migrate/source/MenuTest.php Tests menu source plugin.
MenuTest class Drupal\Tests\views\Functional\Wizard core/modules/views/tests/src/Functional/Wizard/MenuTest.php Tests the ability of the views wizard to put views in a menu.
MenuTest class Drupal\migrate_drupal_message_test\Plugin\migrate\source core/modules/migrate_drupal_ui/tests/modules/migrate_drupal_message_test/src/Plugin/migrate/source/MenuTest.php Source plugin with a source id removed from the array returned by fields().
MenuTest class Drupal\Tests\jsonapi\Functional core/modules/jsonapi/tests/src/Functional/MenuTest.php JSON:API integration test for the "Menu" config entity type.
MenuTestController class Drupal\menu_test\Controller core/modules/system/tests/modules/menu_test/src/Controller/MenuTestController.php Controller routines for menu_test routes.
MenuTestHelper final class Drupal\menu_test core/modules/system/tests/modules/menu_test/src/MenuTestHelper.php Helper class for the menu API tests. 2
MenuTestHooks class Drupal\menu_test\Hook core/modules/system/tests/modules/menu_test/src/Hook/MenuTestHooks.php Hook implementations for menu_test.
MenuTestServiceProvider class Drupal\menu_test core/modules/system/tests/modules/menu_test/src/MenuTestServiceProvider.php Decorate core's default path-based breadcrumb builder when it is available.
MenuTranslation class Drupal\system\Plugin\migrate\source\d7 core/modules/system/src/Plugin/migrate/source/d7/MenuTranslation.php Drupal 7 i18n menu translation source from database.
MenuTranslationTest class Drupal\Tests\system\Kernel\Plugin\migrate\source\d7 core/modules/system/tests/src/Kernel/Plugin/migrate/source/d7/MenuTranslationTest.php Tests the menu translation source plugin.
MenuTreeHierarchyConstraint class Drupal\menu_link_content\Plugin\Validation\Constraint core/modules/menu_link_content/src/Plugin/Validation/Constraint/MenuTreeHierarchyConstraint.php Validation constraint for changing the menu hierarchy in pending revisions.
MenuTreeHierarchyConstraintValidator class Drupal\menu_link_content\Plugin\Validation\Constraint core/modules/menu_link_content/src/Plugin/Validation/Constraint/MenuTreeHierarchyConstraintValidator.php Constraint validator for changing menu link parents in pending revisions.
MenuTreeParameters class Drupal\Core\Menu core/lib/Drupal/Core/Menu/MenuTreeParameters.php Provides a value object to model menu tree parameters. 24
MenuTreeParametersTest class Drupal\Tests\Core\Menu core/tests/Drupal/Tests/Core/Menu/MenuTreeParametersTest.php Tests the menu link tree parameters value object.

Other projects


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