From c2a76db2900d44baa6f91e066c9c34cdb54c9456 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Wed, 13 May 2020 22:35:39 -0400 Subject: [PATCH] Add type filter parameter to Tag::getCSVByURIId --- src/Model/Tag.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Model/Tag.php b/src/Model/Tag.php index 2f38608cc..87383fbbc 100644 --- a/src/Model/Tag.php +++ b/src/Model/Tag.php @@ -366,12 +366,14 @@ class Tag * Return a string with all tags and mentions * * @param integer $uri_id + * @param array $type * @return string tags and mentions + * @throws \Exception */ - public static function getCSVByURIId(int $uri_id) + public static function getCSVByURIId(int $uri_id, array $type = [self::HASHTAG, self::MENTION, self::IMPLICIT_MENTION, self::EXCLUSIVE_MENTION]) { $tag_list = []; - $tags = self::getByURIId($uri_id); + $tags = self::getByURIId($uri_id, $type); foreach ($tags as $tag) { $tag_list[] = self::TAG_CHARACTER[$tag['type']] . '[url=' . $tag['url'] . ']' . $tag['name'] . '[/url]'; }