- Merge request !148[#3549266]Β task: Move DisplayBuildableInterface to a new plugin type β (Open) created by pdureau
Step by step, DisplayBuildableInterface is becoming big and messy:
public static function getPrefix(): string;
public static function getContextRequirement(): string;
public static function checkInstanceId(string $instance_id): ?array;
public function getBuilderUrl(): Url;
public static function getUrlFromInstanceId(string $instance_id): Url;
public static function getDisplayUrlFromInstanceId(string $instance_id): Url;
public function getProfile(): ?ProfileInterface;
public function getInstanceId(): ?string;
public function initInstanceIfMissing(): void;
public function getInitialSources(): array;
public function getInitialContext(): array;
public function getSources(): array;
public function saveSources(): void;
And not discoverable, so we have added display_builder_provider_info hook.
With attribute discovery. Not configurable.
ProviderInterface:
getProfile(): ProfileInterface (the one saved in config/content, not the one from Instance)getInstance(): InstanceInterfacegetInitialSources(): array;getContextRequirement(): string;getContext(): array; (renamed from getInitialContext())getSources(): array;saveSources(): void;getUrl(): Url (as a replacement of both getBuilderUrl() and getDisplayUrlFromInstanceId)getDisplayUrl(): Url (as a replacement of getDisplayUrlFromInstanceId)We may not need this anymore:
instance_id as parameter: checkInstanceId, getUrlFromInstanceId, getDisplayUrlFromInstanceId because we now work on instanciated pluginsgetPrefix(): not currently used outside the classes. Can be replaced by a plugin attribute.getInstanceId(): replaced by getInstance()->id() or something like thatgetInitialSources() : only used in InstanceStorage::createFromImplementation()initInstanceIfMissing(): because implementation always the same, can be moved to a base classdisplay_builder_provider_info by the plugin type managerthat's it
Active
1.0
Main / Misc.
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.