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-import-export
Model
AbstractModel.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\ImportExport\Model
;
7
8
use
Magento\Framework\App\Filesystem\DirectoryList
;
9
15
abstract
class
AbstractModel
extends
\Magento\Framework\DataObject
16
{
22
protected
$_debugMode
=
false
;
23
29
protected
$_debugReplacePrivateDataKeys
= [];
30
36
protected
$_logTrace
= [];
37
41
protected
$_logger
;
42
46
protected
$_varDirectory
;
47
53
public
function
__construct
(
54
\Psr\Log\LoggerInterface
$logger
,
55
\
Magento
\Framework\Filesystem
$filesystem
,
56
array
$data
= []
57
) {
58
$this->_logger =
$logger
;
59
$this->_varDirectory =
$filesystem
->getDirectoryWrite(
DirectoryList::VAR_DIR
);
60
parent::__construct(
$data
);
61
}
62
70
public
function
addLogComment
($debugData)
71
{
72
if
(is_array($debugData)) {
73
$this->_logTrace = array_merge($this->_logTrace, $debugData);
74
}
else
{
75
$this->_logTrace[] = $debugData;
76
}
77
78
if
($this->_debugMode) {
79
$this->_logger->debug(var_export($debugData,
true
));
80
}
81
82
return
$this;
83
}
84
90
public
function
getFormatedLogTrace
()
91
{
92
$trace =
''
;
93
$lineNumber = 1;
94
foreach
($this->_logTrace as &
$info
) {
95
$trace .= $lineNumber++ .
': '
.
$info
.
"\n"
;
96
}
97
return
$trace;
98
}
99
}
Magento\ImportExport\Model
Magento\ImportExport\Model\AbstractModel
Definition:
AbstractModel.php:15
Magento\ImportExport\Model\AbstractModel\$_debugMode
$_debugMode
Definition:
AbstractModel.php:22
Magento\Framework\App\Filesystem\DirectoryList\VAR_DIR
const VAR_DIR
Definition:
DirectoryList.php:58
Magento\ImportExport\Model\AbstractModel\$_varDirectory
$_varDirectory
Definition:
AbstractModel.php:46
Magento\ImportExport\Model\AbstractModel\$_logTrace
$_logTrace
Definition:
AbstractModel.php:36
Magento\Framework\DataObject
Definition:
DataObject.php:15
$logger
$logger
Definition:
health_check.php:20
Magento\ImportExport\Model\AbstractModel\$_logger
$_logger
Definition:
AbstractModel.php:41
$data
$data
Definition:
attribute_set_with_image_attribute.php:16
Magento\ImportExport\Model\AbstractModel\$_debugReplacePrivateDataKeys
$_debugReplacePrivateDataKeys
Definition:
AbstractModel.php:29
Magento\ImportExport\Model\AbstractModel\__construct
__construct(\Psr\Log\LoggerInterface $logger, \Magento\Framework\Filesystem $filesystem, array $data=[])
Definition:
AbstractModel.php:53
Magento
Magento\Framework\App\Filesystem\DirectoryList
Definition:
DirectoryList.php:13
Magento\ImportExport\Model\AbstractModel\addLogComment
addLogComment($debugData)
Definition:
AbstractModel.php:70
Magento\ImportExport\Model\AbstractModel\getFormatedLogTrace
getFormatedLogTrace()
Definition:
AbstractModel.php:90
$info
foreach( $_productCollection as $_product)() ?>" class $info
Definition:
listing.phtml:52
$filesystem
$filesystem
Definition:
validate_image.php:10