Skip to content

Commit

Permalink
Fixed incorrect dependencies errors
Browse files Browse the repository at this point in the history
  • Loading branch information
vovayatsyuk committed May 19, 2016
1 parent 83583f7 commit 07533e5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 41 deletions.
12 changes: 2 additions & 10 deletions Block/SubcategoriesList.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,7 @@ class SubcategoriesList extends \Magento\Framework\View\Element\Template impleme
* @var CategoryRepositoryInterface
*/
protected $categoryRepository;
/**
* Store manager
*
* @var \Magento\Store\Model\StoreManagerInterface
*/
protected $storeManager;

/**
* Catalog layer
*
Expand All @@ -53,7 +48,6 @@ class SubcategoriesList extends \Magento\Framework\View\Element\Template impleme
* @param \Swissup\Easycatalogimg\Helper\Config $configHelper
* @param \Magento\Framework\Registry $registry
* @param CategoryRepositoryInterface $categoryRepository
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
* @param \Swissup\Easycatalogimg\Helper\Image $imageHelper
* @param \Magento\Catalog\Model\Layer\Resolver $layerResolver
* @param \Magento\Framework\File\Mime $mime
Expand All @@ -64,7 +58,6 @@ public function __construct(
\Swissup\Easycatalogimg\Helper\Config $configHelper,
\Magento\Framework\Registry $registry,
CategoryRepositoryInterface $categoryRepository,
\Magento\Store\Model\StoreManagerInterface $storeManager,
\Swissup\Easycatalogimg\Helper\Image $imageHelper,
\Magento\Catalog\Model\Layer\Resolver $layerResolver,
\Magento\Framework\File\Mime $mime,
Expand All @@ -73,7 +66,6 @@ public function __construct(
$this->configHelper = $configHelper;
$this->coreRegistry = $registry;
$this->categoryRepository = $categoryRepository;
$this->storeManager = $storeManager;
$this->imageHelper = $imageHelper;
$this->catalogLayer = $layerResolver->get();
$this->mime = $mime;
Expand Down Expand Up @@ -217,7 +209,7 @@ public function getCategoryId()
*/
public function getCurrentStore()
{
return $this->storeManager->getStore();
return $this->_storeManager->getStore();
}
/**
* Get category thumbnail, image or placeholder url
Expand Down
22 changes: 2 additions & 20 deletions Helper/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,28 +92,10 @@ class Config extends AbstractHelper
* @var string
*/
const XML_PATH_CATEGORY_CONFIG = 'easycatalogimg/category';
/**
* @var \Magento\Framework\App\Config\ScopeConfigInterface
*/
protected $_scopeConfig;
/**
* Constructor
*
* @param \Magento\Framework\App\Helper\Context $context
* @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
*/
public function __construct(
\Magento\Framework\App\Helper\Context $context,
\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
)
{
parent::__construct($context);
$this->_scopeConfig = $scopeConfig;
}

protected function _getConfig($key)
{
return $this->_scopeConfig->getValue($key, ScopeInterface::SCOPE_STORE);
return $this->scopeConfig->getValue($key, ScopeInterface::SCOPE_STORE);
}
public function useImageAttribute()
{
Expand Down
14 changes: 3 additions & 11 deletions Helper/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,33 +39,25 @@ class Image extends \Magento\Framework\App\Helper\AbstractHelper
* @var \Magento\Framework\Filesystem
*/
protected $fileSystem;
/**
* url builder
*
* @var \Magento\Framework\UrlInterface
*/
protected $urlBuilder;

/**
* @param \Magento\Framework\App\Helper\Context $context
* @param \Magento\Framework\Filesystem\Io\File $ioFile
* @param \Magento\Framework\Image\Factory $imageFactory
* @param \Swissup\Easycatalogimg\Helper\Config $configHelper
* @param \Magento\Framework\Filesystem $fileSystem
* @param \Magento\Framework\UrlInterface $urlBuilder
*/
public function __construct(
\Magento\Framework\App\Helper\Context $context,
\Magento\Framework\Filesystem\Io\File $ioFile,
\Magento\Framework\Image\Factory $imageFactory,
\Swissup\Easycatalogimg\Helper\Config $configHelper,
\Magento\Framework\Filesystem $fileSystem,
UrlInterface $urlBuilder
\Magento\Framework\Filesystem $fileSystem
) {
$this->ioFile = $ioFile;
$this->imageFactory = $imageFactory;
$this->configHelper = $configHelper;
$this->fileSystem = $fileSystem;
$this->urlBuilder = $urlBuilder;
parent::__construct($context);
}
/**
Expand Down Expand Up @@ -149,7 +141,7 @@ public function getBaseUrl(
$type = UrlInterface::URL_TYPE_MEDIA
)
{
return $this->urlBuilder
return $this->_urlBuilder
->getBaseUrl(['_type' => $type]) . $path;
}
/**
Expand Down

0 comments on commit 07533e5

Please sign in to comment.