/**
* Historizes given existing active entries for two swapped Locations.
*
* This should be done before republishing URL aliases, in order to avoid unnecessary
* conflicts when swapped Locations are siblings.
*
* We need to historize everything separately per language (mask), in case the entries
* remain history future publishing reusages need to be able to take them over cleanly.
*
* @see \eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Handler::locationSwapped()
*
* @param array $location1Entries
* @param array $location2Entries
*/
private function historizeBeforeSwap($location1Entries, $location2Entries)
{
foreach ($location1Entries as $row) {
$this->gateway->historizeBeforeSwap($row['action'], $row['lang_mask']);
}
foreach ($location2Entries as $row) {
$this->gateway->historizeBeforeSwap($row['action'], $row['lang_mask']);
}
}