yii\behaviors\SluggableBehavior::makeUnique PHP Method

makeUnique() protected method

Calls [[generateUniqueSlug]] until generated slug is unique and returns it.
See also: getValue
See also: generateUniqueSlug
Since: 2.0.7
protected makeUnique ( string $slug ) : string
$slug string basic slug value
return string unique slug
    protected function makeUnique($slug)
    {
        $uniqueSlug = $slug;
        $iteration = 0;
        while (!$this->validateSlug($uniqueSlug)) {
            $iteration++;
            $uniqueSlug = $this->generateUniqueSlug($slug, $iteration);
        }
        return $uniqueSlug;
    }