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
Factory.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Payment\Model\Method
;
7
11
class
Factory
12
{
18
protected
$_objectManager
;
19
25
public
function
__construct
(\
Magento
\Framework\ObjectManagerInterface
$objectManager
)
26
{
27
$this->_objectManager =
$objectManager
;
28
}
29
38
public
function
create
(
$className
,
$data
= [])
39
{
40
$method
= $this->_objectManager->create(
$className
,
$data
);
41
if
(!
$method
instanceof \
Magento
\
Payment
\Model\
MethodInterface
) {
42
throw
new \Magento\Framework\Exception\LocalizedException(
43
__
(
'%1 class doesn\'t implement \Magento\Payment\Model\MethodInterface'
,
$className
)
44
);
45
}
46
return
$method
;
47
}
48
}
$objectManager
$objectManager
Definition:
bootstrap.php:17
__
__()
Definition:
__.php:13
Magento\Payment\Model\Method
Definition:
AbstractMethod.php:7
$data
$data
Definition:
attribute_set_with_image_attribute.php:16
Magento\Quote\Model\Quote\Payment
Definition:
Payment.php:37
Magento\Framework\DataObject\Factory
Definition:
Factory.php:8
Magento\Payment\Model\Method\Factory\__construct
__construct(\Magento\Framework\ObjectManagerInterface $objectManager)
Definition:
Factory.php:25
Magento\Payment\Model\MethodInterface
Definition:
MethodInterface.php:16
Magento\Payment\Model\Method\Factory\$_objectManager
$_objectManager
Definition:
Factory.php:18
Magento
$method
$method
Definition:
info.phtml:13
Magento\Payment\Model\Method\Factory\create
create($className, $data=[])
Definition:
Factory.php:38
$className
if($currentSelectedMethod==$_code) $className
Definition:
form.phtml:31