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
ArrayObjectSearch.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Framework\Api
;
8
12
class
ArrayObjectSearch
13
{
47
public
static
function
getArrayElementByName
(
$data
, $keyValue, $keyName =
'name'
, $valueName =
'value'
)
48
{
49
$getter =
'get'
. ucfirst($keyName);
50
if
(is_array(
$data
)) {
51
foreach
(
$data
as $dataObject) {
52
if
(is_object($dataObject) && $dataObject->$getter() == $keyValue) {
53
$valueGetter =
'get'
. ucfirst($valueName);
54
return
$dataObject->$valueGetter();
55
}
56
}
57
}
58
return
null
;
59
}
60
}
Magento\Framework\Api
Definition:
AbstractExtensibleObject.php:6
Magento\Framework\Api\ArrayObjectSearch
Definition:
ArrayObjectSearch.php:12
$data
$data
Definition:
attribute_set_with_image_attribute.php:16
Magento\Framework\Api\ArrayObjectSearch\getArrayElementByName
static getArrayElementByName($data, $keyValue, $keyName='name', $valueName='value')
Definition:
ArrayObjectSearch.php:47