|
@@ 61-72 (lines=12) @@
|
| 58 |
|
* {@inheritdoc} |
| 59 |
|
* @throws \Nnx\DoctrineFixtureModule\Executor\Exception\RuntimeException |
| 60 |
|
*/ |
| 61 |
|
public function import(FixtureEvent $event) |
| 62 |
|
{ |
| 63 |
|
$workflowExecutorEvent = clone $this->getPrototypeEvent(); |
| 64 |
|
$workflowExecutorEvent->setName(ExecuteFixtureEvent::EXECUTE_FIXTURE_EVENT); |
| 65 |
|
$workflowExecutorEvent->setMethod(ExecuteFixtureEvent::IMPORT); |
| 66 |
|
$executor = $this->getExecutor(); |
| 67 |
|
$workflowExecutorEvent->setExecutor($executor); |
| 68 |
|
$workflowExecutorEvent->setTarget($executor); |
| 69 |
|
$workflowExecutorEvent->setFixture($event->getFixture()); |
| 70 |
|
|
| 71 |
|
$this->getEventManager()->trigger($workflowExecutorEvent); |
| 72 |
|
} |
| 73 |
|
|
| 74 |
|
/** |
| 75 |
|
* {@inheritdoc} |
|
@@ 78-89 (lines=12) @@
|
| 75 |
|
* {@inheritdoc} |
| 76 |
|
* @throws \Nnx\DoctrineFixtureModule\Executor\Exception\RuntimeException |
| 77 |
|
*/ |
| 78 |
|
public function purge(FixtureEvent $event) |
| 79 |
|
{ |
| 80 |
|
$workflowExecutorEvent = clone $this->getPrototypeEvent(); |
| 81 |
|
$workflowExecutorEvent->setName(ExecuteFixtureEvent::EXECUTE_FIXTURE_EVENT); |
| 82 |
|
$workflowExecutorEvent->setMethod(ExecuteFixtureEvent::PURGE); |
| 83 |
|
$executor = $this->getExecutor(); |
| 84 |
|
$workflowExecutorEvent->setExecutor($executor); |
| 85 |
|
$workflowExecutorEvent->setTarget($executor); |
| 86 |
|
$workflowExecutorEvent->setFixture($event->getFixture()); |
| 87 |
|
|
| 88 |
|
$this->getEventManager()->trigger($workflowExecutorEvent); |
| 89 |
|
} |
| 90 |
|
|
| 91 |
|
|
| 92 |
|
|