jsonHelper = $jsonHelper; $this->mathRandom = $mathRandom; parent::__construct($context, $saleableItem, $price, $rendererPool); } /** * Encode the mixed $valueToEncode into the JSON format * * @param mixed $valueToEncode * @return string */ public function jsonEncode($valueToEncode) { return $this->jsonHelper->jsonEncode($valueToEncode); } /** * Get random string * * @param int $length * @param string|null $chars * @return string */ public function getRandomString($length, $chars = null) { return $this->mathRandom->getRandomString($length, $chars); } /** * Check if quantity can be displayed for tier price with msrp * * @param Product $product * @return bool * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getCanDisplayQty(Product $product) { //TODO Refactor - change to const similar to Model\Product\Type\Grouped::TYPE_CODE if ($product->getTypeId() == 'grouped') { return false; } return true; } }