Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
3 / 3 |
MigratePreRowSaveEvent | |
100.00% |
1 / 1 |
|
100.00% |
3 / 3 |
3 | |
100.00% |
3 / 3 |
__construct | |
100.00% |
1 / 1 |
1 | |
100.00% |
3 / 3 |
|||
getMigration | |
100.00% |
1 / 1 |
1 | |
100.00% |
0 / 0 |
|||
getRow | |
100.00% |
1 / 1 |
1 | |
100.00% |
0 / 0 |
<?php | |
/** | |
* @file | |
* Contains \Drupal\migrate\Event\MigratePreRowSaveEvent. | |
*/ | |
namespace Drupal\migrate\Event; | |
use Drupal\migrate\Entity\MigrationInterface; | |
use Drupal\migrate\Row; | |
use Symfony\Component\EventDispatcher\Event; | |
/** | |
* Wraps a pre-save event for event listeners. | |
*/ | |
class MigratePreRowSaveEvent extends Event { | |
/** | |
* Row object. | |
* | |
* @var \Drupal\migrate\Row | |
*/ | |
protected $row; | |
/** | |
* Migration entity. | |
* | |
* @var \Drupal\migrate\Entity\MigrationInterface | |
*/ | |
protected $migration; | |
/** | |
* Constructs a pre-save event object. | |
* | |
* @param \Drupal\migrate\Entity\MigrationInterface $migration | |
* Migration entity. | |
*/ | |
public function __construct(MigrationInterface $migration, Row $row) { | |
$this->migration = $migration; | |
$this->row = $row; | |
} | |
/** | |
* Gets the migration entity. | |
* | |
* @return \Drupal\migrate\Entity\MigrationInterface | |
* The migration entity being imported. | |
*/ | |
public function getMigration() { | |
return $this->migration; | |
} | |
/** | |
* Gets the row object. | |
* | |
* @return \Drupal\migrate\Row | |
* The row object about to be imported. | |
*/ | |
public function getRow() { | |
return $this->row; | |
} | |
} |