コード例 #1
0
 /**
  * @covers \Magento\Framework\App\Helper\AbstractHelper::urlEncode
  * @covers \Magento\Framework\App\Helper\AbstractHelper::urlDecode
  */
 public function testUrlDecode()
 {
     $data = uniqid();
     $result = $this->helper->urlEncode($data);
     $this->urlBuilderMock->expects($this->once())->method('sessionUrlVar')->with($this->equalTo($data))->will($this->returnValue($result));
     $this->assertNotContains('&', $result);
     $this->assertNotContains('%', $result);
     $this->assertNotContains('+', $result);
     $this->assertNotContains('=', $result);
     $this->assertEquals($result, $this->helper->urlDecode($result));
 }
コード例 #2
0
ファイル: Data.php プロジェクト: vasuscoin/brand
 /**
  * Initialize dependencies.
  *
  * @param \Magento\Framework\App\Helper\Context $context
  * @param \Magento\Store\Model\StoreManagerInterface $storeManager,
  * @param \Ves\Brand\Model\ResourceModel\Group\Collection $groupCollection
  */
 public function __construct(\Magento\Framework\App\Helper\Context $context, \Magento\Store\Model\StoreManagerInterface $storeManager, \Ves\Brand\Model\Group $groupCollection, \Magento\Cms\Model\Template\FilterProvider $filterProvider)
 {
     parent::__construct($context);
     $this->_filterProvider = $filterProvider;
     $this->_storeManager = $storeManager;
     $this->_groupCollection = $groupCollection;
 }
コード例 #3
0
ファイル: Output.php プロジェクト: pradeep-wagento/magento2
 /**
  * @param \Magento\Framework\App\Helper\Context $context
  * @param \Magento\Eav\Model\Config $eavConfig
  * @param Data $catalogData
  * @param \Magento\Framework\Escaper $escaper
  */
 public function __construct(\Magento\Framework\App\Helper\Context $context, \Magento\Eav\Model\Config $eavConfig, Data $catalogData, \Magento\Framework\Escaper $escaper)
 {
     $this->_eavConfig = $eavConfig;
     $this->_catalogData = $catalogData;
     $this->_escaper = $escaper;
     parent::__construct($context);
 }
コード例 #4
0
 /**
  * @param Context $context
  * @param \Magento\Braintree\Helper\Data $paymentHelper
  * @param BraintreeCustomer $braintreeCustomerAdapter
  * @param \Magento\Backend\Model\Session\Quote $sessionQuote
  */
 public function __construct(Context $context, \Magento\Braintree\Helper\Data $paymentHelper, BraintreeCustomer $braintreeCustomerAdapter, \Magento\Backend\Model\Session\Quote $sessionQuote)
 {
     parent::__construct($context);
     $this->paymentHelper = $paymentHelper;
     $this->braintreeCustomerAdapter = $braintreeCustomerAdapter;
     $this->sessionQuote = $sessionQuote;
 }
コード例 #5
0
 /**
  * @param \Magento\Framework\App\Helper\Context $context
  * @param \Magento\Framework\Registry $coreRegistry
  * @param \Magento\Framework\ObjectManager\ConfigInterface $config
  */
 public function __construct(\Magento\Framework\App\Helper\Context $context, \Magento\Framework\Registry $coreRegistry, \Magento\Framework\ObjectManager\ConfigInterface $config, \Magento\Backend\App\ConfigInterface $backendConfig)
 {
     $this->_coreRegistry = $coreRegistry;
     $this->_preferences = $config->getPreferences();
     $this->addDevToolData($this->preferencesKey, $this->_preferences);
     parent::__construct($context);
 }
コード例 #6
0
ファイル: Data.php プロジェクト: Doability/magento2dev
 /**
  * Constructor
  * gi
  * @param ObjectManagerInterface $objectManager
  * @param Config                 $config
  * @param Context                $context
  */
 public function __construct(ObjectManagerInterface $objectManager, Config $config, Context $context)
 {
     $this->objectManager = $objectManager;
     $this->moduleManager = $context->getModuleManager();
     $this->config = $config;
     return parent::__construct($context);
 }
