File tree Expand file tree Collapse file tree 1 file changed +13
-7
lines changed
lib/internal/Magento/Framework/View/Asset Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -135,20 +135,26 @@ public function updateDesignParams(array &$params)
135135 }
136136
137137 // Set themeModel
138- $ theme = null ;
138+ $ themeId = null ;
139+ $ themePath = null ;
139140 $ area = $ params ['area ' ];
140141 if (!empty ($ params ['themeId ' ])) {
141- $ theme = $ params ['themeId ' ];
142+ $ themeId = $ params ['themeId ' ];
142143 } elseif (isset ($ params ['theme ' ])) {
143- $ theme = $ params ['theme ' ];
144+ $ themePath = $ params ['theme ' ];
144145 } elseif (empty ($ params ['themeModel ' ]) && $ area !== $ this ->getDefaultParameter ('area ' )) {
145- $ theme = $ this ->design ->getConfigurationDesignTheme ($ area );
146+ $ themeId = $ this ->design ->getConfigurationDesignTheme ($ area );
146147 }
147148
148- if ($ theme ) {
149- $ params ['themeModel ' ] = $ this ->getThemeProvider ()->getThemeById ($ theme );
149+ if ($ themeId ) {
150+ $ params ['themeModel ' ] = $ this ->getThemeProvider ()->getThemeById ($ themeId );
150151 if (!$ params ['themeModel ' ]) {
151- throw new \UnexpectedValueException ("Could not find theme ' $ theme' for area ' $ area' " );
152+ throw new \UnexpectedValueException ("Could not find theme ' $ themeId' for area ' $ area' " );
153+ }
154+ } elseif ($ themePath ) {
155+ $ params ['themeModel ' ] = $ this ->getThemeProvider ()->getThemeByFullPath ($ area . '/ ' . $ themePath );
156+ if (!$ params ['themeModel ' ]) {
157+ throw new \UnexpectedValueException ("Could not find theme ' $ themePath' for area ' $ area' " );
152158 }
153159 } elseif (empty ($ params ['themeModel ' ])) {
154160 $ params ['themeModel ' ] = $ this ->getDefaultParameter ('themeModel ' );
You can’t perform that action at this time.
0 commit comments