/** * {@inheritdoc} */ public function updateProperty($userId, $contentUuid, $webspaceKey, $locale, $property, $data) { /** @var StructureInterface $content */ $content = $this->previewCache->fetchStructure($userId, $contentUuid, $webspaceKey, $locale); if ($content === false) { throw new PreviewNotFoundException($userId, $contentUuid); } $content = $this->update($webspaceKey, $locale, $property, $data, $content); $this->previewCache->saveStructure($content, $userId, $contentUuid, $webspaceKey, $locale); $this->generateChanges($userId, $webspaceKey, $locale, $property, $content); return $content; }
/** * {@inheritdoc} */ public function updateProperty($userId, $contentUuid, $webspaceKey, $locale, $property, $data) { /** @var StructureInterface $content */ $content = $this->previewCache->fetchStructure($userId, $contentUuid, $webspaceKey, $locale); if ($content === false) { throw new PreviewNotFoundException($userId, $contentUuid); } try { $content = $this->update($userId, $webspaceKey, $locale, $property, $data, $content); } catch (\Twig_Error $ex) { throw new TwigPreviewException($ex); } finally { $this->previewCache->saveStructure($content, $userId, $contentUuid, $webspaceKey, $locale); } return $content; }