Skip to content
Snippets Groups Projects

Issue #3498889: Add component source plugin

6 files
+ 34
41
Compare changes
  • Side-by-side
  • Inline
Files
6
@@ -52,24 +52,18 @@ interface ComponentSourceInterface extends PluginInspectionInterface, Derivative
public function getDependencies(array $settings): array;
/**
* Gets the definition of the component plugin.
* Gets referenced plugin classes for this instance.
*
* @return array
* The component plugin definition.
*/
public function getComponentPluginDefinition(): array;
/**
* Gets the underlying component instance.
*
* @return \Drupal\Core\Plugin\Component|\Drupal\Core\Block\BlockPluginInterface|\Drupal\experience_builder\Entity\JavaScriptComponent
* The underlying component instance, which can originate from a myriad of
* sources: Drupal plugins, Drupal config entities, local files, remote
* APIs, etc.
* This is used in validation to allow component tree items to limit the type
* of plugins that can be referenced. For example, the main content block
* can't be referenced by a content entity's component tree.
*
* @todo Decide what to do about the return type here
* @return string|null
* An FQCN of any plugin classes that this source plugin is referencing. For
* example a block source plugin might return the block plugin class it is
* referencing here.
*/
public function getComponentPlugin();
public function getReferencedPluginClass(): ?string;
/**
* Gets a description of the component.
Loading