Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Protected Attributes
ScopeId Class Reference
Inheritance diagram for ScopeId:

Public Member Functions

 __construct (FixtureFactory $fixtureFactory, array $params, array $data=[])
 
 getStore ()
 

Protected Attributes

 $store = null
 

Detailed Description

Class ScopeId

Definition at line 16 of file ScopeId.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( FixtureFactory  $fixtureFactory,
array  $params,
array  $data = [] 
)

@constructor

Parameters
FixtureFactory$fixtureFactory
array$params
array$data

Definition at line 31 of file ScopeId.php.

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  }
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE]
Definition: website.php:18

Member Function Documentation

◆ getStore()

getStore ( )

Return store.

Returns
Store

Definition at line 51 of file ScopeId.php.

Field Documentation

◆ $store

$store = null
protected

Definition at line 23 of file ScopeId.php.


The documentation for this class was generated from the following file: