function EntityTaxonomyVocabulary::getEntity
Overrides Entity::getEntity
File
-
core/
modules/ taxonomy/ src/ Plugin/ migrate/ destination/ EntityTaxonomyVocabulary.php, line 20
Class
- EntityTaxonomyVocabulary
- Migration destination for taxonomy vocabulary.
Namespace
Drupal\taxonomy\Plugin\migrate\destinationCode
public function getEntity(Row $row, array $old_destination_id_values) {
/** @var \Drupal\taxonomy\VocabularyInterface $vocabulary */
$vocabulary = parent::getEntity($row, $old_destination_id_values);
// Config schema does not allow description to be empty.
if (trim($vocabulary->getDescription()) === '') {
$vocabulary->set('description', NULL);
}
return $vocabulary;
}