public function rewriteIds($idMapping)
{
if (!$this->isInherited()) {
if (array_key_exists($this->getType(), $idMapping)) {
if ($this->getData() instanceof ElementInterface) {
if (array_key_exists((int) $this->getData()->getId(), $idMapping[$this->getType()])) {
$this->setData(Element\Service::getElementById($this->getType(), $idMapping[$this->getType()][$this->getData()->getId()]));
}
}
}
}
}