KomifloResolver タグをsort
This commit is contained in:
parent
2778d34711
commit
330facf974
@ -41,9 +41,12 @@ class KomifloResolver implements Resolver
|
|||||||
|
|
||||||
// タグ
|
// タグ
|
||||||
if (!empty($json['content']['attributes']['tags']['children'])) {
|
if (!empty($json['content']['attributes']['tags']['children'])) {
|
||||||
|
$tags = [];
|
||||||
foreach ($json['content']['attributes']['tags']['children'] as $tag) {
|
foreach ($json['content']['attributes']['tags']['children'] as $tag) {
|
||||||
$metadata->tags[] = preg_replace('/\s/', '_', $tag['data']['name']);
|
$tags[] = preg_replace('/\s/', '_', $tag['data']['name']);
|
||||||
}
|
}
|
||||||
|
sort($tags);
|
||||||
|
$metadata->tags = array_merge($metadata->tags,$tags);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $metadata;
|
return $metadata;
|
||||||
|
Loading…
Reference in New Issue
Block a user