Skip to content

Commit ddee6cc

Browse files
authored
Update Renderer.php
1 parent 41f99b7 commit ddee6cc

File tree

1 file changed

+6
-21
lines changed

1 file changed

+6
-21
lines changed

lib/internal/Magento/Framework/View/Page/Config/Renderer.php

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -250,47 +250,32 @@ protected function getMetadataTemplate($name)
250250
public function prepareFavicon()
251251
{
252252
if ($this->pageConfig->getFaviconFile()) {
253-
$this->addFaviconAsset(
253+
$this->pageConfig->addRemotePageAsset(
254254
$this->pageConfig->getFaviconFile(),
255+
Generator\Head::VIRTUAL_CONTENT_TYPE_LINK,
255256
['attributes' => ['rel' => 'icon', 'type' => 'image/x-icon']],
256257
'icon'
257258
);
258-
$this->addFaviconAsset(
259+
$this->pageConfig->addRemotePageAsset(
259260
$this->pageConfig->getFaviconFile(),
261+
Generator\Head::VIRTUAL_CONTENT_TYPE_LINK,
260262
['attributes' => ['rel' => 'shortcut icon', 'type' => 'image/x-icon']],
261263
'shortcut-icon'
262264
);
263265
} else {
264-
$this->addFaviconAsset(
266+
$this->pageConfig->addPageAsset(
265267
$this->pageConfig->getDefaultFavicon(),
266268
['attributes' => ['rel' => 'icon', 'type' => 'image/x-icon']],
267269
'icon'
268270
);
269-
$this->addFaviconAsset(
271+
$this->pageConfig->addPageAsset(
270272
$this->pageConfig->getDefaultFavicon(),
271273
['attributes' => ['rel' => 'shortcut icon', 'type' => 'image/x-icon']],
272274
'shortcut-icon'
273275
);
274276
}
275277
}
276278

277-
/**
278-
* Add favicon asset
279-
*
280-
* @param string $file
281-
* @param array $attributes
282-
* @param string $name
283-
*/
284-
protected function addFaviconAsset($file, $attributes, $name)
285-
{
286-
$this->pageConfig->addRemotePageAsset(
287-
$file,
288-
Generator\Head::VIRTUAL_CONTENT_TYPE_LINK,
289-
$attributes,
290-
$name
291-
);
292-
}
293-
294279
/**
295280
* Returns rendered HTML for all Assets (CSS before)
296281
*

0 commit comments

Comments
 (0)