07

Drupal 11 Core Plugin Types Reference

Complete reference of all plugin types provided by Drupal 11 core, including code paths, descriptions, and use cases.


Core Plugin Types (29)

UI & Display Components

1. Block

Path: web/core/lib/Drupal/Core/Block/

  • Manager: BlockManager.php
  • Base Class: BlockBase.php
  • Interface: BlockPluginInterface.php

Description: Block plugins define reusable content blocks that can be placed in theme regions like sidebars, headers, and footers. Each block can have custom configuration forms, visibility conditions, and caching strategies. Use blocks to create widgets, sidebars, custom content areas, or any reusable UI component that site builders can place and configure through the admin interface without writing theme code.

2. Component (SDC - Single Directory Components)

Path: web/core/lib/Drupal/Core/Theme/

  • Manager: ComponentPluginManager.php
  • Location: Theme directories under components/

Description: Single Directory Components provide a modern, component-based architecture for building reusable UI elements using Twig templates, CSS, and JavaScript in self-contained directories. Each component is fully encapsulated with its assets and can accept props, making them perfect for design systems, pattern libraries, and creating maintainable, reusable frontend components. SDC bridges the gap between traditional Drupal theming and modern component-driven development.

3. Icon Pack

Path: web/core/lib/Drupal/Core/Theme/Icon/Plugin/

  • Manager: IconPackManager.php
  • Annotation: IconPack.php

Description: Icon Pack plugins define collections of icons from various sources like font libraries (Font Awesome, Material Icons), SVG sprite sheets, or individual SVG files. They provide a unified API for managing and rendering icons consistently across the site. Use icon packs to integrate icon libraries, create custom icon sets, or provide themed iconography that can be easily switched or extended.

4. Icon Extractor

Path: web/core/lib/Drupal/Core/Theme/Icon/

  • Manager: IconExtractorPluginManager.php
  • Interface: IconExtractorPluginInterface.php

Description: Icon Extractor plugins extract and process icons from different source formats like SVG files, font files, or external APIs. They handle the parsing, validation, and transformation of icon data into a format Drupal can use. Create custom extractors when integrating specialized icon formats, proprietary icon libraries, or when you need custom processing logic for icon assets.

5. Layout

Path: web/core/lib/Drupal/Core/Layout/

  • Manager: LayoutPluginManager.php
  • Annotation: Layout.php
  • Interface: LayoutInterface.php

Description: Layout plugins define page and section layouts with named regions where blocks or content can be placed (like two-column, three-column, or custom grid layouts). Each layout includes a Twig template and configuration for region names and labels. Use layouts to create reusable page structures, landing page templates, or complex multi-region layouts that site builders can apply through Layout Builder or other layout management systems.

6. Display Variant

Path: web/core/lib/Drupal/Core/Display/

  • Manager: VariantManager.php
  • Annotation: DisplayVariant.php
  • Interface: VariantInterface.php

Description: Display Variant plugins control how pages are rendered in different contexts, such as standard HTML pages, modal dialogs, AJAX responses, or off-canvas panels. They wrap the page rendering process and can modify the overall page structure and behavior. Create custom display variants for specialized rendering contexts like embeds, iframes, progressive web app shells, or custom admin interfaces.


Field System

7. Field Type

Path: web/core/lib/Drupal/Core/Field/

  • Manager: FieldTypePluginManager.php
  • Annotation: FieldType.php
  • Base Class: FieldItemBase.php

Description: Field Type plugins define custom data types that can be attached to entities, specifying the data schema, property definitions, and storage structure. Each field type defines what data is stored (string, integer, references, etc.) and how it's validated. Create custom field types for specialized data structures like ratings, coordinates, color values, measurement units, or any domain-specific data that needs structured storage with validation rules.

8. Field Widget

Path: web/core/lib/Drupal/Core/Field/

  • Manager: WidgetPluginManager.php
  • Annotation: FieldWidget.php
  • Base Class: WidgetBase.php

Description: Field Widget plugins provide form input elements for editing field data, controlling how users enter or modify field values in forms. Widgets can be simple (text boxes) or complex (autocompletes, WYSIWYG editors, file uploaders). Create custom widgets for specialized input methods like date pickers, color selectors, rich media uploaders, or any custom UI for data entry that improves the editing experience.

9. Field Formatter

Path: web/core/lib/Drupal/Core/Field/

  • Manager: FormatterPluginManager.php
  • Annotation: FieldFormatter.php
  • Base Class: FormatterBase.php

