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
framework
Api
Code
Generator
ExtensionAttributesInterfaceFactoryGenerator.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Framework\Api\Code\Generator
;
8
9
use
Magento\Framework\ObjectManager\Code\Generator\Factory
;
10
use
Magento\Framework\Code\Generator\DefinedClasses
;
11
use Magento\Framework\Code\Generator\Io;
12
use
Magento\Framework\Code\Generator\CodeGeneratorInterface
;
13
14
class
ExtensionAttributesInterfaceFactoryGenerator
extends
Factory
15
{
19
const
ENTITY_TYPE
=
'extensionInterfaceFactory'
;
20
24
private
static
$suffix =
'InterfaceFactory'
;
25
35
public
function
__construct
(
36
$sourceClassName =
null
,
37
$resultClassName =
null
,
38
Io $ioObject =
null
,
39
CodeGeneratorInterface
$classGenerator =
null
,
40
DefinedClasses
$definedClasses =
null
41
) {
42
$sourceClassName .=
'Extension'
;
43
parent::__construct(
44
$sourceClassName,
45
$resultClassName,
46
$ioObject,
47
$classGenerator,
48
$definedClasses
49
);
50
}
51
55
protected
function
_validateData
()
56
{
57
$result
=
true
;
58
$sourceClassName = $this->
getSourceClassName
();
59
$resultClassName = $this->
_getResultClassName
();
60
61
if
($resultClassName !== $sourceClassName .
self::$suffix
) {
62
$this->
_addError
(
63
'Invalid Factory class name ['
. $resultClassName .
']. Use '
. $sourceClassName .
self::$suffix
64
);
65
$result
=
false
;
66
}
67
68
return
$result
;
69
}
70
}
$result
$result
Definition:
product_configurable_not_available_rollback.php:26
$suffix
$suffix
Definition:
name.phtml:27
Magento\Framework\ObjectManager\Code\Generator\Factory
Definition:
Factory.php:8
Magento\Framework\Code\Generator\EntityAbstract\_addError
_addError($message)
Definition:
EntityAbstract.php:234
Magento\Framework\Api\Code\Generator\ExtensionAttributesInterfaceFactoryGenerator
Definition:
ExtensionAttributesInterfaceFactoryGenerator.php:14
Magento\Framework\Code\Generator\EntityAbstract\getSourceClassName
getSourceClassName()
Definition:
EntityAbstract.php:130
Magento\Framework\Api\Code\Generator
Definition:
ExtensionAttributesGenerator.php:6
Magento\Framework\Api\Code\Generator\ExtensionAttributesInterfaceFactoryGenerator\__construct
__construct( $sourceClassName=null, $resultClassName=null, Io $ioObject=null, CodeGeneratorInterface $classGenerator=null, DefinedClasses $definedClasses=null)
Definition:
ExtensionAttributesInterfaceFactoryGenerator.php:35
Magento\Framework\Code\Generator\CodeGeneratorInterface
Definition:
CodeGeneratorInterface.php:12
Magento\Framework\Api\Code\Generator\ExtensionAttributesInterfaceFactoryGenerator\_validateData
_validateData()
Definition:
ExtensionAttributesInterfaceFactoryGenerator.php:55
Magento\Framework\Code\Generator\EntityAbstract\_getResultClassName
_getResultClassName()
Definition:
EntityAbstract.php:163
Magento\Framework\Api\Code\Generator\ExtensionAttributesInterfaceFactoryGenerator\ENTITY_TYPE
const ENTITY_TYPE
Definition:
ExtensionAttributesInterfaceFactoryGenerator.php:19
Magento\Framework\Code\Generator\DefinedClasses
Definition:
DefinedClasses.php:14