Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Protected Attributes
Hss Class Reference
Inheritance diagram for Hss:
AbstractHelper

Public Member Functions

 __construct (\Magento\Framework\App\Helper\Context $context, \Magento\Checkout\Model\Session $checkoutSession)
 
 getReviewButtonTemplate ($name)
 
 getHssMethods ()
 
- Public Member Functions inherited from AbstractHelper
 __construct (Context $context)
 
 isModuleOutputEnabled ($moduleName=null)
 

Protected Attributes

 $_hssMethods
 
 $_checkoutSession
 
- Protected Attributes inherited from AbstractHelper
 $_moduleName
 
 $_request
 
 $_moduleManager
 
 $_logger
 
 $_urlBuilder
 
 $_httpHeader
 
 $_eventManager
 
 $_remoteAddress
 
 $urlEncoder
 
 $urlDecoder
 
 $scopeConfig
 
 $_cacheConfig
 

Additional Inherited Members

- Protected Member Functions inherited from AbstractHelper
 _getRequest ()
 
 _getModuleName ()
 
 _getUrl ($route, $params=[])
 

Detailed Description

Hosted Sole Solution helper

Definition at line 11 of file Hss.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( \Magento\Framework\App\Helper\Context  $context,
\Magento\Checkout\Model\Session  $checkoutSession 
)

Constructor

Parameters
\Magento\Framework\App\Helper\Context$context
\Magento\Checkout\Model\Session$checkoutSession

Definition at line 35 of file Hss.php.

38  {
39  $this->_checkoutSession = $checkoutSession;
40  parent::__construct($context);
41  }

Member Function Documentation

◆ getHssMethods()

getHssMethods ( )

Get methods

Returns
string[]

Definition at line 66 of file Hss.php.

67  {
68  return $this->_hssMethods;
69  }

◆ getReviewButtonTemplate()

getReviewButtonTemplate (   $name)

Get template for button in order review page if HSS method was selected

Parameters
string$nametemplate name
Returns
string

Definition at line 49 of file Hss.php.

50  {
51  $quote = $this->_checkoutSession->getQuote();
52  if ($quote) {
53  $payment = $quote->getPayment();
54  if ($payment && in_array($payment->getMethod(), $this->_hssMethods)) {
55  return $name;
56  }
57  }
58  return '';
59  }
$quote
$payment
Definition: order.php:17
if(!isset($_GET['name'])) $name
Definition: log.php:14

Field Documentation

◆ $_checkoutSession

$_checkoutSession
protected

Definition at line 27 of file Hss.php.

◆ $_hssMethods

$_hssMethods
protected

The documentation for this class was generated from the following file: