src/ShopBundle/objects/db/TShopVariantSet.class.php
public function GetVariantTypeForIdentifier($sVariantTypeIdentifier)
    {
        $oType = &$this->GetFromInternalCache('VariantTypeForIdentifier'.$sVariantTypeIdentifier);
        if (is_null($oType)) {
            $oType = TdbShopVariantType::GetNewInstance();
            /** @var $oType TdbShopVariantType */
            if (!$oType->Loadfromfields(array('shop_variant_set_id' => $this->id, 'identifier' => $sVariantTypeIdentifier))) {
                $oType = null;
            }
            $this->SetInternalCache('VariantTypeForIdentifier'.$sVariantTypeIdentifier, $oType);
        }

        return $oType;
    }
public function GetVariantTypeForIdentifier($sVariantTypeIdentifier)
    {
        $oType = &$this->GetFromInternalCache('VariantTypeForIdentifier'.$sVariantTypeIdentifier);
        if (is_null($oType)) {
            $oType = TdbShopVariantType::GetNewInstance();
            /** @var $oType TdbShopVariantType */
            if (!$oType->Loadfromfields(array('shop_variant_set_id' => $this->id, 'identifier' => $sVariantTypeIdentifier))) {
                $oType = null;
            }
            $this->SetInternalCache('VariantTypeForIdentifier'.$sVariantTypeIdentifier, $oType);
        }

        return $oType;
    }
public function GetVariantTypeForIdentifier ( $ sVariantTypeIdentifier ) { $ oType = & $ this -> GetFromInternalCache ( 'VariantTypeForIdentifier' . $ sVariantTypeIdentifier ) ; if ( is_null ( $ oType ) ) { $ oType = TdbShopVariantType :: GetNewInstance ( ) ; /** @var $oType TdbShopVariantType */ if ( ! $ oType -> Loadfromfields ( array ( 'shop_variant_set_id' => $ this -> id , 'identifier' => $ sVariantTypeIdentifier ) ) ) { $ oType = null ; } $ this -> SetInternalCache ( 'VariantTypeForIdentifier' . $ sVariantTypeIdentifier , $ oType ) ; } return $ oType ; }
return the variant type with the identifier.

@param string $sVariantTypeIdentifier

@return TdbShopVariantType
return the variant type with the identifier .