コード例 #7
0
ファイル: Data.php プロジェクト: pivulic/adyen-magento2
 /**
  * @param Context $context
  */
 public function __construct(\Magento\Framework\App\Helper\Context $context, \Magento\Framework\Encryption\EncryptorInterface $encryptor, \Magento\Payment\Model\Config $config, \Magento\Framework\Config\DataInterface $dataStorage)
 {
     parent::__construct($context);
     $this->_encryptor = $encryptor;
     $this->_config = $config;
     $this->_dataStorage = $dataStorage;
 }
コード例 #8
0
ファイル: Data.php プロジェクト: mrtuvn/m2ce.dev
 public function __construct(\Magento\Framework\App\Helper\Context $context, \Magento\Catalog\Model\ResourceModel\Category\CollectionFactory $categoryCollectionFactory, \Magento\Backend\Model\UrlInterface $backendUrl, \Magento\Store\Model\StoreManagerInterface $storeManager)
 {
     parent::__construct($context);
     $this->_backendUrl = $backendUrl;
     $this->_storeManager = $storeManager;
     $this->_categoryCollectionFactory = $categoryCollectionFactory;
 }
コード例 #9
0
ファイル: Data.php プロジェクト: aiesh/magento2
 /**
  * @param \Magento\Framework\App\Helper\Context $context
  * @param \Magento\Core\Helper\Data $coreData
  * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
  * @param \Magento\Store\Model\StoreManagerInterface $storeManager
  */
 public function __construct(\Magento\Framework\App\Helper\Context $context, \Magento\Core\Helper\Data $coreData, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Store\Model\StoreManagerInterface $storeManager)
 {
     $this->_coreData = $coreData;
     $this->_scopeConfig = $scopeConfig;
     $this->_storeManager = $storeManager;
     parent::__construct($context);
 }
コード例 #10
0
ファイル: Page.php プロジェクト: magefan/module-blog
 /**
  * Constructor
  *
  * @param \Magento\Framework\App\Helper\Context $context
  * @param \Magento\Framework\View\DesignInterface $design
  * @param \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate
  * @param \Magento\Framework\View\Result\PageFactory $resultPageFactory
  */
 public function __construct(\Magento\Framework\App\Helper\Context $context, \Magento\Framework\View\DesignInterface $design, \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate, \Magento\Framework\View\Result\PageFactory $resultPageFactory)
 {
     $this->_design = $design;
     $this->_localeDate = $localeDate;
     $this->resultPageFactory = $resultPageFactory;
     parent::__construct($context);
 }
コード例 #11
0
ファイル: Data.php プロジェクト: kost08/magento2-magemonkey
 /**
  * @param \Magento\Framework\App\Helper\Context $context
  * @param \Magento\Store\Model\StoreManagerInterface $storeManager
  * @param \Ebizmarts\MageMonkey\Model\Logger\Magemonkey $logger
  * @param \Magento\Customer\Api\GroupRepositoryInterface $groupRepositoryInterface
  */
 public function __construct(\Magento\Framework\App\Helper\Context $context, \Magento\Store\Model\StoreManagerInterface $storeManager, \Ebizmarts\MageMonkey\Model\Logger\Magemonkey $logger, \Magento\Customer\Api\GroupRepositoryInterface $groupRepositoryInterface)
 {
     $this->_storeManager = $storeManager;
     $this->_mlogger = $logger;
     $this->_groupRepositoryInterface = $groupRepositoryInterface;
     parent::__construct($context);
 }
コード例 #12
0
ファイル: Database.php プロジェクト: shabbirvividads/magento2
 /**
  * @param \Magento\Framework\App\Helper\Context $context
  * @param \Magento\MediaStorage\Model\File\Storage\DatabaseFactory $dbStorageFactory
  * @param \Magento\MediaStorage\Model\File\Storage\File $fileStorage
  * @param Filesystem $filesystem
  */
 public function __construct(\Magento\Framework\App\Helper\Context $context, \Magento\MediaStorage\Model\File\Storage\DatabaseFactory $dbStorageFactory, \Magento\MediaStorage\Model\File\Storage\File $fileStorage, Filesystem $filesystem)
 {
     $this->_filesystem = $filesystem;
     $this->_dbStorageFactory = $dbStorageFactory;
     $this->_fileStorage = $fileStorage;
     parent::__construct($context);
 }
