Example #1
0
 public function testGetFaviconFile()
 {
     $storeMock = $this->getMock('\\Magento\\Store\\Model\\Store', array(), array(), '', false);
     $storeMock->expects($this->any())->method('getBaseUrl')->will($this->returnValue('baseUrl/'));
     $this->_context->getStoreManager()->expects($this->any())->method('getStore')->will($this->returnValue($storeMock));
     $this->_context->getScopeConfig()->expects($this->any())->method('getValue')->will($this->returnValue('scopeConfig'));
     $mediaDirMock = $this->getMock('\\Magento\\Framework\\Filesystem\\Directory\\Read', array(), array(), '', false);
     $mediaDirMock->expects($this->any())->method('isFile')->with('favicon/scopeConfig')->will($this->returnValue(true));
     $this->_context->getFilesystem()->expects($this->once())->method('getDirectoryRead')->will($this->returnValue($mediaDirMock));
     $this->assertEquals('baseUrl/favicon/scopeConfig', $this->_block->getFaviconFile());
 }
 /**
  * @param \Magento\Framework\View\Element\Template\Context $context
  * @param \Magento\Framework\App\Http\Context $httpContext
  * @param \Magento\SalesRule\Model\Rss\Discounts $rssModel
  * @param \Magento\Framework\App\Rss\UrlBuilderInterface $rssUrlBuilder
  * @param array $data
  */
 public function __construct(\Magento\Framework\View\Element\Template\Context $context, \Magento\Framework\App\Http\Context $httpContext, \Magento\SalesRule\Model\Rss\Discounts $rssModel, \Magento\Framework\App\Rss\UrlBuilderInterface $rssUrlBuilder, array $data = [])
 {
     $this->storeManager = $context->getStoreManager();
     $this->rssModel = $rssModel;
     $this->httpContext = $httpContext;
     $this->rssUrlBuilder = $rssUrlBuilder;
     parent::__construct($context, $data);
 }
 /**
  * @param \Magento\Framework\View\Element\Template\Context $context
  * @param \Magento\Catalog\Helper\Image $imageHelper
  * @param \Magento\Catalog\Model\Rss\Product\NewProducts $rssModel
  * @param \Magento\Framework\App\Rss\UrlBuilderInterface $rssUrlBuilder
  * @param array $data
  */
 public function __construct(\Magento\Framework\View\Element\Template\Context $context, \Mageplaza\Blog\Model\CategoryFactory $rssModel, \Mageplaza\Blog\Helper\Data $helper, \Magento\Framework\App\Rss\UrlBuilderInterface $rssUrlBuilder, array $data = [])
 {
     $this->helper = $helper;
     $this->rssModel = $rssModel;
     $this->rssUrlBuilder = $rssUrlBuilder;
     $this->storeManager = $context->getStoreManager();
     parent::__construct($context, $data);
 }
Example #4
0
 /**
  * @param \Magento\Framework\View\Element\Template\Context $context
  * @param \Magento\Catalog\Helper\Image $imageHelper
  * @param \Magento\Catalog\Model\Rss\Product\NewProducts $rssModel
  * @param \Magento\Framework\App\Rss\UrlBuilderInterface $rssUrlBuilder
  * @param array $data
  */
 public function __construct(\Magento\Framework\View\Element\Template\Context $context, \Magento\Catalog\Helper\Image $imageHelper, \Magento\Catalog\Model\Rss\Product\NewProducts $rssModel, \Magento\Framework\App\Rss\UrlBuilderInterface $rssUrlBuilder, array $data = [])
 {
     $this->imageHelper = $imageHelper;
     $this->rssModel = $rssModel;
     $this->rssUrlBuilder = $rssUrlBuilder;
     $this->storeManager = $context->getStoreManager();
     parent::__construct($context, $data);
 }
Example #5
0
 /**
  * Constructor
  *
  * @param Context         $context
  * @param Config          $config
  * @param FormatInterface $localeFormat
  * @param SearchHelper    $searchHelper
  */
 public function __construct(Context $context, Config $config, FormatInterface $localeFormat, SearchHelper $searchHelper)
 {
     $this->storeManager = $context->getStoreManager();
     $this->config = $config;
     $this->localeFormat = $localeFormat;
     $this->searchHelper = $searchHelper;
     parent::__construct($context);
 }
