Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
SkeletonSet.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Mtf\Fixture\DataSource;
10 use Magento\Mtf\Fixture\FixtureFactory;
12 
19 class SkeletonSet extends DataSource
20 {
26  protected $attributeSet;
27 
34  public function __construct(FixtureFactory $fixtureFactory, array $params, array $data = [])
35  {
36  $this->params = $params;
37  if (isset($data['dataset']) && $data['dataset'] !== '-') {
38  $parentSet = $fixtureFactory->createByCode('catalogAttributeSet', ['dataset' => $data['dataset']]);
39  if (!$parentSet->hasData('attribute_set_id')) {
40  $parentSet->persist();
41  }
43  $this->data = $parentSet->getAttributeSetName();
44  $this->attributeSet = $parentSet;
45  }
46  }
47 
53  public function getAttributeSet()
54  {
55  return $this->attributeSet;
56  }
57 }
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE]
Definition: website.php:18