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-cron
Model
Groups
Config
Converter
Xml.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Cron\Model\Groups\Config\Converter
;
7
11
class
Xml
implements
\Magento\Framework\Config\ConverterInterface
12
{
20
public
function
convert
(
$source
)
21
{
22
$output
= [];
23
24
if
(!
$source
instanceof \DOMDocument) {
25
return
$output
;
26
}
27
28
$groups =
$source
->getElementsByTagName(
'group'
);
29
foreach
($groups as
$group
) {
31
if
(!
$group
->hasAttribute(
'id'
)) {
32
throw
new \InvalidArgumentException(
'Attribute "id" does not exist'
);
33
}
34
foreach
(
$group
->childNodes as $child) {
35
if
(!$child instanceof \DOMElement) {
36
continue
;
37
}
39
$output
[
$group
->getAttribute(
'id'
)][$child->nodeName][
'value'
] = $child->nodeValue;
40
if
($child->hasAttribute(
'tooltip'
)) {
41
$output
[
$group
->getAttribute(
'id'
)][$child->nodeName][
'tooltip'
] = $child->getAttribute(
'tooltip'
);
42
}
43
}
44
}
45
return
$output
;
46
}
47
}
Magento\Cron\Model\Groups\Config\Converter
Definition:
Xml.php:6
$source
$source
Definition:
source.php:23
Magento\Framework\Config\ConverterInterface\convert
convert($source)
$group
$group
Definition:
sections.phtml:16
$output
$output
Definition:
classmap_generator.php:100
Magento\Cron\Model\Groups\Config\Converter\Xml
Definition:
Xml.php:11
Magento\Framework\Config\ConverterInterface
Definition:
ConverterInterface.php:14