protected function EntityTaxonomyTerm::getEntity in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/taxonomy/src/Plugin/migrate/destination/EntityTaxonomyTerm.php \Drupal\taxonomy\Plugin\migrate\destination\EntityTaxonomyTerm::getEntity()
Creates or loads an entity.
Parameters
\Drupal\migrate\Row $row: The row object.
array $old_destination_id_values: The old destination ids.
Return value
\Drupal\Core\Entity\EntityInterface The entity we're importing into.
Overrides Entity::getEntity
File
- core/
modules/ taxonomy/ src/ Plugin/ migrate/ destination/ EntityTaxonomyTerm.php, line 23 - Contains \Drupal\taxonomy\Plugin\migrate\destination\EntityTaxonomyTerm.
Class
- EntityTaxonomyTerm
- Plugin annotation @MigrateDestination( id = "entity:taxonomy_term" )
Namespace
Drupal\taxonomy\Plugin\migrate\destinationCode
protected function getEntity(Row $row, array $old_destination_id_values) {
if ($row
->isStub()) {
$row
->setDestinationProperty('name', $this
->t('Stub name for source tid:') . $row
->getSourceProperty('tid'));
}
return parent::getEntity($row, $old_destination_id_values);
}