Description: Field Formatter plugins control how field data is displayed on the frontend, transforming stored data into rendered HTML. Each formatter can have settings to customize the output (like date formats, image styles, or link text). Create custom formatters for specialized display needs like formatted addresses, styled numbers, interactive maps, custom date/time displays, or any unique way of presenting field data to end users.

10. Field Type Category

Path: web/core/lib/Drupal/Core/Field/

  • Manager: FieldTypeCategoryManager.php
  • Annotation: FieldTypeCategory.php

Description: Field Type Category plugins organize field types into logical groups in the admin UI, making it easier for site builders to find and select appropriate field types. Categories include groups like "Number", "Text", "Reference", "Media", etc. Define custom categories when you have multiple related custom field types that should be grouped together for better discoverability in the field management interface.


Forms & Elements

11. Render Element

Path: web/core/lib/Drupal/Core/Render/

  • Manager: ElementInfoManager.php
  • Annotation: RenderElement.php
  • Base Class: Element/RenderElementBase.php

Description: Render Element plugins define reusable element types for Drupal's render array system, providing default properties, processing callbacks, and theme functions. Elements can be containers, tables, HTML elements, or complex components. Create custom render elements for reusable UI patterns, complex form components, specialized markup structures, or any element type that needs consistent preprocessing and theming across your site.

12. Form Element

Path: web/core/lib/Drupal/Core/Render/

  • Annotation: FormElement.php
  • Base Class: Element/FormElementBase.php

Description: Form Element plugins are specialized render elements specifically for form inputs like textfields, checkboxes, selects, and file uploads. They handle user input, validation integration, and form-specific processing. Create custom form elements for specialized input types like masked inputs, compound fields (address blocks), rich text editors, or any custom form control that needs specialized validation and processing logic.

13. Typed Data

