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
magento2-base
dev
tests
functional
tests
app
Magento
Widget
Test
Fixture
Widget
StoreIds.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Widget\Test\Fixture\Widget
;
8
9
use
Magento\Store\Test\Fixture\Store
;
10
use Magento\Mtf\Fixture\FixtureFactory;
11
use Magento\Mtf\Fixture\DataSource;
12
16
class
StoreIds
extends
DataSource
17
{
23
protected
$stores
= [];
24
31
public
function
__construct(FixtureFactory $fixtureFactory, array
$params
, array
$data
= [])
32
{
33
$this->params =
$params
;
34
if
(isset(
$data
[
'dataset'
])) {
35
$dataset = explode(
','
,
$data
[
'dataset'
]);
36
foreach
($dataset as
$store
) {
38
$store
= $fixtureFactory->createByCode(
'store'
, [
'dataset'
=>
$store
]);
39
if
(!
$store
->hasData(
'store_id'
)) {
40
$store
->persist();
41
}
42
$this->stores[] =
$store
;
43
$this->data[] =
$store
->getName();
44
}
45
}
else
{
46
$this->data[] =
null
;
47
}
48
}
49
55
public
function
getStores
()
56
{
57
return
$this->stores
;
58
}
59
}
Magento\Store\Test\Fixture\Store
Definition:
GroupId.php:7
$data
$data
Definition:
attribute_set_with_image_attribute.php:16
Magento\Widget\Test\Fixture\Widget\StoreIds\$stores
$stores
Definition:
StoreIds.php:23
$store
$store
Definition:
payment_configuration_rollback.php:33
Magento\Widget\Test\Fixture\Widget\StoreIds\getStores
getStores()
Definition:
StoreIds.php:55
$params
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE]
Definition:
website.php:18
Magento\Widget\Test\Fixture\Widget
Definition:
Parameters.php:7
Magento\Widget\Test\Fixture\Widget\StoreIds
Definition:
StoreIds.php:16