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;
    }