File size: 875B
<?php
namespace MMO\Hide\BbCode\Tag;
use MMO\CoreLib\Util\Plural;
use MMO\Hide\BbCode\AbstractTag;
class HideLikes extends AbstractTag
{
/**
* @inheritDoc
*/
public function render($content, array $tagChildren, $tagOption, array $tag, array $options)
{
$tagOptions = \intval($tagOption);
$reaction_count = $this->visitor()->reaction_score;
$title = \XF::phrase('mh_tag_likes_x_y', [
'need_reactions' => Plural::choice('mh_tag_likes_need_reactions', $tagOptions),
'now_reactions' => Plural::choice('mh_tag_likes_now_reactions', $reaction_count)
])->render('raw');
return $this->renderTemplate($content, $title, [
'canView' => $tagOptions <= $reaction_count,
'options' => $options,
'tag' => $tag['tag']
]);
}
}