Path: web/core/lib/Drupal/Core/TypedData/

  • Manager: TypedDataManager.php
  • Base Classes: Plugin/DataType/*.php

Description: Typed Data plugins define data types with validation constraints, metadata, and transformation capabilities, providing a layer of abstraction over raw data. They support primitive types (string, integer, boolean), complex types (lists, maps), and computed values. Use typed data for API schemas, configuration schemas, data validation rules, computed properties, or anywhere you need strongly-typed data with automatic validation and type coercion.


Validation & Logic

14. Constraint

Path: web/core/lib/Drupal/Core/Validation/

  • Manager: ConstraintManager.php
  • Plugin Location: Plugin/Validation/Constraint/*.php

Description: Constraint plugins implement Symfony validation constraints for validating data at the field, entity, or property level. Each constraint defines validation rules and error messages that are checked before data is saved. Create custom constraints for business logic validation like unique values across entities, complex data relationships, external API validation, or any specialized validation rules that go beyond simple format checking.

15. Condition

Path: web/core/lib/Drupal/Core/Condition/

  • Manager: ConditionManager.php
  • Annotation: Condition.php
  • Base Class: ConditionPluginBase.php

Description: Condition plugins provide reusable conditional logic for controlling visibility and access throughout Drupal, commonly used for block visibility, content access rules, and workflows. Conditions can check user roles, content types, request paths, or custom criteria. Create custom conditions for business rules like user subscription status, time-based availability, geographic restrictions, or any conditional logic that should be reusable across the system.

16. Action

Path: web/core/lib/Drupal/Core/Action/

  • Manager: ActionManager.php
  • Annotation: Action.php
  • Base Class: ActionBase.php

Description: Action plugins define operations that can be executed on entities, either individually or in bulk through Views bulk operations or custom automation rules. Actions can publish content, send emails, modify field values, or trigger workflows. Create custom actions for bulk operations like content archiving, notification sending, data transformation, integration with external services, or any automated operation that administrators or editors need to perform on multiple items.


Content & Media Handling

17. Mail

Path: web/core/lib/Drupal/Core/Mail/

  • Manager: MailManager.php
  • Annotation: Mail.php
  • Interface: MailInterface.php

Description: Mail plugins implement email sending backends, controlling how Drupal sends emails (PHP mail(), SMTP, API services like SendGrid). Each implementation handles connection management, authentication, and message delivery. Create custom mail plugins to integrate third-party email services, implement custom email queuing, add email tracking, or handle specialized email requirements like multi-region sending or compliance with specific email standards.

18. Image Toolkit

Path: web/core/lib/Drupal/Core/ImageToolkit/

  • Manager: ImageToolkitManager.php
  • Annotation: ImageToolkit.php
  • Base Class: ImageToolkitBase.php

Description: Image Toolkit plugins provide image processing backends (GD, ImageMagick, Imagick) that handle actual image manipulation operations. They abstract the underlying image processing library and provide a consistent API. Create custom image toolkit plugins to integrate specialized image processing libraries, add support for additional image formats, implement cloud-based image processing, or optimize performance for specific hosting environments.

19. Image Toolkit Operation

Path: web/core/lib/Drupal/Core/ImageToolkit/

  • Manager: ImageToolkitOperationManager.php
  • Annotation: ImageToolkitOperation.php
  • Base Class: ImageToolkitOperationBase.php

Description: Image Toolkit Operation plugins define specific image manipulation operations (resize, crop, rotate, desaturate, etc.) for a particular image toolkit. Each operation implements the actual transformation logic using the toolkit's API. Create custom operations for specialized image effects like watermarking, face detection, automatic cropping, artistic filters, or any image manipulation that your site requires beyond basic cropping and resizing.

20. Archiver

Path: web/core/lib/Drupal/Core/Archiver/

  • Manager: ArchiverManager.php
  • Annotation: Archiver.php
  • Interface: ArchiverInterface.php

Description: Archiver plugins handle compressed archive file formats (tar, zip, gz, bz2), providing methods to extract, list, and create archives. They're used by the update system, backup modules, and file management. Create custom archiver plugins to support additional archive formats (7z, rar), implement cloud-based extraction, add encryption support, or integrate with specialized compression tools for large file handling.

21. Queue Worker

Path: web/core/lib/Drupal/Core/Queue/

  • Manager: QueueWorkerManager.php
  • Annotation: QueueWorker.php
  • Base Class: QueueWorkerBase.php

Description: Queue Worker plugins process items from queues asynchronously, enabling background processing for time-intensive operations like image processing, email sending, or API synchronization. Each worker defines what happens when an item is processed. Create custom queue workers for batch operations, scheduled tasks, data imports, external API calls, report generation, or any operation that should run asynchronously to avoid blocking user requests.


Navigation & Menus

22. Menu Link

Path: web/core/lib/Drupal/Core/Menu/

  • Manager: MenuLinkManager.php
  • Base Class: MenuLinkBase.php

Description: Menu Link plugins define dynamic menu items in code that can't be deleted through the UI, used for system links, admin menus, and module-provided navigation. They support dynamic titles, access control, and route parameters. Create custom menu links for module-provided navigation, dynamic menu items based on configuration, links with computed titles or URLs, or system links that should persist regardless of UI changes.

23. Local Action

Path: web/core/lib/Drupal/Core/Menu/

  • Manager: LocalActionManager.php
  • Annotation: Menu/LocalAction.php

Description: Local Action plugins define action buttons that appear on pages (like "Add content", "Add user", or "Import"), providing quick access to common operations. They're typically rendered as prominent buttons at the top of listing pages. Create custom local actions for module-specific operations, administrative shortcuts, creation forms, or any context-specific action that users commonly perform on a particular page or section.

24. Local Task

Path: web/core/lib/Drupal/Core/Menu/

  • Manager: LocalTaskManager.php
  • Annotation: Menu/LocalTask.php

Description: Local Task plugins define tab navigation on pages (like View/Edit/Delete tabs on nodes), organizing related pages into tabbed interfaces. They support primary and secondary tab levels and access control. Create custom local tasks for additional entity operation tabs, administrative sections, settings pages, or any set of related pages that should be navigable through a tabbed interface for better user experience.

25. Contextual Link

Path: web/core/lib/Drupal/Core/Menu/

  • Manager: ContextualLinkManager.php
  • Annotation: Menu/ContextualLink.php

Description: Contextual Link plugins define operations that appear in the contextual links overlay (the pencil icon dropdown on blocks and other elements), providing quick access to edit or configure content in place. Create custom contextual links for quick access to commonly used operations, specialized configuration forms, content management shortcuts, or any operation that benefits from direct access within the rendered page context.

26. Link Relation Type

Path: web/core/lib/Drupal/Core/Http/

  • Manager: LinkRelationTypeManager.php
  • Annotation: LinkRelationType.php

Description: Link Relation Type plugins define HTTP link relation types (rel attributes) used in HTTP headers and HTML links, supporting standards like IANA link relations and custom relationship types. They're crucial for REST APIs, HAL responses, and semantic web features. Create custom link relation types for API documentation, custom REST relationships, specialized web service integrations, or implementing domain-specific link semantics in your API responses.


Entity & Configuration

27. Entity Type

Path: web/core/lib/Drupal/Core/Entity/

  • Manager: EntityTypeManager.php
  • Annotation: EntityType.php
  • Base Classes: Entity/ContentEntityBase.php, Entity/ConfigEntityBase.php

Description: Entity Type plugins define the structure and behavior of content entities (nodes, users, taxonomy terms) and configuration entities (views, content types), including storage, fields, forms, and access control. They're the foundation of Drupal's content architecture. Create custom entity types for structured data like products, events, bookings, or any domain-specific content that needs full CRUD operations, revisions, translations, and entity reference support beyond what content types provide.

28. Entity Reference Selection

Path: web/core/lib/Drupal/Core/Entity/EntityReferenceSelection/

  • Manager: SelectionPluginManager.php
  • Annotation: EntityReferenceSelection.php
  • Base Class: SelectionPluginBase.php

Description: Entity Reference Selection plugins control how entities are selected and filtered in entity reference fields, defining the query logic for autocomplete widgets and select lists. They handle access control, filtering, and sorting of available options. Create custom selection plugins for specialized entity filtering, custom access rules, integration with external data sources, complex relationship logic, or when you need fine-grained control over which entities can be referenced.

29. Config Action

Path: web/core/lib/Drupal/Core/Config/Action/

  • Manager: ConfigActionManager.php
  • Annotation: ConfigAction.php
  • Base Class: ConfigActionPluginBase.php

Description: Config Action plugins provide reusable configuration management operations used in recipes and deployment workflows, enabling actions like creating entities, setting configuration values, or applying bulk changes. They make configuration management more powerful and flexible. Create custom config actions for deployment automation, configuration transformation rules, bulk configuration updates, or implementing standardized configuration patterns across multiple sites.


Module-Specific Plugin Types

Views Module (18 Plugin Types)

Base Path: web/core/modules/views/src/Plugin/views/

30. Views Display

Path: web/core/modules/views/src/Plugin/views/display/

  • Manager: ViewsPluginManager.php
  • Base Class: DisplayPluginBase.php

Description: Views Display plugins define how views are rendered and where they appear (page, block, feed, attachment, REST export, embed). Each display type has unique settings for paths, access control, caching, and output formatting. Create custom display plugins for specialized output contexts like custom admin panels, dashboard widgets, mobile app endpoints, chat bot responses, or any unique way of presenting view data beyond standard pages and blocks.

31. Views Field

Path: web/core/modules/views/src/Plugin/views/field/

  • Manager: ViewsHandlerManager.php
  • Base Class: FieldPluginBase.php

Description: Views Field plugins define columns in views output, controlling how individual data fields are rendered, including formatting, linking, and custom markup. They can aggregate data, create computed values, or provide action links. Create custom field handlers for computed columns, specialized formatters, action buttons, custom links, data transformations, or any custom column output that goes beyond simple field value display in views.

32. Views Filter

Path: web/core/modules/views/src/Plugin/views/filter/

  • Manager: ViewsHandlerManager.php
  • Base Class: FilterPluginBase.php

Description: Views Filter plugins restrict view results based on criteria, providing form elements for users to filter data either through exposed filters or fixed administrative filters. They support various operators and value types. Create custom filter plugins for specialized filtering logic, custom date ranges, geographic filtering, complex multi-field filters, external data filtering, or any filtering criteria that requires custom query logic or specialized UI elements.

33. Views Sort

Path: web/core/modules/views/src/Plugin/views/sort/

  • Manager: ViewsHandlerManager.php
  • Base Class: SortPluginBase.php

Description: Views Sort plugins control the order of view results, providing sorting options for ascending/descending order on various data fields. They can implement custom sorting logic beyond simple field ordering. Create custom sort plugins for calculated sort orders, weighted sorting, geographic distance sorting, relevance scoring, or any complex sorting algorithm that goes beyond standard database column ordering.

34. Views Relationship

Path: web/core/modules/views/src/Plugin/views/relationship/

  • Manager: ViewsHandlerManager.php
  • Base Class: RelationshipPluginBase.php

Description: Views Relationship plugins join additional tables to the views query, enabling access to related entity data, referenced fields, and complex data relationships. They make fields, filters, and sorts from related entities available. Create custom relationship plugins for complex joins, multiple-hop relationships, conditional joins, external data source integration, or any custom relationship logic that enables querying across multiple entities or data sources.

35. Views Argument (Contextual Filter)

Path: web/core/modules/views/src/Plugin/views/argument/

  • Manager: ViewsHandlerManager.php
  • Base Class: ArgumentPluginBase.php

Description: Views Argument plugins filter views based on URL parameters, enabling dynamic views that change based on context like node IDs, taxonomy terms, or custom values from the URL path. They support validation, default values, and exception handling. Create custom argument plugins for complex URL-based filtering, custom validation logic, multi-value arguments, SEO-friendly URL patterns, or any dynamic filtering based on request context.

36. Views Argument Default

Path: web/core/modules/views/src/Plugin/views/argument_default/

  • Manager: ViewsPluginManager.php
  • Base Class: ArgumentDefaultPluginBase.php

Description: Views Argument Default plugins provide fallback values when contextual filter arguments are missing from the URL, such as using the current user ID, current node ID, or custom logic. Create custom argument default plugins for complex default value logic, session-based defaults, cookie values, external API values, geographic defaults, or any dynamic default value that should be applied when URL arguments are missing from the request.

37. Views Argument Validator

Path: web/core/modules/views/src/Plugin/views/argument_validator/

  • Manager: ViewsPluginManager.php
  • Base Class: ArgumentValidatorPluginBase.php

Description: Views Argument Validator plugins verify that contextual filter arguments are valid (like checking if a node ID exists or if a user has access), returning 404 or access denied for invalid arguments. Create custom argument validators for complex validation rules, access checking against external systems, format validation, business rule validation, or any specialized argument validation that determines whether a view should be displayed or return an error.

38. Views Join

Path: web/core/modules/views/src/Plugin/views/join/

  • Base Class: JoinPluginBase.php

Description: Views Join plugins define custom join logic between database tables in views queries, supporting complex join conditions, subqueries, and custom ON clauses beyond standard foreign key relationships. Create custom join plugins for advanced join conditions, conditional joins based on field values, joins with subqueries, external database joins, or any complex SQL join logic that isn't achievable through standard relationship plugins.

39. Views Pager

Path: web/core/modules/views/src/Plugin/views/pager/

  • Manager: ViewsPluginManager.php
  • Base Class: PagerPluginBase.php

Description: Views Pager plugins control result pagination, implementing different pagination UI patterns like full pagers with page numbers, mini pagers with next/previous, infinite scroll, or load more buttons. Create custom pager plugins for infinite scroll implementations, load-more AJAX pagination, cursor-based pagination for APIs, custom page size logic, or any specialized pagination behavior that improves user experience for large result sets.

40. Views Style

Path: web/core/modules/views/src/Plugin/views/style/

  • Manager: ViewsPluginManager.php
  • Base Class: StylePluginBase.php

Description: Views Style plugins define how views output is formatted and structured (table, grid, unformatted list, HTML list, RSS feed). They control the overall container and grouping of results. Create custom style plugins for specialized output formats like cards, timelines, calendars, maps, charts, masonry layouts, custom JSON structures, or any unique way of structuring and presenting view results that requires custom templating and grouping logic.

41. Views Row

Path: web/core/modules/views/src/Plugin/views/row/

  • Manager: ViewsPluginManager.php
  • Base Class: RowPluginBase.php

Description: Views Row plugins define how individual items are rendered within a view style (fields, rendered entity, RSS item, search result). They control the markup and data for each result row. Create custom row plugins for custom item templates, specialized rendering logic, embedded views within rows, complex computed displays, or any custom formatting of individual view result items that goes beyond standard field rendering or entity display modes.

42. Views Exposed Form

Path: web/core/modules/views/src/Plugin/views/exposed_form/

  • Manager: ViewsPluginManager.php
  • Base Class: ExposedFormPluginBase.php

Description: Views Exposed Form plugins control how exposed filters are rendered and processed, including standard forms, AJAX submission, custom layouts, and specialized filter UIs. Create custom exposed form plugins for advanced filter UIs like faceted search, progressive disclosure filters, custom AJAX behaviors, mobile-optimized filter forms, saved searches, or any specialized exposed filter interface that enhances the filtering experience beyond standard form elements.

43. Views Access

Path: web/core/modules/views/src/Plugin/views/access/

  • Manager: ViewsPluginManager.php
  • Base Class: AccessPluginBase.php

Description: Views Access plugins define access control for views, determining who can see view displays based on permissions, roles, or custom logic. They're checked before the view renders. Create custom access plugins for subscription-based access, IP-based restrictions, time-based availability, custom business rules, integration with external authentication systems, or any specialized access control logic that determines view visibility.

44. Views Cache

Path: web/core/modules/views/src/Plugin/views/cache/

  • Manager: ViewsPluginManager.php
  • Base Class: CachePluginBase.php

Description: Views Cache plugins implement caching strategies for views query results and rendered output, controlling cache duration, invalidation triggers, and cache key generation. Create custom cache plugins for specialized caching strategies like tag-based invalidation, external cache backends (Redis, Varnish), adaptive cache timing based on query complexity, personalized caching, or any custom caching logic that optimizes view performance for your specific use case.

45. Views Area

Path: web/core/modules/views/src/Plugin/views/area/

  • Manager: ViewsHandlerManager.php
  • Base Class: AreaPluginBase.php

Description: Views Area plugins add content to views headers, footers, or empty result areas, such as text blocks, links, entity views, or custom rendered content. They support token replacement and visibility conditions. Create custom area plugins for dynamic messaging, result summaries, custom CTAs, embedded forms, faceted search interfaces, or any supplemental content that should appear alongside view results to provide context or actions.

46. Views Query

Path: web/core/modules/views/src/Plugin/views/query/

  • Manager: ViewsPluginManager.php
  • Base Class: QueryPluginBase.php

Description: Views Query plugins provide alternative query backends beyond SQL, such as Search API, external REST APIs, or custom data sources. They translate views configuration into appropriate queries for their backend. Create custom query plugins for integrating non-database data sources like Solr, Elasticsearch, REST APIs, CSV files, external databases, or any custom data source that you want to expose through the Views UI and query builder.

47. Views Wizard

Path: web/core/modules/views/src/Plugin/views/wizard/

  • Manager: WizardPluginManager.php
  • Base Class: WizardPluginBase.php

Description: Views Wizard plugins provide quick-start templates for creating common view types through the views creation wizard, pre-configuring displays, fields, filters, and sorts for specific use cases. Create custom wizard plugins for common view patterns in your project like event listings, product catalogs, user directories, or any frequently-created view configuration that benefits from a guided setup process with smart defaults.


Migration Module (4 Plugin Types)

Base Path: web/core/modules/migrate/src/Plugin/

48. Migration Source

Path: web/core/modules/migrate/src/Plugin/migrate/source/

  • Manager: MigrateSourcePluginManager.php
  • Base Class: SourcePluginBase.php

Description: Migration Source plugins define where migration data comes from (databases, CSV files, JSON, XML, external APIs), handling data fetching, iteration, and field mapping for the migration process. Create custom source plugins for importing from proprietary formats, external APIs, legacy databases, custom file formats, SaaS platforms, or any data source that needs to be migrated into Drupal with custom parsing and extraction logic.

49. Migration Process

Path: web/core/modules/migrate/src/Plugin/migrate/process/

  • Manager: MigratePluginManager.php
  • Base Class: ProcessPluginBase.php

Description: Migration Process plugins transform data during migration, performing operations like date format conversion, text manipulation, entity lookups, or custom business logic to map source data to destination fields. Create custom process plugins for complex data transformation, value mapping tables, conditional logic, data cleansing, concatenation, splitting, calculations, or any custom transformation needed to properly format source data for your Drupal entities.

50. Migration Destination

Path: web/core/modules/migrate/src/Plugin/migrate/destination/

  • Manager: MigrateDestinationPluginManager.php
  • Base Class: DestinationBase.php

Description: Migration Destination plugins define where migrated data goes (content entities, configuration, files), handling entity creation, updates, and rollback functionality. They manage the saving process and dependency tracking. Create custom destination plugins for specialized entity saving logic, external system synchronization, custom entity types, configuration deployment, or when you need fine-grained control over how migrated data is saved and validated in your Drupal installation.

51. Migrate Field (Drupal to Drupal)

Path: web/core/modules/migrate_drupal/src/Plugin/

  • Manager: MigrateFieldPluginManager.php

Description: Migrate Field plugins handle field-specific migration logic when migrating from Drupal 6/7/8/9 to newer versions, managing field data transformation, field configuration, and field type mapping between Drupal versions. Create custom migrate field plugins when upgrading custom field types, handling deprecated field storage, implementing custom field data transformations, or migrating contrib module fields that don't have automatic upgrade paths.


Content & Text Processing

52. Filter (Text Format)

Path: web/core/modules/filter/src/Plugin/Filter/

  • Manager: FilterPluginManager.php
  • Annotation: Filter.php
  • Base Class: FilterBase.php

Description: Filter plugins process and sanitize text before display, implementing text transformations like HTML filtering, line break conversion, token replacement, syntax highlighting, or custom markup processing within text formats. Create custom filters for custom shortcodes, BBCode conversion, markdown extensions, content security policies, link modification, embed transformations, or any specialized text processing that should be applied consistently across formatted text fields on your site.

53. Editor

Path: web/core/modules/editor/src/Plugin/

  • Manager: EditorManager.php
  • Annotation: Editor.php

Description: Editor plugins integrate WYSIWYG text editors with Drupal's text format system (like CKEditor 5), providing the UI for rich text editing with toolbar configuration and plugin integration. Create custom editor plugins when integrating alternative text editors like TinyMCE, custom markdown editors, specialized content editors, or when you need to provide a completely different rich text editing experience tailored to your content type or user workflow.

54. CKEditor5 Plugin

Path: web/core/modules/ckeditor5/src/Plugin/CKEditor5Plugin/

  • Manager: CKEditor5PluginManager.php
  • Annotation: CKEditor5Plugin.php

Description: CKEditor5 Plugin plugins add buttons, features, and functionality to the CKEditor 5 toolbar, such as custom buttons, dialogs, widgets, or specialized editing capabilities. Each plugin can provide toolbar items and configuration forms. Create custom CKEditor5 plugins for custom buttons, specialized content insertion tools, custom dialogs, entity embedding, shortcode insertion, accessibility tools, or any specialized editing features that authors need within the rich text editor interface.

55. Media Source

Path: web/core/modules/media/src/Plugin/media/Source/

  • Manager: MediaSourceManager.php
  • Annotation: MediaSource.php
  • Base Class: MediaSourceBase.php

Description: Media Source plugins define media types and how media entities handle different asset types (local files, remote videos, oEmbed, images, audio), including metadata extraction and thumbnail generation. Create custom media source plugins for specialized asset types like 3D models, podcasts, proprietary formats, cloud storage integrations (S3, Dropbox), DAM system integration, or any custom media source that requires specialized handling, metadata extraction, or preview generation.

56. Image Effect

Path: web/core/modules/image/src/Plugin/ImageEffect/

  • Manager: ImageEffectManager.php
  • Annotation: ImageEffect.php
  • Base Class: ImageEffectBase.php

Description: Image Effect plugins define image transformation operations used in image styles (crop, scale, rotate, desaturate, borders), with configuration forms for effect-specific settings. Effects are applied in sequence to create derivative images. Create custom image effects for watermarking, advanced cropping, focal point detection, AI-powered enhancements, brand overlays, custom filters, or any specialized image manipulation that should be available as a reusable effect in image style configuration.


Search, Help & Translation

57. Search Plugin

Path: web/core/modules/search/src/Plugin/

  • Manager: SearchPluginManager.php
  • Annotation: SearchPlugin.php
  • Base Class: SearchPluginBase.php

Description: Search Plugin plugins implement search backends and indexing strategies, handling query parsing, result ranking, and search form presentation. They power the core search functionality. Create custom search plugins for specialized search implementations like product search, faceted search, fuzzy matching, multilingual search, external search service integration (Algolia, Elasticsearch), or custom ranking algorithms tailored to your content and user needs.

58. Help Section

Path: web/core/modules/help/src/Plugin/HelpSection/

  • Manager: HelpSectionManager.php
  • Annotation: HelpSection.php

Description: Help Section plugins define categories on the help page, organizing help topics into logical groups like "Content", "Configuration", "Development", making help documentation easier to navigate. Create custom help sections when your module provides multiple help topics that should be grouped together, or when you want to organize help content by workflow, user role, or feature area for better discoverability in the help system.

59. Help Topic

Path: web/core/modules/help/src/Plugin/HelpTopic/

  • Manager: HelpTopicPluginManager.php

Description: Help Topic plugins provide individual help documentation pages with structured content, search metadata, and cross-references. They support various formats including Twig templates and markdown. Create custom help topics for module documentation, feature explanations, workflow guides, troubleshooting content, or any instructional content that should be integrated into Drupal's help system and searchable through the help interface.

60. Config Mapper

Path: web/core/modules/config_translation/src/

  • Manager: ConfigMapperManager.php

Description: Config Mapper plugins define which configuration objects are translatable and how their translation interfaces are structured, enabling multilingual configuration like translated site information, menu links, or custom configuration. Create custom config mappers when you have custom configuration that needs translation support, complex config structures requiring custom translation UIs, or when integrating third-party configuration systems that should support multilingual content.


Internationalization & Workflows

61. Language Negotiation

Path: web/core/modules/language/src/Plugin/LanguageNegotiation/

  • Manager: LanguageNegotiationMethodManager.php
  • Annotation: LanguageNegotiation.php

Description: Language Negotiation plugins determine which language to display to users based on various criteria (URL prefix, domain, browser settings, user preferences, session data), enabling sophisticated multilingual site configurations. Create custom language negotiation plugins for geo-location based language detection, business rules, custom cookie handling, API-based detection, subdomain logic, or any specialized language selection algorithm that determines the appropriate language for each request.

62. Workflow Type

Path: web/core/modules/workflows/src/Plugin/WorkflowType/

  • Manager: WorkflowTypeManager.php
  • Annotation: WorkflowType.php

Description: Workflow Type plugins define custom workflow systems with states and transitions beyond the default content moderation workflow, enabling specialized approval processes, publication workflows, or custom state machines. Create custom workflow types for specialized approval workflows, multi-stage review processes, order fulfillment states, ticket systems, custom publishing workflows, or any domain-specific state machine that manages entity lifecycle with custom states and business rules.


API & Layout

63. REST Resource

Path: web/core/modules/rest/src/Plugin/rest/resource/

  • Manager: ResourcePluginManager.php
  • Annotation: RestResource.php
  • Base Class: ResourceBase.php

Description: REST Resource plugins define RESTful API endpoints with GET, POST, PATCH, DELETE methods, serialization formats, and authentication requirements, extending Drupal's REST API with custom endpoints. Create custom REST resources for custom API endpoints, specialized data transformations, aggregated responses, external service proxies, custom business logic APIs, or any specialized web service that needs RESTful access with Drupal's authentication and serialization infrastructure.

64. Section Storage (Layout Builder)

Path: web/core/modules/layout_builder/src/SectionStorage/

  • Manager: SectionStorageManager.php
  • Annotation: SectionStorage.php

Description: Section Storage plugins define how Layout Builder layouts are stored and retrieved (entity defaults, overrides, temporary storage), managing the persistence and loading of layout configuration. Create custom section storage plugins for alternative layout storage locations, external layout definitions, shared layouts across entities, layout templates, or custom layout management systems that need specialized storage and retrieval logic beyond default entity layout storage.

65. Top Bar Item (Navigation Module)

Path: web/core/modules/navigation/src/Plugin/TopBarItem/

  • Manager: TopBarItemManager.php
  • Annotation: TopBarItem.php

Description: Top Bar Item plugins add items to the navigation module's top bar (the modern replacement for the admin toolbar), providing quick access to administrative functions, notifications, or custom tools with custom rendering and behavior. Create custom top bar items for module-specific quick actions, real-time notifications, status indicators, user profile shortcuts, search interfaces, or any administrative tool that benefits from persistent visibility in the top navigation bar.


Plugin Development Resources

Plugin System Infrastructure

Path: web/core/lib/Drupal/Core/Plugin/

  • DefaultPluginManager - Base manager class for plugin discovery and instantiation
  • PluginManagerBase - Lower-level plugin manager foundation
  • Discovery/ - Plugin discovery mechanisms (Annotation, Attribute, YAML)
  • Factory/ - Plugin instantiation factories

Annotation System

Path: web/core/lib/Drupal/Core/Annotation/

  • Plugin.php - Base annotation class
  • Individual annotations for each plugin type

Creating Custom Plugins

To create a custom plugin:

  1. Choose Plugin Type - Select the appropriate plugin type for your use case
  2. Create Plugin Class - Extend the base class or implement the interface
  3. Add Annotation - Use PHP attributes (#[PluginType]) or annotations (@PluginType)
  4. Implement Methods - Implement required methods from the interface
  5. Clear Cache - Run drush cr to register your new plugin

Plugin Discovery Methods

  • Annotation - Traditional @annotation in docblocks (Drupal 7-10)
  • Attribute - Modern PHP 8+ attributes #[Attribute] (Drupal 10+)
  • YAML - Plugin definitions in YAML files
  • Hook - Programmatic plugin registration via hooks

Summary Statistics

  • Core Plugin Types: 29
  • Views Plugin Types: 18
  • Migration Plugin Types: 4
  • Other Module Plugin Types: 14
  • Total Plugin Types: 65+

Use Case Index

Content Management: Block, Field Type, Field Widget, Field Formatter, Entity Type, Media Source Display & Theming: Layout, Component (SDC), Display Variant, Render Element Forms & Input: Form Element, Field Widget, CKEditor5 Plugin Data Validation: Constraint, Condition, Typed Data Navigation: Menu Link, Local Action, Local Task, Contextual Link Search & Filtering: Search Plugin, Views Filter, Views Field Media Processing: Image Toolkit, Image Effect, Media Source, Archiver Content Migration: Migration Source, Process, Destination Background Processing: Queue Worker, Action Multilingual: Language Negotiation, Config Mapper API Development: REST Resource, Link Relation Type, Entity Reference Selection Access Control: Views Access, Condition Workflows: Workflow Type, Action


Last Updated: 2026-01-14 Drupal Version: 11.x Document Path: /drupal-core-plugins-reference.md

Tags