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

Name Type Namespace Location Description Direct uses Use statements Stringssort ascending
CacheBackendInterface interface Drupal\Core\Cache core/lib/Drupal/Core/Cache/CacheBackendInterface.php Defines an interface for cache implementations. 5 88 27
ViewsPluginManager class Drupal\views\Plugin core/modules/views/src/Plugin/ViewsPluginManager.php Plugin type manager for all views plugins. 3 13
Attribute class Drupal\Core\Template core/lib/Drupal/Core/Template/Attribute.php Collects, sanitizes, and renders HTML attributes. 1 33 10
FieldMigration class Drupal\migrate_drupal\Plugin\migrate core/modules/migrate_drupal/src/Plugin/migrate/FieldMigration.php Migration plugin class for migrations dealing with field config and values. 2 2 9
ViewsHandlerManager class Drupal\views\Plugin core/modules/views/src/Plugin/ViewsHandlerManager.php Plugin type manager for all views handlers. 3 8
VariationCacheInterface interface Drupal\Core\Cache core/lib/Drupal/Core/Cache/VariationCacheInterface.php Defines an interface for variation cache implementations. 3 7
ServiceWithDependency class Drupal\new_dependency_test core/modules/system/tests/modules/new_dependency_test/src/ServiceWithDependency.php Service that gets the other service of the same module injected. 6
D7NodeDeriver class Drupal\node\Plugin\migrate core/modules/node/src/Plugin/migrate/D7NodeDeriver.php Deriver for Drupal 7 node and node revision migrations based on node types. 5
Service class Drupal\new_dependency_test core/modules/system/tests/modules/new_dependency_test/src/Service.php A service that can decorated itself. 5
BackendChain class Drupal\Core\Cache core/lib/Drupal/Core/Cache/BackendChain.php Defines a chained cache implementation for combining multiple cache backends. 2 4
NullBackendFactory class Drupal\Core\Cache core/lib/Drupal/Core/Cache/NullBackendFactory.php 1 4
LocalTaskDefault class Drupal\Core\Menu core/lib/Drupal/Core/Menu/LocalTaskDefault.php Default object used for LocalTaskPlugins. 6 6 4
ChainResponsePolicy class Drupal\Core\PageCache core/lib/Drupal/Core/PageCache/ChainResponsePolicy.php Implements a compound response policy. 1 4
JsonEncoder class Drupal\serialization\Encoder core/modules/serialization/src/Encoder/JsonEncoder.php Adds 'ajax' to the supported content types of the JSON encoder. 1 4 4
MemoryCache class Drupal\Core\Cache\MemoryCache core/lib/Drupal/Core/Cache/MemoryCache/MemoryCache.php Defines a memory cache implementation. 3 4
D6NodeDeriver class Drupal\node\Plugin\migrate core/modules/node/src/Plugin/migrate/D6NodeDeriver.php Deriver for Drupal 6 node and node revision migrations based on node types. 4
TestServiceDecorator class Drupal\decorated_service_test core/modules/system/tests/modules/decorated_service_test/src/TestServiceDecorator.php 1 4
MemoryCacheInterface interface Drupal\Core\Cache\MemoryCache core/lib/Drupal/Core/Cache/MemoryCache/MemoryCacheInterface.php Defines an interface for memory cache implementations. 1 10 4
Json class Drupal\Component\Serialization core/lib/Drupal/Component/Serialization/Json.php Default serialization for JSON. 96 3
AssetDumper class Drupal\Core\Asset core/lib/Drupal/Core/Asset/AssetDumper.php Dumps a CSS or JavaScript asset. 3
DatabaseStorage class Drupal\Core\Config core/lib/Drupal/Core/Config/DatabaseStorage.php Defines the Database storage. 3 3
MigratePluginManager class Drupal\migrate\Plugin core/modules/migrate/src/Plugin/MigratePluginManager.php Manages migrate plugins. 3 2 3
OffCanvasRenderer class Drupal\Core\Render\MainContent core/lib/Drupal/Core/Render/MainContent/OffCanvasRenderer.php Default main content renderer for off-canvas dialog requests. 3
D6TermNodeDeriver class Drupal\taxonomy\Plugin\migrate core/modules/taxonomy/src/Plugin/migrate/D6TermNodeDeriver.php Deriver for Drupal 6 term node migrations based on vocabularies. 3
TestService class Drupal\decorated_service_test core/modules/system/tests/modules/decorated_service_test/src/TestService.php 1 3
TestSessionHandlerProxy class Drupal\session_test\Session core/modules/system/tests/modules/session_test/src/Session/TestSessionHandlerProxy.php Provides a test session handler proxy. 3
WideModalRenderer class Drupal\dialog_renderer_test\Render\MainContent core/modules/system/tests/modules/dialog_renderer_test/src/Render/MainContent/WideModalRenderer.php Default main content renderer for wide modal dialog requests. 3
LoggerAwareStub class Drupal\logger_aware_test core/modules/system/tests/modules/logger_aware_test/src/LoggerAwareStub.php A test class that implements LoggerAwareInterface. 1 3
TestMiddleware class Drupal\http_kernel_test\HttpKernel core/modules/system/tests/modules/http_kernel_test/src/HttpKernel/TestMiddleware.php Provides a test middleware. 3
BanIpManager class Drupal\ban core/modules/ban/src/BanIpManager.php Ban IP manager. 1 2
BanMiddleware class Drupal\ban core/modules/ban/src/BanMiddleware.php Provides a HTTP middleware to implement IP based banning. 2
BlockRepository class Drupal\block core/modules/block/src/BlockRepository.php Provides a repository for Block config entities. 2 2
BlockContentUuidLookup class Drupal\block_content core/modules/block_content/src/BlockContentUuidLookup.php A cache collector that caches IDs for block_content UUIDs. 2
BookBreadcrumbBuilder class Drupal\book core/modules/book/src/BookBreadcrumbBuilder.php Provides a breadcrumb builder for nodes in a book. 2
BookExport class Drupal\book core/modules/book/src/BookExport.php Provides methods for exporting book to different formats. 1 2
BookManager class Drupal\book core/modules/book/src/BookManager.php Defines a book manager. 3 2
BookOutline class Drupal\book core/modules/book/src/BookOutline.php Provides handling to render the book outline. 2
BookOutlineStorage class Drupal\book core/modules/book/src/BookOutlineStorage.php Defines a storage class for books outline. 2
BookUninstallValidator class Drupal\book core/modules/book/src/BookUninstallValidator.php Prevents book module from being uninstalled under certain conditions. 2
BreakpointManager class Drupal\breakpoint core/modules/breakpoint/src/BreakpointManager.php Defines a breakpoint plugin manager to deal with breakpoints. 2
CKEditor5StylesheetsMessage final class Drupal\ckeditor5 core/modules/ckeditor5/src/CKEditor5StylesheetsMessage.php Messaging for themes using the ckeditor_stylesheets setting. 2
CommentBreadcrumbBuilder class Drupal\comment core/modules/comment/src/CommentBreadcrumbBuilder.php Class to define the comment breadcrumb builder. 2
CommentLazyBuilders class Drupal\comment core/modules/comment/src/CommentLazyBuilders.php Defines a service for comment #lazy_builder callbacks. 2
CommentLinkBuilder class Drupal\comment core/modules/comment/src/CommentLinkBuilder.php Defines a class for building markup for comment links on a commented entity. 1 2
CommentManager class Drupal\comment core/modules/comment/src/CommentManager.php Comment manager contains common functions to manage comment fields. 1 2
ConfigSubscriber class Drupal\config core/modules/config/src/ConfigSubscriber.php Config subscriber. 2
MailHandler class Drupal\contact core/modules/contact/src/MailHandler.php Provides a class for handling assembly and dispatch of contact mail messages. 1 2
ModerationInformation class Drupal\content_moderation core/modules/content_moderation/src/ModerationInformation.php General service for moderation-related questions about Entity API. 2 2
StateTransitionValidation class Drupal\content_moderation core/modules/content_moderation/src/StateTransitionValidation.php Validates whether a certain state transition is allowed. 1 2
ContentTranslationManager class Drupal\content_translation core/modules/content_translation/src/ContentTranslationManager.php Provides common functionality for content translation. 4 2

Pages

Other projects