Classes, traits, and interfaces - 8.9.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 1511

Name Deprecated Object type Namespace File name Summary Direct uses Use statements Strings
MemoryBackendTest class Drupal\KernelTests\Core\Cache core/tests/Drupal/KernelTests/Core/Cache/MemoryBackendTest.php Unit test of the memory cache backend using the generic cache unit test base.
MemoryCache class Drupal\Core\Cache\MemoryCache core/lib/Drupal/Core/Cache/MemoryCache/MemoryCache.php Defines a memory cache implementation. 4 4
MemoryCacheInterface interface Drupal\Core\Cache\MemoryCache core/lib/Drupal/Core/Cache/MemoryCache/MemoryCacheInterface.php Defines an interface for memory cache implementations. 1 11
MemoryCounterBackend class Drupal\Core\Cache core/lib/Drupal/Core/Cache/MemoryCounterBackend.php Defines a memory cache implementation that counts set and get calls. 1
MemoryStorage class Drupal\Core\Config core/lib/Drupal/Core/Config/MemoryStorage.php Provides an in memory configuration storage. 1 5
MemoryStorage class Drupal\Core\KeyValueStore core/lib/Drupal/Core/KeyValueStore/MemoryStorage.php Defines a default key/value store implementation.
MemoryStorageTest class Drupal\KernelTests\Core\KeyValueStore core/tests/Drupal/KernelTests/Core/KeyValueStore/MemoryStorageTest.php Tests the key-value memory storage.
MemoryStorageTest class Drupal\KernelTests\Core\Config\Storage core/tests/Drupal/KernelTests/Core/Config/Storage/MemoryStorageTest.php Tests MemoryStorage operations.
Menu class Drupal\system\Entity core/modules/system/src/Entity/Menu.php Defines the Menu configuration entity class. 16
Menu class Drupal\system\Plugin\migrate\source core/modules/system/src/Plugin/migrate/source/Menu.php Menu source from database.
MenuAccessControlHandler class Drupal\system core/modules/system/src/MenuAccessControlHandler.php Defines the access control handler for the menu entity type.
MenuAccessControlHandlerTest class Drupal\Tests\system\Kernel core/modules/system/tests/src/Kernel/MenuAccessControlHandlerTest.php @coversDefaultClass \Drupal\system\MenuAccessControlHandler @group system
MenuAccessTest class Drupal\Tests\system\Functional\Menu core/modules/system/tests/src/Functional/Menu/MenuAccessTest.php Tests the route access checks on menu links.
MenuActiveTrail class Drupal\Core\Menu core/lib/Drupal/Core/Menu/MenuActiveTrail.php Provides the default implementation of the active menu trail service. 1 2
MenuActiveTrailInterface interface Drupal\Core\Menu core/lib/Drupal/Core/Menu/MenuActiveTrailInterface.php Defines an interface for the active menu trail service. 1 2
MenuActiveTrailsCacheContext class Drupal\Core\Cache\Context core/lib/Drupal/Core/Cache/Context/MenuActiveTrailsCacheContext.php Defines the MenuActiveTrailsCacheContext service. 2
MenuActiveTrailTest class Drupal\Tests\Core\Menu core/tests/Drupal/Tests/Core/Menu/MenuActiveTrailTest.php Tests the active menu trail service.
MenuBlockPostUpdateTest class Drupal\Tests\system\Functional\Update core/modules/system/tests/src/Functional/Update/MenuBlockPostUpdateTest.php Tests updating menu blocks configuration.
MenuCacheTagsTest class Drupal\Tests\menu_ui\Functional core/modules/menu_ui/tests/src/Functional/MenuCacheTagsTest.php Tests the Menu and Menu Link entities' cache tags.
MenuController class Drupal\menu_ui\Controller core/modules/menu_ui/src/Controller/MenuController.php Returns responses for Menu routes.
MenuController class Drupal\menu_link_content\Controller core/modules/menu_link_content/src/Controller/MenuController.php Defines a route controller for a form for menu link content entity creation.
MenuDeleteForm class Drupal\menu_ui\Form core/modules/menu_ui/src/Form/MenuDeleteForm.php Defines a confirmation form for deletion of a custom menu.
MenuForm class Drupal\menu_ui core/modules/menu_ui/src/MenuForm.php Base form for menu edit forms.
MenuHalJsonAnonTest class Drupal\Tests\system\Functional\Hal core/modules/system/tests/src/Functional/Hal/MenuHalJsonAnonTest.php @group hal
MenuHalJsonBasicAuthTest class Drupal\Tests\system\Functional\Hal core/modules/system/tests/src/Functional/Hal/MenuHalJsonBasicAuthTest.php @group hal
MenuHalJsonCookieTest class Drupal\Tests\system\Functional\Hal core/modules/system/tests/src/Functional/Hal/MenuHalJsonCookieTest.php @group hal
MenuInterface interface Drupal\system core/modules/system/src/MenuInterface.php Provides an interface defining a menu entity. 1 5
MenuJsonAnonTest class Drupal\Tests\system\Functional\Rest core/modules/system/tests/src/Functional/Rest/MenuJsonAnonTest.php @group rest
MenuJsonBasicAuthTest class Drupal\Tests\system\Functional\Rest core/modules/system/tests/src/Functional/Rest/MenuJsonBasicAuthTest.php @group rest
MenuJsonCookieTest class Drupal\Tests\system\Functional\Rest core/modules/system/tests/src/Functional/Rest/MenuJsonCookieTest.php @group rest
MenuLegacyTest class Drupal\KernelTests\Core\Menu core/tests/Drupal/KernelTests/Core/Menu/MenuLegacyTest.php Deprecation tests cases for the menu layer.
MenuLink class Drupal\menu_link_content\Plugin\migrate\source core/modules/menu_link_content/src/Plugin/migrate/source/MenuLink.php Drupal menu link source from database. 1 1
MenuLinkAdd class Drupal\menu_ui\Plugin\Menu\LocalAction core/modules/menu_ui/src/Plugin/Menu/LocalAction/MenuLinkAdd.php Modifies the 'Add link' local action to add a destination. 1
MenuLinkBase abstract class Drupal\Core\Menu core/lib/Drupal/Core/Menu/MenuLinkBase.php Defines a base menu link class. 5 3
MenuLinkContent class Drupal\menu_link_content\Entity core/modules/menu_link_content/src/Entity/MenuLinkContent.php Defines the menu link content entity class. 23
MenuLinkContent class Drupal\menu_link_content\Plugin\Menu core/modules/menu_link_content/src/Plugin/Menu/MenuLinkContent.php Provides the menu link plugin for content menu links. 2 1
MenuLinkContentAccessControlHandler class Drupal\menu_link_content core/modules/menu_link_content/src/MenuLinkContentAccessControlHandler.php Defines the access control handler for the user entity type. 1
MenuLinkContentCacheabilityBubblingTest class Drupal\Tests\menu_link_content\Kernel core/modules/menu_link_content/tests/src/Kernel/MenuLinkContentCacheabilityBubblingTest.php Ensures that rendered menu links bubble the necessary bubbleable metadata for outbound path/route processing.
MenuLinkContentDeleteForm class Drupal\menu_link_content\Form core/modules/menu_link_content/src/Form/MenuLinkContentDeleteForm.php Provides a delete form for content menu links.
MenuLinkContentDeleteFormTest class Drupal\Tests\menu_link_content\Functional core/modules/menu_link_content/tests/src/Functional/MenuLinkContentDeleteFormTest.php Tests the menu link content delete UI.
MenuLinkContentDeriver class Drupal\menu_link_content\Plugin\Deriver core/modules/menu_link_content/src/Plugin/Deriver/MenuLinkContentDeriver.php Provides a deriver for user entered paths of menu links. 1
MenuLinkContentDeriverTest class Drupal\Tests\menu_link_content\Kernel core/modules/menu_link_content/tests/src/Kernel/MenuLinkContentDeriverTest.php Tests the menu link content deriver.
MenuLinkContentEntityAccessTest class Drupal\Tests\menu_link_content\Unit core/modules/menu_link_content/tests/src/Unit/MenuLinkContentEntityAccessTest.php Tests menu link content entity access.
MenuLinkContentForm class Drupal\menu_link_content\Form core/modules/menu_link_content/src/Form/MenuLinkContentForm.php Provides a form to add/update content menu links. 1
MenuLinkContentFormTest class Drupal\Tests\menu_link_content\Functional core/modules/menu_link_content/tests/src/Functional/MenuLinkContentFormTest.php Tests the menu link content UI.
MenuLinkContentHalJsonAnonTest class Drupal\Tests\menu_link_content\Functional\Hal core/modules/menu_link_content/tests/src/Functional/Hal/MenuLinkContentHalJsonAnonTest.php @group hal 2
MenuLinkContentHalJsonBasicAuthTest class Drupal\Tests\menu_link_content\Functional\Hal core/modules/menu_link_content/tests/src/Functional/Hal/MenuLinkContentHalJsonBasicAuthTest.php @group hal
MenuLinkContentHalJsonCookieTest class Drupal\Tests\menu_link_content\Functional\Hal core/modules/menu_link_content/tests/src/Functional/Hal/MenuLinkContentHalJsonCookieTest.php @group hal
MenuLinkContentInterface interface Drupal\menu_link_content core/modules/menu_link_content/src/MenuLinkContentInterface.php Defines an interface for custom menu links. 1 4
MenuLinkContentJsonAnonTest class Drupal\Tests\menu_link_content\Functional\Rest core/modules/menu_link_content/tests/src/Functional/Rest/MenuLinkContentJsonAnonTest.php @group rest

Other projects


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