LinkFieldProcessor.php in Translation Management Tool 8
File
sources/content/src/LinkFieldProcessor.php
View source
<?php
namespace Drupal\tmgmt_content;
use Drupal\Core\Field\FieldItemListInterface;
use Drupal\Core\Render\Element;
class LinkFieldProcessor extends DefaultFieldProcessor {
public function extractTranslatableData(FieldItemListInterface $field) {
$data = parent::extractTranslatableData($field);
foreach (Element::children($data) as $key) {
if (!empty($data[$key]['uri']['#translate'])) {
$data[$key]['uri']['#translate'] = FALSE;
}
}
return $data;
}
}