src/Model/Behavior/SlugBehavior.php
protected function _slug($string, $separator)
    {
        $replacements = $this->getConfig('replacements');
        $callable = $this->slugger();
        if (is_object($callable) && $callable instanceof SluggerInterface) {
            $callable = [$callable, 'slug'];
        }
        $slug = $callable(str_replace(array_keys($replacements), $replacements, $string), $separator);
        if (!empty($this->getConfig('maxLength'))) {
            $slug = Text::truncate(
                $slug,
                $this->getConfig('maxLength'),
                ['ellipsis' => '']
            );
        }

        return $slug;
    }
protected function _slug($string, $separator)
    {
        $replacements = $this->getConfig('replacements');
        $callable = $this->slugger();
        if (is_object($callable) && $callable instanceof SluggerInterface) {
            $callable = [$callable, 'slug'];
        }
        $slug = $callable(str_replace(array_keys($replacements), $replacements, $string), $separator);
        if (!empty($this->getConfig('maxLength'))) {
            $slug = Text::truncate(
                $slug,
                $this->getConfig('maxLength'),
                ['ellipsis' => '']
            );
        }

        return $slug;
    }
protected function _slug ( $ string , $ separator ) { $ replacements = $ this -> getConfig ( 'replacements' ) ; $ callable = $ this -> slugger ( ) ; if ( is_object ( $ callable ) && $ callable instanceof SluggerInterface ) { $ callable = [ $ callable , 'slug' ] ; } $ slug = $ callable ( str_replace ( array_keys ( $ replacements ) , $ replacements , $ string ) , $ separator ) ; if ( ! empty ( $ this -> getConfig ( 'maxLength' ) ) ) { $ slug = Text :: truncate ( $ slug , $ this -> getConfig ( 'maxLength' ) , [ 'ellipsis' => '' ] ) ; } return $ slug ; }
Proxies the defined slugger's `slug` method.

@param string $string String to create a slug from.
@param  string $separator String to use as separator/separator.
@return string Slug.
Proxies the defined slugger s slug method .