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

Public Member Functions

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

Detailed Description

Prepare CustomerId for order list.

Definition at line 16 of file CustomerId.php.

Constructor & Destructor Documentation

◆ __construct()

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

@constructor

Parameters
FixtureFactory$fixtureFactory
array$params
array$data

Definition at line 24 of file CustomerId.php.

25  {
26  $this->params = $params;
27  if (isset($data['customer']) && $data['customer'] instanceof Customer) {
28  $this->data = $data['customer'];
29  return;
30  }
31  if (isset($data['dataset'])) {
32  $customer = $fixtureFactory->createByCode('customer', ['dataset' => $data['dataset']]);
33  if ($customer->hasData('id') === false) {
34  $customer->persist();
35  }
36  $this->data = $customer;
37  }
38  }
$customer
Definition: customers.php:11
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE]
Definition: website.php:18

Member Function Documentation

◆ getCustomer()

getCustomer ( )

Get customer fixture.

Returns
Customer

Definition at line 45 of file CustomerId.php.

46  {
47  return $this->data;
48  }

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