Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
experience_builder
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
experience_builder
Merge requests
!581
Issue
#3498889
: Add component source plugin
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Issue
#3498889
: Add component source plugin
issue/experience_builder-3498889:3498889-component-source-plugin
into
0.x
Overview
89
Commits
83
Pipelines
67
Changes
6
Merged
Lee Rowlands
requested to merge
issue/experience_builder-3498889:3498889-component-source-plugin
into
0.x
1 week ago
Overview
49
Commits
83
Pipelines
67
Changes
6
Expand
Closes
#3498889
Astro island element
Asset controller integration
hook libraries integration
Edited
6 days ago
by
Lee Rowlands
0
0
Merge request reports
Viewing commit
2bac0651
Prev
Next
Show latest version
6 files
+
34
−
41
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
6
Search (e.g. *.vue) (Ctrl+P)
Verified
2bac0651
Reduce API surface
· 2bac0651
Lee Rowlands
authored
6 days ago
src/ComponentSource/ComponentSourceInterface.php
+
9
−
15
Options
@@ -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
get
ComponentPlugin
()
;
public
function
get
ReferencedPluginClass
():
?string
;
/**
* Gets a description of the component.
Loading