protected function getUniqueId(Theme $theme)
    {
        $baseId = $theme->getId();

        $idNumber = 0;
        while ($this->hasTheme($baseId . $idNumber)) {
            $idNumber++;
        }

        return $baseId . $idNumber;
    }