Вопрос

version Magento 2.2.2

Class Magento\Catalog\Model\View\Asset\Image not found in line 8

the following file

namespace Vnecoms\Vendors\Model\View\Asset;
use Magento\Catalog\Model\Product\Media\ConfigInterface;
use Magento\Framework\Encryption\EncryptorInterface;
use Magento\Framework\View\Asset\ContextInterface;

class Image extends \Magento\Catalog\Model\View\Asset\Image
{
    /**
     * Image constructor.
     *
     * @param ConfigInterface $mediaConfig
     * @param ContextInterface $context
     * @param EncryptorInterface $encryptor
     * @param string $filePath
     * @param array $miscParams
     */
    public function __construct(
        ConfigInterface $mediaConfig,
        ContextInterface $context,
        EncryptorInterface $encryptor,
        $filePath,
        array $miscParams = []
    ) {
        parent::__construct($mediaConfig, $context, $encryptor, $filePath, $miscParams);
    }
}

actually this line:

class Image extends \Magento\Catalog\Model\View\Asset\Image
Это было полезно?

Решение

Seems something wrong with your files, because that file exists in the Magento ver. 2.2.2. You can find it in the official repository and copy to your server https://github.com/magento/magento2/blob/2.2.2/app/code/Magento/Catalog/Model/View/Asset/Image.php

PS: I strongly recommend you to check all Magento files.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с magento.stackexchange
scroll top