src/ShopBundle/objects/db/TShopArticle.class.php
public function GetVariantTypeActiveValue($sVariantTypeId)
    {
        $sValue = false;
        $aVariantValueIds = $this->GetFromInternalCache('aActiveVariantValueIds');
        if (is_null($aVariantValueIds)) {
            $oValueList = &$this->GetFieldShopVariantTypeValueList();
            while ($oValue = $oValueList->Next()) {
                $aVariantValueIds[$oValue->fieldShopVariantTypeId] = $oValue->id;
            }
            $oValueList->GoToStart();
            $this->SetInternalCache('aActiveVariantValueIds', $aVariantValueIds);
        }
        if (is_array($aVariantValueIds) && array_key_exists($sVariantTypeId, $aVariantValueIds)) {
            $sValue = $aVariantValueIds[$sVariantTypeId];
        }

        return $sValue;
    }
public function GetVariantTypeActiveValue($sVariantTypeId)
    {
        $sValue = false;
        $aVariantValueIds = $this->GetFromInternalCache('aActiveVariantValueIds');
        if (is_null($aVariantValueIds)) {
            $oValueList = &$this->GetFieldShopVariantTypeValueList();
            while ($oValue = $oValueList->Next()) {
                $aVariantValueIds[$oValue->fieldShopVariantTypeId] = $oValue->id;
            }
            $oValueList->GoToStart();
            $this->SetInternalCache('aActiveVariantValueIds', $aVariantValueIds);
        }
        if (is_array($aVariantValueIds) && array_key_exists($sVariantTypeId, $aVariantValueIds)) {
            $sValue = $aVariantValueIds[$sVariantTypeId];
        }

        return $sValue;
    }
public function GetVariantTypeActiveValue ( $ sVariantTypeId ) { $ sValue = false ; $ aVariantValueIds = $ this -> GetFromInternalCache ( 'aActiveVariantValueIds' ) ; if ( is_null ( $ aVariantValueIds ) ) { $ oValueList = & $ this -> GetFieldShopVariantTypeValueList ( ) ; while ( $ oValue = $ oValueList -> Next ( ) ) { $ aVariantValueIds [ $ oValue -> fieldShopVariantTypeId ] = $ oValue -> id ; } $ oValueList -> GoToStart ( ) ; $ this -> SetInternalCache ( 'aActiveVariantValueIds' , $ aVariantValueIds ) ; } if ( is_array ( $ aVariantValueIds ) && array_key_exists ( $ sVariantTypeId , $ aVariantValueIds ) ) { $ sValue = $ aVariantValueIds [ $ sVariantTypeId ] ; } return $ sValue ; }
returns the id of the active value for the given variant type.

@param string $sVariantTypeId

@return string
returns the id of the active value for the given variant type .