Backend\Modules\Blog\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 The count.
$link string The link for the count.
return string
    public static function setClickableCount($count, $link)
    {
        $count = (int) $count;
        $link = (string) $link;
        $return = '';
        if ($count > 1) {
            $return = '<a href="' . $link . '">' . $count . ' ' . BL::getLabel('Articles') . '</a>';
        } elseif ($count == 1) {
            $return = '<a href="' . $link . '">' . $count . ' ' . BL::getLabel('Article') . '</a>';
        }
        return $return;
    }