refreshElementData example

if (!$preset) {
            throw new NoResultException();
        }

        $presetData = json_decode($preset->getPresetData(), true);

        if (empty($presetData['elements'])) {
            return $preset->getPresetData();
        }

        $presetData['elements'] = $this->refreshElementData($presetData['elements']);

        $preset->setPresetData(json_encode($presetData));

        if (!$preset->getAssetsImported()) {
            $preset->setAssetsImported(true);
        }

        $this->modelManager->flush($preset);

        return $this->preparePresetData($presetData);
    }

    
Home | Imprint | This part of the site doesn't use cookies.