protected function createUniqueAlias(array $configuration, $newAliasValue, $idValue)
{
$uniqueAlias = '';
$counter = 0;
$maxTry = 100;
$testNewAliasValue = $newAliasValue;
while ($counter < $maxTry) {
// If the test-alias did NOT exist, it must be unique and we break out
$foundId = $this->getFromAliasCacheByAliasValue($configuration, $testNewAliasValue, TRUE);
if (!$foundId || $foundId == $idValue) {
$uniqueAlias = $testNewAliasValue;
break;
}
$counter++;
$testNewAliasValue = $newAliasValue . '-' . $counter;
}
return $uniqueAlias;
}