From 0cf987506602fece5c825e5c3c56dbebd18ee7ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Wac=C5=82awczyk?= Date: Tue, 17 Dec 2024 15:39:25 +0100 Subject: [PATCH] SMM-32 add external vue components config option --- CHANGELOG.md | 1 + Model/VueProvider.php | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f5c5c2a1..97b7b725 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Bump cross-spawn from 7.0.3 to 7.0.6 ([#349](https://github.com/SnowdogApps/magento2-menu/pull/349)) - Add missing $escaper and $viewModels declarations ([#350](https://github.com/SnowdogApps/magento2-menu/pull/350)) - Import categories by store view ([#352](https://github.com/SnowdogApps/magento2-menu/pull/352)) +- Add external vue providers config option ## [2.27.2] - 2024-11-08 ### Fixed diff --git a/Model/VueProvider.php b/Model/VueProvider.php index 30f06db4..0a1b840d 100644 --- a/Model/VueProvider.php +++ b/Model/VueProvider.php @@ -13,13 +13,23 @@ class VueProvider */ private $components; + /** + * 3rd party extensions have to provide full path + * + * @var array + */ + private $externalComponents; + /** * @param array $components + * @param array $externalComponents */ public function __construct( - array $components = [] + array $components = [], + array $externalComponents = [] ) { $this->components = $components; + $this->externalComponents = $externalComponents; } /** @@ -31,6 +41,9 @@ public function getComponents(): array foreach ($this->components as $component) { $data[] = sprintf(self::COMPONENT_PATH, $component); } + foreach ($this->externalComponents as $externalComponent) { + $data[] = $externalComponent; + } return $data; }