protected function _getSlugStringFromEntity($entity, $separator)
    {
        $string = [];
        foreach ((array)$this->getConfig('displayField') as $field) {
            if ($entity->getError($field)) {
                throw new InvalidArgumentException(sprintf('Error while generating the slug, the field `%s` contains an invalid value.', $field));
            }
            $string[] = $value = Hash::get($entity, $field);
        }

        return implode($separator, $string);
    }