File tree Expand file tree Collapse file tree 1 file changed +18
-4
lines changed
lib/internal/Magento/Framework/View/Page/Config/Generator Expand file tree Collapse file tree 1 file changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -57,14 +57,23 @@ class Head implements Layout\GeneratorInterface
57
57
*/
58
58
protected $ pageConfig ;
59
59
60
+ /**
61
+ * @var \Magento\Framework\UrlInterface
62
+ */
63
+ protected $ url ;
64
+
60
65
/**
61
66
* Constructor
62
67
*
63
68
* @param \Magento\Framework\View\Page\Config $pageConfig
69
+ * @param \Magento\Framework\UrlInterface $url
64
70
*/
65
- public function __construct (\Magento \Framework \View \Page \Config $ pageConfig )
66
- {
71
+ public function __construct (
72
+ \Magento \Framework \View \Page \Config $ pageConfig ,
73
+ \Magento \Framework \UrlInterface $ url
74
+ ) {
67
75
$ this ->pageConfig = $ pageConfig ;
76
+ $ this ->url = $ url ;
68
77
}
69
78
70
79
/**
@@ -107,10 +116,15 @@ protected function processAssets(Structure $pageStructure)
107
116
{
108
117
foreach ($ pageStructure ->getAssets () as $ name => $ data ) {
109
118
if (isset ($ data ['src_type ' ]) && in_array ($ data ['src_type ' ], $ this ->remoteAssetTypes )) {
119
+ if ($ data ['src_type ' ] === self ::SRC_TYPE_CONTROLLER ) {
120
+ $ data ['src ' ] = $ this ->url ->getUrl ($ data ['src ' ]);
121
+ }
122
+
110
123
$ this ->pageConfig ->addRemotePageAsset (
111
- $ name ,
124
+ $ data [ ' src ' ] ,
112
125
isset ($ data ['content_type ' ]) ? $ data ['content_type ' ] : self ::VIRTUAL_CONTENT_TYPE_LINK ,
113
- $ this ->getAssetProperties ($ data )
126
+ $ this ->getAssetProperties ($ data ),
127
+ $ name
114
128
);
115
129
} else {
116
130
$ this ->pageConfig ->addPageAsset ($ name , $ this ->getAssetProperties ($ data ));
You can’t perform that action at this time.
0 commit comments