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-paypal
Helper
Shortcut
Factory.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Paypal\Helper\Shortcut
;
8
9
class
Factory
10
{
14
const
DEFAULT_VALIDATOR
= \Magento\Paypal\Helper\Shortcut\Validator::class;
15
19
const
CHECKOUT_VALIDATOR
= \Magento\Paypal\Helper\Shortcut\CheckoutValidator::class;
20
24
protected
$_objectManager
;
25
29
public
function
__construct
(\
Magento
\Framework\
ObjectManagerInterface
$objectManager
)
30
{
31
$this->_objectManager =
$objectManager
;
32
}
33
38
public
function
create
($parameter =
null
)
39
{
40
$instanceName =
self::DEFAULT_VALIDATOR
;
41
if
(is_object($parameter) && $parameter instanceof \
Magento
\
Checkout
\Model\Session) {
42
$instanceName =
self::CHECKOUT_VALIDATOR
;
43
}
44
return
$this->_objectManager->create($instanceName);
45
}
46
}
Magento\Paypal\Helper\Shortcut\Factory
Definition:
Factory.php:9
Magento\Paypal\Helper\Shortcut\Factory\CHECKOUT_VALIDATOR
const CHECKOUT_VALIDATOR
Definition:
Factory.php:19
Magento\Paypal\Helper\Shortcut
Definition:
CheckoutValidator.php:7
Magento\Paypal\Helper\Shortcut\Factory\DEFAULT_VALIDATOR
const DEFAULT_VALIDATOR
Definition:
Factory.php:14
$objectManager
$objectManager
Definition:
bootstrap.php:17
Magento\Paypal\Helper\Checkout
Definition:
Checkout.php:13
Magento\Framework\ObjectManagerInterface
Definition:
ObjectManagerInterface.php:12
Magento\Paypal\Helper\Shortcut\Factory\$_objectManager
$_objectManager
Definition:
Factory.php:24
Magento\Paypal\Helper\Shortcut\Factory\__construct
__construct(\Magento\Framework\ObjectManagerInterface $objectManager)
Definition:
Factory.php:29
Magento\Paypal\Helper\Shortcut\Factory\create
create($parameter=null)
Definition:
Factory.php:38
Magento