コード例 #13
0
 /**
  * @param Context $context
  * @param StoreManagerInterface $storeManager
  * @param Filesystem $filesystem
  * @param string $imageDir
  */
 public function __construct(Context $context, StoreManagerInterface $storeManager, Filesystem $filesystem, $imageDir = 'design/image')
 {
     parent::__construct($context);
     $this->storeManager = $storeManager;
     $this->mediaDirectory = $filesystem->getDirectoryWrite(DirectoryList::MEDIA);
     $this->imageDir = $imageDir;
 }
コード例 #14
0
ファイル: Data.php プロジェクト: shabbirvividads/magento2
 /**
  * @param \Magento\Framework\App\Helper\Context $context
  * @param \Magento\Store\Model\StoreManagerInterface $storeManager
  * @param Filesystem $filesystem
  * @param \Magento\Captcha\Model\CaptchaFactory $factory
  */
 public function __construct(\Magento\Framework\App\Helper\Context $context, \Magento\Store\Model\StoreManagerInterface $storeManager, Filesystem $filesystem, \Magento\Captcha\Model\CaptchaFactory $factory)
 {
     $this->_storeManager = $storeManager;
     $this->_filesystem = $filesystem;
     $this->_factory = $factory;
     parent::__construct($context);
 }
コード例 #15
0
 public function __construct(Context $context, \Magento\Checkout\Model\Session $session, \Magento\Quote\Model\Quote $quote, \Magento\Quote\Model\QuoteManagement $quoteManagement)
 {
     $this->session = $session;
     $this->quote = $quote;
     $this->quoteManagement = $quoteManagement;
     parent::__construct($context);
 }
コード例 #16
0
ファイル: Admin.php プロジェクト: shabbirvividads/magento2
 /**
  * @param \Magento\Framework\App\Helper\Context $context
  * @param \Magento\Store\Model\StoreManagerInterface $storeManager
  * @param \Magento\Sales\Model\Config $salesConfig
  * @param \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency
  */
 public function __construct(\Magento\Framework\App\Helper\Context $context, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Sales\Model\Config $salesConfig, \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency)
 {
     $this->priceCurrency = $priceCurrency;
     $this->_storeManager = $storeManager;
     $this->_salesConfig = $salesConfig;
     parent::__construct($context);
 }
コード例 #17
0
 /**
  * @param \Magento\Framework\App\Helper\Context $context
  * @param \Magento\Catalog\Helper\Product\Configuration $productConfiguration
  * @param \Magento\Framework\Pricing\Helper\Data $pricingHelper
  * @param \Magento\Framework\Escaper $escaper
  */
 public function __construct(\Magento\Framework\App\Helper\Context $context, \Magento\Catalog\Helper\Product\Configuration $productConfiguration, \Magento\Framework\Pricing\Helper\Data $pricingHelper, \Magento\Framework\Escaper $escaper)
 {
     $this->productConfiguration = $productConfiguration;
     $this->pricingHelper = $pricingHelper;
     $this->escaper = $escaper;
     parent::__construct($context);
 }
コード例 #18
0
ファイル: Data.php プロジェクト: aiesh/magento2
 /**
  * @param \Magento\Framework\App\Helper\Context $context
  * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
  * @param \Magento\Customer\Model\Session $customerSession
  * @param CustomerViewHelper $customerViewHelper
  */
 public function __construct(\Magento\Framework\App\Helper\Context $context, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Customer\Model\Session $customerSession, CustomerViewHelper $customerViewHelper)
 {
     $this->_scopeConfig = $scopeConfig;
     $this->_customerSession = $customerSession;
     $this->_customerViewHelper = $customerViewHelper;
     parent::__construct($context);
 }
