Skip to content

Public API

From 1.0.0-rc1, what this page lists keeps working until 2.0.0. A change goes through a deprecation first.

Drupal core's backwards compatibility policy applies. Controllers, forms, plugin classes, entity handlers, event subscribers, access checkers, hook implementations and constructors are not API. Neither is a public method missing from an interface, or a protected member of a class not marked @api.

Interfaces

Every interface not marked @internal can be type-hinted. The main ones are InstanceInterface, IslandInterface, IslandEventSubscriberInterface, DisplayBuildableInterface and IslandPluginManagerInterface.

These interfaces can gain a method in a minor release, always with a default in the matching base class. Implement them by extending the base class.

SourceWithSlotsInterface, SourceProcessingDataInterface and EmptyPlaceholderHelpInterface are @api: they gain no method.

Base classes and traits

Marked @api, so their protected members are supported too:

  • IslandPluginBase and the traits IslandConfigurationFormTrait, IslandReloadEventsTrait, IslandWithFormTrait and RenderableBuilderTrait, for an island.
  • DisplayBuildablePluginBase and ConfigBuildablePluginBase for a buildable, and IntegrationControllerBase for its builder page.

A protected member marked @internal is the exception.

Values, events and helpers

  • InvalidNodeException, thrown by InstanceInterface.
  • DisplayReference, PageDisplays and PublicationStatus.
  • HtmxEvents, to make an island's render array send a builder request.
  • SseState, to tell open builders an instance changed.
  • ProfileIslandsUpdater, to update stored profiles from an update hook.
  • The DisplayBuilderEvents names and DisplayBuilderEvent. They fire from the builder UI only, never for a change made through InstanceInterface.
  • The Island and DisplayBuildable attributes, and the IslandType enum.
  • The hooks in display_builder.api.php.

Not API

Classes marked @internal, such as SourceTree. To read a layout, walk InstanceInterface::getSources(): its node shape is documented on the interface.