- public function prepareFavicon()
- {
- if ($this->pageConfig->getFaviconFile()) {
- $this->pageConfig->addRemotePageAsset(
- $this->pageConfig->getFaviconFile(),
- Generator\Head::VIRTUAL_CONTENT_TYPE_LINK,
- ['attributes' => ['rel' => 'icon', 'type' => 'image/x-icon']],
- 'icon'
- );
- $this->pageConfig->addRemotePageAsset(
- $this->pageConfig->getFaviconFile(),
- Generator\Head::VIRTUAL_CONTENT_TYPE_LINK,
- ['attributes' => ['rel' => 'shortcut icon', 'type' => 'image/x-icon']],
- 'shortcut-icon'
- );
- } else {
- $this->pageConfig->addPageAsset(
- $this->pageConfig->getDefaultFavicon(),
- ['attributes' => ['rel' => 'icon', 'type' => 'image/x-icon']],
- 'icon'
- );
- $this->pageConfig->addPageAsset(
- $this->pageConfig->getDefaultFavicon(),
- ['attributes' => ['rel' => 'shortcut icon', 'type' => 'image/x-icon']],
- 'shortcut-icon'
- );
- }
- }