| Current Path : /home/rtorresani/www/app/code/Webkul/BuyButton/Block/Adminhtml/BuyButton/ |
| Current File : //home/rtorresani/www/app/code/Webkul/BuyButton/Block/Adminhtml/BuyButton/Start.php |
<?php
/**
* Webkul Software.
*
* @category Webkul
* @package Webkul_BuyButton
* @author Webkul
* @copyright Copyright (c) Webkul Software Private Limited (https://webkul.com)
* @license https://store.webkul.com/license.html
*/
namespace Webkul\BuyButton\Block\Adminhtml\BuyButton;
class Start extends \Magento\Backend\Block\Template
{
/**
* @var \Webkul\BuyButton\Helper\Data
*/
protected $helper;
/**
* Constructor.
*
* @param \Magento\Backend\Block\Template\Context $context
* @param array $data
*/
public function __construct(
\Magento\Backend\Block\Template\Context $context,
\Webkul\BuyButton\Helper\Data $helper,
array $data = []
) {
$this->helper = $helper;
parent::__construct($context, $data);
}
/**
* get all stores json
*
* @return string
*/
public function getStoresJson()
{
return \Laminas\Json\Json::encode($this->helper->getAllStores(), true);
}
/**
* get all currencies json
*
* @return string
*/
public function getCurrenciesJson()
{
return \Laminas\Json\Json::encode($this->helper->getAllowedCurrency(), true);
}
}