Backend\Modules\Faq\Actions\Categories::setClickableCount PHP Method

setClickableCount() public static method

Convert the count in a human readable one.
public static setClickableCount ( integer $count, string $link ) : string
$count integer
$link string
return string
    public static function setClickableCount($count, $link)
    {
        // redefine
        $count = (int) $count;
        $link = (string) $link;
        // return link in case of more than one item, one item, other
        if ($count > 1) {
            return '<a href="' . $link . '">' . $count . ' ' . BL::getLabel('Questions') . '</a>';
        } elseif ($count == 1) {
            return '<a href="' . $link . '">' . $count . ' ' . BL::getLabel('Question') . '</a>';
        }
        return '';
    }