Added default tag order to post view proxy
This commit is contained in:
parent
ec5239607c
commit
f114c65355
1 changed files with 6 additions and 0 deletions
|
@ -77,7 +77,13 @@ class PostViewProxy extends AbstractViewProxy
|
|||
$result->flags->loop = ($post->getFlags() & Post::FLAG_LOOP);
|
||||
|
||||
if (!empty($config[self::FETCH_TAGS]))
|
||||
{
|
||||
$result->tags = $this->tagViewProxy->fromArray($post->getTags());
|
||||
usort($result->tags, function($tag1, $tag2)
|
||||
{
|
||||
return strcasecmp($tag1->name, $tag2->name);
|
||||
});
|
||||
}
|
||||
|
||||
if (!empty($config[self::FETCH_USER]))
|
||||
$result->user = $this->userViewProxy->fromEntity($post->getUser());
|
||||
|
|
Loading…
Reference in a new issue