if (!
$presetData || !\
is_array($presetData) || !\
array_key_exists('elements',
$presetData)) { throw new PresetAssetImportException(sprintf('The preset data of the %s preset seems to be invalid.',
$preset->
getName()));
} // continue if no sync data present or we just have an assets key which is empty
if (empty($presetData['syncData'
]) || (\
count($presetData['syncData'
]) === 1 &&
empty($presetData['syncData'
]['assets'
])) ) { return;
} $element =
$this->
findElementBySyncKey($presetData,
$elementSyncKey);
if (!
$element) { throw new PresetAssetImportException('The processed element could not be found in preset data.'
);
} $handler =
$this->
findComponentHandler($element);
if (!
$handler) { return;
}