src/ShopBundle/objects/db/TShopArticle.class.php
public function GetActiveVariantValue($sVariantTypeIdentifier)
    {
        $oVariantValueObject = null;
        $aVariantValues = &$this->GetFromInternalCache('aActiveVariantValues');
        if (is_null($aVariantValues)) {
            $query = "SELECT `shop_variant_type_value`.*, `shop_variant_type`.`identifier` AS variantTypeName
                    FROM `shop_variant_type_value`
              INNER JOIN `shop_article_shop_variant_type_value_mlt` ON `shop_variant_type_value`.`id` = `shop_article_shop_variant_type_value_mlt`.`target_id`
              INNER JOIN `shop_variant_type` ON `shop_variant_type_value`.`shop_variant_type_id` = `shop_variant_type`.`id`
                   WHERE `shop_article_shop_variant_type_value_mlt`.`source_id` = '".MySqlLegacySupport::getInstance()->real_escape_string($this->id)."'
                 ";
            $oVariantValues = TdbShopVariantTypeValueList::GetList($query);
            while ($oVariantValue = $oVariantValues->Next()) {
                $aVariantValues[$oVariantValue->sqlData['variantTypeName']] = $oVariantValue;
            }
            $this->SetInternalCache('aActiveVariantValues', $aVariantValues);
        }
        if (is_array($aVariantValues) && array_key_exists($sVariantTypeIdentifier, $aVariantValues)) {
            $oVariantValueObject = $aVariantValues[$sVariantTypeIdentifier];
        }

        return $oVariantValueObject;
    }
public function GetActiveVariantValue($sVariantTypeIdentifier)
    {
        $oVariantValueObject = null;
        $aVariantValues = &$this->GetFromInternalCache('aActiveVariantValues');
        if (is_null($aVariantValues)) {
            $query = "SELECT `shop_variant_type_value`.*, `shop_variant_type`.`identifier` AS variantTypeName
                    FROM `shop_variant_type_value`
              INNER JOIN `shop_article_shop_variant_type_value_mlt` ON `shop_variant_type_value`.`id` = `shop_article_shop_variant_type_value_mlt`.`target_id`
              INNER JOIN `shop_variant_type` ON `shop_variant_type_value`.`shop_variant_type_id` = `shop_variant_type`.`id`
                   WHERE `shop_article_shop_variant_type_value_mlt`.`source_id` = '".MySqlLegacySupport::getInstance()->real_escape_string($this->id)."'
                 ";
            $oVariantValues = TdbShopVariantTypeValueList::GetList($query);
            while ($oVariantValue = $oVariantValues->Next()) {
                $aVariantValues[$oVariantValue->sqlData['variantTypeName']] = $oVariantValue;
            }
            $this->SetInternalCache('aActiveVariantValues', $aVariantValues);
        }
        if (is_array($aVariantValues) && array_key_exists($sVariantTypeIdentifier, $aVariantValues)) {
            $oVariantValueObject = $aVariantValues[$sVariantTypeIdentifier];
        }

        return $oVariantValueObject;
    }
public function GetActiveVariantValue ( $ sVariantTypeIdentifier ) { $ oVariantValueObject = null ; $ aVariantValues = & $ this -> GetFromInternalCache ( 'aActiveVariantValues' ) ; if ( is_null ( $ aVariantValues ) ) { $ query = "SELECT `shop_variant_type_value`.*, `shop_variant_type`.`identifier` AS variantTypeName
                    FROM `shop_variant_type_value`
              INNER JOIN `shop_article_shop_variant_type_value_mlt` ON `shop_variant_type_value`.`id` = `shop_article_shop_variant_type_value_mlt`.`target_id`
              INNER JOIN `shop_variant_type` ON `shop_variant_type_value`.`shop_variant_type_id` = `shop_variant_type`.`id`
                   WHERE `shop_article_shop_variant_type_value_mlt`.`source_id` = '" . MySqlLegacySupport :: getInstance ( ) -> real_escape_string ( $ this -> id ) . "'
                 " ; $ oVariantValues = TdbShopVariantTypeValueList :: GetList ( $ query ) ; while ( $ oVariantValue = $ oVariantValues -> Next ( ) ) { $ aVariantValues [ $ oVariantValue -> sqlData [ 'variantTypeName' ] ] = $ oVariantValue ; } $ this -> SetInternalCache ( 'aActiveVariantValues' , $ aVariantValues ) ; } if ( is_array ( $ aVariantValues ) && array_key_exists ( $ sVariantTypeIdentifier , $ aVariantValues ) ) { $ oVariantValueObject = $ aVariantValues [ $ sVariantTypeIdentifier ] ; } return $ oVariantValueObject ; }
returns the variant type value for the given identifier.

note: there was a typo in the method name GetActiveVaraintValue
please change your custom code to use the renamed method
(the old method name is redirected, but will be removed in the future)

@param string $sVariantTypeIdentifier

@return TdbShopVariantTypeValue - returns null if $sVariantTypeIdentifier was not found
returns the variant type value for the given identifier .