コード例 #19
0
ファイル: Data.php プロジェクト: wirecard/magento2-wcp
 /**
  * @param \Magento\Framework\App\Helper\Context $context
  * @param \Magento\Framework\Locale\ResolverInterface $localeResolver
  * @param \Magento\Framework\App\ProductMetadataInterface $productMetadata
  */
 public function __construct(\Magento\Framework\App\Helper\Context $context, \Magento\Framework\Locale\ResolverInterface $localeResolver, \Magento\Framework\App\ProductMetadataInterface $productMetadata)
 {
     $this->_localeResolver = $localeResolver;
     $this->_productMetadata = $productMetadata;
     $this->_request = $context->getRequest();
     parent::__construct($context);
 }
コード例 #20
0
ファイル: Form.php プロジェクト: swissup/testimonials
 /**
  * @param \Magento\Framework\App\Helper\Context $context
  * @param \Magento\Customer\Model\Session $customerSession
  * @param CustomerViewHelper $customerViewHelper
  * @param \Magento\Framework\Session\Generic $testimonialSession
  */
 public function __construct(\Magento\Framework\App\Helper\Context $context, \Magento\Customer\Model\Session $customerSession, CustomerViewHelper $customerViewHelper, \Magento\Framework\Session\Generic $testimonialSession)
 {
     $this->_customerSession = $customerSession;
     $this->_customerViewHelper = $customerViewHelper;
     $this->_data = $testimonialSession->getFormData(true);
     parent::__construct($context);
 }
コード例 #21
0
 /**
  * @param \Magento\Framework\App\ActionFlag $actionFlag
  * @param \Magento\Framework\ObjectManagerInterface $objectManager
  * @param \Magento\Customer\Model\Session $customerSession
  * @param \Magento\Framework\App\Helper\Context $context
  */
 public function __construct(\Magento\Framework\App\ActionFlag $actionFlag, \Magento\Framework\ObjectManagerInterface $objectManager, \Magento\Customer\Model\Session $customerSession, \Magento\Framework\App\Helper\Context $context)
 {
     $this->_actionFlag = $actionFlag;
     $this->_objectManager = $objectManager;
     $this->_customerSession = $customerSession;
     parent::__construct($context);
 }
コード例 #22
0
 /**
  * @param \Magento\Framework\App\Helper\Context $context
  * @param Data $persistentData
  * @param \Magento\Checkout\Model\Session $checkoutSession
  * @param \Magento\Persistent\Model\SessionFactory $sessionFactory
  */
 public function __construct(\Magento\Framework\App\Helper\Context $context, \Magento\Persistent\Helper\Data $persistentData, \Magento\Checkout\Model\Session $checkoutSession, \Magento\Persistent\Model\SessionFactory $sessionFactory)
 {
     $this->_persistentData = $persistentData;
     $this->_checkoutSession = $checkoutSession;
     $this->_sessionFactory = $sessionFactory;
     parent::__construct($context);
 }
コード例 #23
0
ファイル: Media.php プロジェクト: CompassPointMedia/magento2
 /**
  * @param ConfigInterface $configInterface
  * @param DesignInterface $designInterface
  * @param Context $context
  */
 public function __construct(ConfigInterface $configInterface, DesignInterface $designInterface, Context $context)
 {
     parent::__construct($context);
     $this->viewConfig = $configInterface;
     $this->currentTheme = $designInterface->getDesignTheme();
     $this->initConfig();
 }
コード例 #24
0
 public function __construct(Helper\Context $context, Data $helper, \Magento\Framework\App\Cache $cache, \Magento\Framework\App\Cache\State $cacheState)
 {
     $this->helper = $helper;
     $this->cache = $cache;
     $this->cacheState = $cacheState;
     parent::__construct($context);
 }
コード例 #25
0
 /**
  * Post constructor.
  * @param \Magento\Framework\App\Helper\Context $context
  * @param \OsmanSorkar\Blog\Model\ResourceModel\Category\CollectionFactory $categoryCollectionFactory
  * @param \OsmanSorkar\Blog\Model\ResourceModel\Postcategory\CollectionFactory $postCategoryFactory
  * @param \OsmanSorkar\Blog\Model\CategoryFactory $categoryFactory
  */
 public function __construct(\Magento\Framework\App\Helper\Context $context, \OsmanSorkar\Blog\Model\ResourceModel\Category\CollectionFactory $categoryCollectionFactory, \OsmanSorkar\Blog\Model\ResourceModel\Postcategory\CollectionFactory $postCategoryFactory, \OsmanSorkar\Blog\Model\CategoryFactory $categoryFactory)
 {
     $this->categoryCollectionFactory = $categoryCollectionFactory;
     $this->postCategoryFactory = $postCategoryFactory;
     $this->categoryFactroy = $categoryFactory;
     parent::__construct($context);
 }
