File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
app/code/Magento/Email/Model/Template Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -230,12 +230,13 @@ private function getCssProcessor()
230
230
231
231
/**
232
232
* @deprecated
233
+ * @param string $dirType
233
234
* @return Filesystem\Directory\ReadInterface
234
235
*/
235
- private function getPubDirectory ()
236
+ private function getPubDirectory ($ dirType )
236
237
{
237
238
if (!$ this ->pubDirectory ) {
238
- $ this ->pubDirectory = ObjectManager::getInstance ()->get (Filesystem::class)->getDirectoryRead (DirectoryList:: STATIC_VIEW );
239
+ $ this ->pubDirectory = ObjectManager::getInstance ()->get (Filesystem::class)->getDirectoryRead ($ dirType );
239
240
}
240
241
return $ this ->pubDirectory ;
241
242
}
@@ -928,9 +929,9 @@ public function getCssFilesContent(array $files)
928
929
try {
929
930
foreach ($ files as $ file ) {
930
931
$ asset = $ this ->_assetRepo ->createAsset ($ file , $ designParams );
931
- $ filePath = $ asset ->getContext ()->getPath () . DIRECTORY_SEPARATOR . $ file ;
932
- if ($ this -> getPubDirectory ()-> isExist ( $ filePath )) {
933
- $ css .= $ this -> getPubDirectory ()-> readFile ( $ filePath );
932
+ $ pubDirectory = $ this -> getPubDirectory ( $ asset ->getContext ()->getBaseDirType ()) ;
933
+ if ($ pubDirectory -> isExist ( $ asset -> getRelativeSourceFilePath () )) {
934
+ $ css .= $ pubDirectory -> readFile ( $ asset -> getRelativeSourceFilePath () );
934
935
} else {
935
936
$ css .= $ asset ->getContent ();
936
937
}
You can’t perform that action at this time.
0 commit comments