protected function BaseUpdateRunner::prepareEntityForUpdate in Scheduled Updates 8
Prepare an entity to be updated.
Parameters
\Drupal\scheduled_updates\ScheduledUpdateInterface $update:
$queue_item:
ContentEntityInterface $entity_to_update:
1 call to BaseUpdateRunner::prepareEntityForUpdate()
- BaseUpdateRunner::runUpdate in src/
Plugin/ BaseUpdateRunner.php - Run an individual update from the queue.
File
- src/
Plugin/ BaseUpdateRunner.php, line 600 - Contains \Drupal\scheduled_updates\Plugin\BaseUpdateRunner.
Class
Namespace
Drupal\scheduled_updates\PluginCode
protected function prepareEntityForUpdate(ScheduledUpdateInterface $update, $queue_item, ContentEntityInterface $entity_to_update) {
$this
->transferFieldValues($update, $entity_to_update);
if (!empty($queue_item->data['field_id'])) {
$this
->removeUpdate($entity_to_update, $update, $queue_item->data['field_id']);
}
$this
->setEntityRevision($entity_to_update, $update);
}