コード例 #26
0
ファイル: Data.php プロジェクト: aiesh/magento2
 /**
  * @param \Magento\Framework\App\Helper\Context $context
  * @param \Magento\Eav\Model\Entity\Attribute\Config $attributeConfig
  * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
  * @param \Magento\Eav\Model\Config $eavConfig
  */
 public function __construct(\Magento\Framework\App\Helper\Context $context, \Magento\Eav\Model\Entity\Attribute\Config $attributeConfig, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Eav\Model\Config $eavConfig)
 {
     $this->_scopeConfig = $scopeConfig;
     $this->_attributeConfig = $attributeConfig;
     $this->_eavConfig = $eavConfig;
     parent::__construct($context);
 }
コード例 #27
0
ファイル: Data.php プロジェクト: nja78/magento2
 /**
  * Construct
  *
  * @param \Magento\Framework\App\Helper\Context $context
  * @param Filesystem $filesystem
  * @param \Magento\Framework\AuthorizationInterface $authorization
  * @param \Magento\Framework\App\Cache\TypeListInterface $cacheTypeList
  */
 public function __construct(\Magento\Framework\App\Helper\Context $context, Filesystem $filesystem, \Magento\Framework\AuthorizationInterface $authorization, \Magento\Framework\App\Cache\TypeListInterface $cacheTypeList)
 {
     parent::__construct($context);
     $this->_authorization = $authorization;
     $this->_filesystem = $filesystem;
     $this->_cacheTypeList = $cacheTypeList;
 }
コード例 #28
0
ファイル: Cron.php プロジェクト: Doability/magento2dev
 /**
  * Cron constructor
  *
  * @param ScheduleCollectionFactory $scheduleCollectionFactory
  * @param TimezoneInterface         $timezone
  * @param MessageManagerInterface   $messageManager
  * @param Context                   $context
  */
 public function __construct(ScheduleCollectionFactory $scheduleCollectionFactory, TimezoneInterface $timezone, MessageManagerInterface $messageManager, Context $context)
 {
     $this->scheduleCollectionFactory = $scheduleCollectionFactory;
     $this->timezone = $timezone;
     $this->messageManager = $messageManager;
     parent::__construct($context);
 }
コード例 #29
0
 /**
  * @param \Magento\Framework\App\Helper\Context $context
  * @param \Magento\Directory\Helper\Data $directoryHelper
  * @param \Magento\Config\Model\Config $backendConfig
  * @param \Magento\Config\Model\Config\ScopeDefiner $scopeDefiner
  */
 public function __construct(\Magento\Framework\App\Helper\Context $context, \Magento\Directory\Helper\Data $directoryHelper, \Magento\Config\Model\Config $backendConfig, \Magento\Config\Model\Config\ScopeDefiner $scopeDefiner)
 {
     parent::__construct($context);
     $this->directoryHelper = $directoryHelper;
     $this->backendConfig = $backendConfig;
     $this->scopeDefiner = $scopeDefiner;
 }
コード例 #30
0
 /**
  * @param \Magento\Framework\App\Helper\Context $context
  * @param \Magento\Catalog\Model\Product\OptionFactory $productOptionFactory
  * @param \Magento\Framework\Filter\FilterManager $filter
  * @param \Magento\Framework\Stdlib\String $string
  */
 public function __construct(\Magento\Framework\App\Helper\Context $context, \Magento\Catalog\Model\Product\OptionFactory $productOptionFactory, \Magento\Framework\Filter\FilterManager $filter, \Magento\Framework\Stdlib\String $string)
 {
     $this->_productOptionFactory = $productOptionFactory;
     $this->filter = $filter;
     $this->string = $string;
     parent::__construct($context);
 }