Skip to content

Commit 71ac952

Browse files
Merge pull request SnowdogApps#353 from SnowdogApps/feature/SMM-32
SMM-32 add external vue components config option
2 parents 5a4bf43 + 0cf9875 commit 71ac952

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1010
- Bump cross-spawn from 7.0.3 to 7.0.6 ([#349](https://github.com/SnowdogApps/magento2-menu/pull/349))
1111
- Add missing $escaper and $viewModels declarations ([#350](https://github.com/SnowdogApps/magento2-menu/pull/350))
1212
- Import categories by store view ([#352](https://github.com/SnowdogApps/magento2-menu/pull/352))
13+
- Add external vue providers config option
1314

1415
## [2.27.2] - 2024-11-08
1516
### Fixed

Model/VueProvider.php

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,23 @@ class VueProvider
1313
*/
1414
private $components;
1515

16+
/**
17+
* 3rd party extensions have to provide full path
18+
*
19+
* @var array
20+
*/
21+
private $externalComponents;
22+
1623
/**
1724
* @param array $components
25+
* @param array $externalComponents
1826
*/
1927
public function __construct(
20-
array $components = []
28+
array $components = [],
29+
array $externalComponents = []
2130
) {
2231
$this->components = $components;
32+
$this->externalComponents = $externalComponents;
2333
}
2434

2535
/**
@@ -31,6 +41,9 @@ public function getComponents(): array
3141
foreach ($this->components as $component) {
3242
$data[] = sprintf(self::COMPONENT_PATH, $component);
3343
}
44+
foreach ($this->externalComponents as $externalComponent) {
45+
$data[] = $externalComponent;
46+
}
3447

3548
return $data;
3649
}

0 commit comments

Comments
 (0)