Mage2\Catalog\Models\Product::_getProductFloatValue PHP Method

_getProductFloatValue() private method

private _getProductFloatValue ( $productAttribute )
    private function _getProductFloatValue($productAttribute)
    {
        $value = null;
        $attributeValue = null;
        $cacheKey = get_class($this) . "_" . $this->attributes['id'] . "_" . $this->websiteId . "_" . $productAttribute->title;
        if (Cache::has($cacheKey)) {
            $value = Cache::get($cacheKey);
        } else {
            if (!$this->isDefaultWebsite) {
                $attributeValue = $productAttribute->productFloatValues()->where('product_id', '=', $this->attributes['id'])->where('website_id', '=', $this->websiteId)->get()->first();
            }
            //dd($attributeValue);
            if (null === $attributeValue) {
                $attributeValue = $productAttribute->productFloatValues()->where('product_id', '=', $this->attributes['id'])->where('website_id', '=', $this->defaultWebsiteId)->get()->first();
            }
            if (isset($attributeValue->value)) {
                $value = $attributeValue->value;
                Cache::put($cacheKey, $value, $minute = 100);
            }
        }
        return $value;
    }