Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
ScopeId.php
Go to the documentation of this file.
1 <?php
8 
10 use Magento\Mtf\Fixture\FixtureFactory;
11 use Magento\Mtf\Fixture\DataSource;
12 
16 class ScopeId extends DataSource
17 {
23  protected $store = null;
24 
31  public function __construct(FixtureFactory $fixtureFactory, array $params, array $data = [])
32  {
33  $this->params = $params;
34  if (isset($data['dataset'])) {
35  $store = $fixtureFactory->createByCode('store', ['dataset' => $data['dataset']]);
36  if (!$store->hasData('store_id')) {
37  $store->persist();
38  }
39  $this->store = $store;
40  $this->data = $store->getName();
41  } else {
42  $this->data = null;
43  }
44  }
45 
51  public function getStore()
52  {
53  return $this->store;
54  }
55 }
__construct(FixtureFactory $fixtureFactory, array $params, array $data=[])
Definition: ScopeId.php:31
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE]
Definition: website.php:18