original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: Regenerate a slug for this @DataObject
docstring_tokens: Regenerate a slug for this