magefix/src/Magefix/Fixture/Builder/Admin.php 1 location
|
@@ 11-28 (lines=18) @@
|
| 8 |
|
* @package Magefix\Fixture\Builder |
| 9 |
|
* @author Daniel Kidanemariam <[email protected]> |
| 10 |
|
*/ |
| 11 |
|
class Admin extends AbstractBuilder |
| 12 |
|
{ |
| 13 |
|
/** |
| 14 |
|
* @return int |
| 15 |
|
* @throws \Exception |
| 16 |
|
* |
| 17 |
|
*/ |
| 18 |
|
public function build() |
| 19 |
|
{ |
| 20 |
|
$this->iterateFixture(); |
| 21 |
|
$defaultData = $this->_getMageModelData() ? $this->_getMageModelData() : []; |
| 22 |
|
$mergedData = array_merge($defaultData, $this->_getFixtureAttributes()); |
| 23 |
|
|
| 24 |
|
$this->_getMageModel()->setData($mergedData); |
| 25 |
|
|
| 26 |
|
return $this->_saveFixture(); |
| 27 |
|
} |
| 28 |
|
} |
| 29 |
|
|
magefix/src/Magefix/Fixture/Builder/OauthConsumer.php 1 location
|
@@ 15-33 (lines=19) @@
|
| 12 |
|
* |
| 13 |
|
* @author Carlo Tasca <[email protected]> |
| 14 |
|
*/ |
| 15 |
|
class OauthConsumer extends AbstractBuilder |
| 16 |
|
{ |
| 17 |
|
/** |
| 18 |
|
* |
| 19 |
|
* Concrete classes to provide implementation for build method |
| 20 |
|
* |
| 21 |
|
* @return mixed |
| 22 |
|
*/ |
| 23 |
|
public function build() |
| 24 |
|
{ |
| 25 |
|
$this->iterateFixture(); |
| 26 |
|
$defaultData = $this->_getMageModelData() ? $this->_getMageModelData() : []; |
| 27 |
|
$mergedData = array_merge($defaultData, $this->_getFixtureAttributes()); |
| 28 |
|
|
| 29 |
|
$this->_getMageModel()->setData($mergedData); |
| 30 |
|
|
| 31 |
|
return $this->_saveFixture(); |
| 32 |
|
} |
| 33 |
|
} |