public function saveTags($attachment, $tags)
    {
        $newTags = [];
        foreach ($tags as $tag) {
            if (isset($this->config('tags')[$tag])) {
                $newTags[] = $tag;
                if ($this->config('tags')[$tag]['exclusive'] === true) {
                    $this->_clearTag($attachment, $tag);
                }
            }
        }

        $this->Attachments->patchEntity($attachment, ['tags' => $newTags]);
        return (bool)$this->Attachments->save($attachment);
    }