You are here

public function RevsDiffNormalizer::denormalize in Replication 8

Same name and namespace in other branches
  1. 8.2 src/Normalizer/RevsDiffNormalizer.php \Drupal\replication\Normalizer\RevsDiffNormalizer::denormalize()

File

src/Normalizer/RevsDiffNormalizer.php, line 41

Class

RevsDiffNormalizer

Namespace

Drupal\replication\Normalizer

Code

public function denormalize($data, $class, $format = NULL, array $context = []) {
  if (!isset($context['workspace'])) {
    throw new LogicException('A \'workspace\' context is required to denormalize revision diff data.');
  }
  return $this->revisionDiffFactory
    ->get($context['workspace'])
    ->setRevisionIds($data);
}