public function regenerateSlug()
    {
        $this->slugWorkingRecord->{$this->slugDbField} = $this->encrypt();
        $salt = $this->slugSalt;

        if ($this->mustBeUnique && !$this->hasUniqueSlug()) {
            $generator = new RandomGenerator();

            while (!$this->hasUniqueSlug()) {
                $salt = $generator->randomToken();
                $this->slugWorkingRecord->{$this->slugDbField} = $this->encrypt(null, $salt);
            }
        }

        $this->slugWorkingRecord->{$this->slugDbFieldForSalt} = $salt;
    }
public function regenerateSlug()
    {
        $this->slugWorkingRecord->{$this->slugDbField} = $this->encrypt();
        $salt = $this->slugSalt;

        if ($this->mustBeUnique && !$this->hasUniqueSlug()) {
            $generator = new RandomGenerator();

            while (!$this->hasUniqueSlug()) {
                $salt = $generator->randomToken();
                $this->slugWorkingRecord->{$this->slugDbField} = $this->encrypt(null, $salt);
            }
        }

        $this->slugWorkingRecord->{$this->slugDbFieldForSalt} = $salt;
    }
public function regenerateSlug ( ) { $ this -> slugWorkingRecord -> { $ this -> slugDbField } = $ this -> encrypt ( ) ; $ salt = $ this -> slugSalt ; if ( $ this -> mustBeUnique && ! $ this -> hasUniqueSlug ( ) ) { $ generator = new RandomGenerator ( ) ; while ( ! $ this -> hasUniqueSlug ( ) ) { $ salt = $ generator -> randomToken ( ) ; $ this -> slugWorkingRecord -> { $ this -> slugDbField } = $ this -> encrypt ( null , $ salt ) ; } } $ this -> slugWorkingRecord -> { $ this -> slugDbFieldForSalt } = $ salt ; }
Regenerate a slug for this @DataObject
Regenerate a slug for this