Example #6
0
 /**
  * @param \Magento\Framework\View\Element\Template\Context $context
  * @param \Magento\Catalog\Model\CategoryFactory $categoryFactory
  * @param \Magento\Catalog\Model\Rss\Category $rssModel
  * @param \Magento\Framework\App\Rss\UrlBuilderInterface $rssUrlBuilder
  * @param \Magento\Catalog\Helper\Image $imageHelper
  * @param \Magento\Customer\Model\Session $customerSession
  * @param CategoryRepositoryInterface $categoryRepository
  * @param array $data
  * @SuppressWarnings(PHPMD.ExcessiveParameterList)
  */
 public function __construct(\Magento\Framework\View\Element\Template\Context $context, \Magento\Catalog\Model\CategoryFactory $categoryFactory, \Magento\Catalog\Model\Rss\Category $rssModel, \Magento\Framework\App\Rss\UrlBuilderInterface $rssUrlBuilder, \Magento\Catalog\Helper\Image $imageHelper, \Magento\Customer\Model\Session $customerSession, CategoryRepositoryInterface $categoryRepository, array $data = [])
 {
     $this->imageHelper = $imageHelper;
     $this->categoryFactory = $categoryFactory;
     $this->customerSession = $customerSession;
     $this->rssModel = $rssModel;
     $this->rssUrlBuilder = $rssUrlBuilder;
     $this->storeManager = $context->getStoreManager();
     $this->categoryRepository = $categoryRepository;
     parent::__construct($context, $data);
 }
Example #7
0
 /**
  * @param \Magento\Framework\View\Element\Template\Context $context
  * @param \Magento\Framework\App\Http\Context $httpContext
  * @param \Magento\Catalog\Helper\Image $imageHelper
  * @param \Magento\Catalog\Helper\Output $outputHelper
  * @param \Magento\Msrp\Helper\Data $msrpHelper
  * @param \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency
  * @param \Magento\Catalog\Model\Rss\Product\Special $rssModel
  * @param \Magento\Framework\App\Rss\UrlBuilderInterface $rssUrlBuilder
  * @param \Magento\Framework\Locale\ResolverInterface $localeResolver
  * @param array $data
  * @SuppressWarnings(PHPMD.ExcessiveParameterList)
  */
 public function __construct(\Magento\Framework\View\Element\Template\Context $context, \Magento\Framework\App\Http\Context $httpContext, \Magento\Catalog\Helper\Image $imageHelper, \Magento\Catalog\Helper\Output $outputHelper, \Magento\Msrp\Helper\Data $msrpHelper, \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency, \Magento\Catalog\Model\Rss\Product\Special $rssModel, \Magento\Framework\App\Rss\UrlBuilderInterface $rssUrlBuilder, \Magento\Framework\Locale\ResolverInterface $localeResolver, array $data = [])
 {
     $this->outputHelper = $outputHelper;
     $this->imageHelper = $imageHelper;
     $this->rssModel = $rssModel;
     $this->rssUrlBuilder = $rssUrlBuilder;
     $this->priceCurrency = $priceCurrency;
     $this->msrpHelper = $msrpHelper;
     $this->httpContext = $httpContext;
     $this->storeManager = $context->getStoreManager();
     parent::__construct($context, $data);
     $this->localeResolver = $localeResolver;
 }
Example #8
0
 public function __construct(\Magento\Framework\View\Element\Template\Context $context, \Riskified\Decider\Api\Config $apiConfig, \Magento\Framework\Session\SessionManagerInterface $session, array $data = [])
 {
     $this->validator = $context->getValidator();
     $this->resolver = $context->getResolver();
     $this->_filesystem = $context->getFilesystem();
     $this->templateEnginePool = $context->getEnginePool();
     $this->_storeManager = $context->getStoreManager();
     $this->_appState = $context->getAppState();
     $this->templateContext = $this;
     $this->pageConfig = $context->getPageConfig();
     $this->apiConfig = $apiConfig;
     $this->session = $session;
     parent::__construct($context, $data);
 }
Example #9
0
 public function __construct(\Stepzerosolutions\Tbslider\Model\Image $imageprocessor, \Magento\Framework\View\Element\Template\Context $context)
 {
     $this->_imageprocessor = $imageprocessor;
     $this->_storeManager = $context->getStoreManager();
 }
Example #10
0
 /**
  * Category constructor.
  *
  * @param CatalogCategoryFactory $categoryFactory
  * @param ObjectManagerInterface $objectManager
  * @param Context                $context
  * @param array                  $data
  */
 public function __construct(CatalogCategoryFactory $categoryFactory, ObjectManagerInterface $objectManager, Context $context, array $data = [])
 {
     $this->storeManager = $context->getStoreManager();
     $this->categoryFactory = $categoryFactory;
     parent::__construct($context, $objectManager, $data);
 }
Example #11
0
 /**
  * Constructor
  *
  * @param Template\Context $context
  * @param array $data
  */
 public function __construct(Template\Context $context, array $data = [])
 {
     $this->_filesystem = $context->getFilesystem();
     $this->_viewFileSystem = $context->getViewFileSystem();
     $this->templateEnginePool = $context->getEnginePool();
     $this->_storeManager = $context->getStoreManager();
     $this->_appState = $context->getAppState();
     $this->templateContext = $this;
     $this->pageConfig = $context->getPageConfig();
     parent::__construct($context, $data);
 }