Manager/FormManager.php
protected function getUniqueKey($type, $keys, $counter = 0)
    {
        $name = $type;

        if ($counter) {
            $name .= $counter;
        }

        if (!in_array($name, $keys)) {
            return $name;
        }

        return $this->getUniqueKey($type, $keys, ++$counter);
    }
protected function getUniqueKey($type, $keys, $counter = 0)
    {
        $name = $type;

        if ($counter) {
            $name .= $counter;
        }

        if (!in_array($name, $keys)) {
            return $name;
        }

        return $this->getUniqueKey($type, $keys, ++$counter);
    }
@param string $type
@param array $keys
@param int $counter

@return string