/** * Formats stock status appropriately to the product type and returns a string. * * @param Entity\Product $product * * @return string */ public static function isFeatured(Entity\Product $product) { return sprintf('<a href="#" data-id="%d" class="product-featured"><span class="glyphicon %s" aria-hidden="true"></span> <span class="sr-only">%s</span></a>', $product->getId(), $product->isFeatured() ? 'glyphicon-star' : 'glyphicon-star-empty', $product->isFeatured() ? __('Yes', 'jigoshop') : __('No', 'jigoshop')); }