protected function setTermsPermalink(array $items, $taxonomyAttribute, array $terms, $termRelativePath)
    {
        foreach ($items as $item) {
            $attributes = $item->getAttributes();

            if (isset($attributes['term_urls'])) {
                $attributes['term_urls'] = [];
            }

            if (isset($attributes['term_urls'][$taxonomyAttribute])) {
                $attributes['term_urls'][$taxonomyAttribute] = [];
            }

            $slugedTermPermalink = $this->getTermPermalink($termRelativePath);

            foreach ($terms as $term) {
                $attributes['terms_url'][$taxonomyAttribute][$term] = $slugedTermPermalink;
            }

            $item->setAttributes($attributes);
        }
    }