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

_getProductVarcharValue() private method

private _getProductVarcharValue ( $productAttribute )
    private function _getProductVarcharValue($productAttribute)
    {
        $cacheKey = get_class($this) . "_" . $this->attributes['id'] . "_" . $this->websiteId . "_" . $productAttribute->title;
        if (Cache::has($cacheKey)) {
            $value = Cache::get($cacheKey);
        } else {
            $value = null;
            $attributeValue = null;
            if (!$this->isDefaultWebsite) {
                $attributeValue = $productAttribute->productVarcharValues()->where('product_id', '=', $this->attributes['id'])->where('website_id', '=', $this->websiteId)->get()->first();
            }
            if (null === $attributeValue) {
                $attributeValue = $productAttribute->productVarcharValues()->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;
    }