You are here

public function RevisionHandler::handle in Feeds Paragraphs 8

Parameters

EntityInterface $entity: The entity that holds the paragraphs

Return value

bool TRUE on handling success.

File

src/RevisionHandler.php, line 57

Class

RevisionHandler

Namespace

Drupal\feeds_para_mapper

Code

public function handle(EntityInterface $entity) {
  $this->entity = $entity;
  if (!isset($this->entity->fpm_targets)) {
    return false;
  }
  foreach ($this->entity->fpm_targets as $fieldInstance) {
    $target_info = $fieldInstance
      ->get('target_info');
    $this
      ->checkUpdates($target_info->paragraphs);
  }
  $this
    ->cleanUp($entity->fpm_targets);
  return TRUE;
}