function EntitySearchPage::updateEntity
Updates an entity with the contents of a row.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: The entity to update.
\Drupal\migrate\Row $row: The row object to update from.
Return value
\Drupal\Core\Entity\EntityInterface An updated entity from row values.
Overrides EntityConfigBase::updateEntity
File
- 
              core/
modules/ search/ src/ Plugin/ migrate/ destination/ EntitySearchPage.php, line 93  
Class
- EntitySearchPage
 - Migrate destination for search page.
 
Namespace
Drupal\search\Plugin\migrate\destinationCode
protected function updateEntity(EntityInterface $entity, Row $row) {
  parent::updateEntity($entity, $row);
  $entity->setPlugin($row->getDestinationProperty('plugin'));
  // The user_search plugin does not have a setConfiguration() method.
  $plugin = $entity->getPlugin();
  if ($plugin instanceof ConfigurableSearchPluginBase) {
    $plugin->setConfiguration($row->getDestinationProperty('configuration'));
  }
  return $entity;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.