public function generateUniqueSlug($base, $model, $slugField, $lang = null) {
        $slug = $this->generateSlug($base);
        $select = $model->getAdapter()->select()
            ->from($model->getName(), 'COUNT(*)')
        ;
        $this->_setWhereClause($select, $slugField, $slug, $model, $lang);
        $n = 1;
        while ($this->_rowsExist($select)) {
            $this->_incrementSlug($slug, ++$n, $base);
            $this->_setWhereClause($select, $slugField, $slug, $model, $lang);
        }
        return $slug;
    }