protected function GatherContentGet::replaceUrls in GatherContent 8.5
Replaces the GC urls to Drupal entity url.
Parameters
mixed $data: String or array containing GC urls.
Return value
array|string Returns the replaced string or array.
1 call to GatherContentGet::replaceUrls()
- GatherContentGet::transform in src/
Plugin/ migrate/ process/ GatherContentGet.php - Performs the associated process.
File
- src/
Plugin/ migrate/ process/ GatherContentGet.php, line 93
Class
- GatherContentGet
- Perform custom value transformation.
Namespace
Drupal\gathercontent\Plugin\migrate\processCode
protected function replaceUrls($data) {
if (empty($data)) {
return $data;
}
if (!is_array($data)) {
return $this
->gcUrlToDrupal($data);
}
foreach ($data as $key => $value) {
$data[$key] = $this
->gcUrlToDrupal($value);
}
return $data;
}