@@ -250,47 +250,32 @@ protected function getMetadataTemplate($name)
250
250
public function prepareFavicon ()
251
251
{
252
252
if ($ this ->pageConfig ->getFaviconFile ()) {
253
- $ this ->addFaviconAsset (
253
+ $ this ->pageConfig -> addRemotePageAsset (
254
254
$ this ->pageConfig ->getFaviconFile (),
255
+ Generator \Head::VIRTUAL_CONTENT_TYPE_LINK ,
255
256
['attributes ' => ['rel ' => 'icon ' , 'type ' => 'image/x-icon ' ]],
256
257
'icon '
257
258
);
258
- $ this ->addFaviconAsset (
259
+ $ this ->pageConfig -> addRemotePageAsset (
259
260
$ this ->pageConfig ->getFaviconFile (),
261
+ Generator \Head::VIRTUAL_CONTENT_TYPE_LINK ,
260
262
['attributes ' => ['rel ' => 'shortcut icon ' , 'type ' => 'image/x-icon ' ]],
261
263
'shortcut-icon '
262
264
);
263
265
} else {
264
- $ this ->addFaviconAsset (
266
+ $ this ->pageConfig -> addPageAsset (
265
267
$ this ->pageConfig ->getDefaultFavicon (),
266
268
['attributes ' => ['rel ' => 'icon ' , 'type ' => 'image/x-icon ' ]],
267
269
'icon '
268
270
);
269
- $ this ->addFaviconAsset (
271
+ $ this ->pageConfig -> addPageAsset (
270
272
$ this ->pageConfig ->getDefaultFavicon (),
271
273
['attributes ' => ['rel ' => 'shortcut icon ' , 'type ' => 'image/x-icon ' ]],
272
274
'shortcut-icon '
273
275
);
274
276
}
275
277
}
276
278
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
-
294
279
/**
295
280
* Returns rendered HTML for all Assets (CSS before)
296
281
*
0 commit comments