Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-payment
Model
Method
InstanceFactory.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Payment\Model\Method
;
7
8
use
Magento\Payment\Api\Data\PaymentMethodInterface
;
9
13
class
InstanceFactory
14
{
18
private
$helper;
19
23
public
function
__construct
(
24
\
Magento
\
Payment
\Helper\Data $helper
25
) {
26
$this->helper =
$helper
;
27
}
28
35
public
function
create
(
PaymentMethodInterface
$paymentMethod)
36
{
37
$methodInstance = $this->helper->getMethodInstance($paymentMethod->
getCode
());
38
$methodInstance->setStore($paymentMethod->
getStoreId
());
39
40
return
$methodInstance;
41
}
42
}
$helper
$helper
Definition:
iframe.phtml:13
Magento\Payment\Api\Data\PaymentMethodInterface\getCode
getCode()
Magento\Payment\Model\Method
Definition:
AbstractMethod.php:7
Magento\Payment\Model\Method\InstanceFactory
Definition:
InstanceFactory.php:13
Magento\Quote\Model\Quote\Payment
Definition:
Payment.php:37
Magento
Magento\Payment\Model\Method\InstanceFactory\create
create(PaymentMethodInterface $paymentMethod)
Definition:
InstanceFactory.php:35
Magento\Payment\Api\Data\PaymentMethodInterface
Definition:
PaymentMethodInterface.php:14
Magento\Payment\Model\Method\InstanceFactory\__construct
__construct(\Magento\Payment\Helper\Data $helper)
Definition:
InstanceFactory.php:23
Magento\Payment\Api\Data\PaymentMethodInterface\getStoreId
getStoreId()