source/Application/Model/Attribute.php
protected function _createAttribute($aSelTitle)
    {
        $myLang = \OxidEsales\Eshop\Core\Registry::getLang();
        $aConfLanguages = $myLang->getLanguageIds();
        $oAttr = oxNew(\OxidEsales\Eshop\Core\Model\MultiLanguageModel::class);
        $oAttr->setEnableMultilang(false);
        $oAttr->init('oxattribute');
        foreach ($aConfLanguages as $sKey => $sLang) {
            $sPrefix = $myLang->getLanguageTag($sKey);
            $oAttr->{'oxattribute__oxtitle' . $sPrefix} = new \OxidEsales\Eshop\Core\Field($aSelTitle[$sKey]);
        }
        $oAttr->save();

        return $oAttr->getId();
    }
protected function _createAttribute($aSelTitle)
    {
        $myLang = \OxidEsales\Eshop\Core\Registry::getLang();
        $aConfLanguages = $myLang->getLanguageIds();
        $oAttr = oxNew(\OxidEsales\Eshop\Core\Model\MultiLanguageModel::class);
        $oAttr->setEnableMultilang(false);
        $oAttr->init('oxattribute');
        foreach ($aConfLanguages as $sKey => $sLang) {
            $sPrefix = $myLang->getLanguageTag($sKey);
            $oAttr->{'oxattribute__oxtitle' . $sPrefix} = new \OxidEsales\Eshop\Core\Field($aSelTitle[$sKey]);
        }
        $oAttr->save();

        return $oAttr->getId();
    }
protected function _createAttribute ( $ aSelTitle ) { $ myLang = \ OxidEsales \ Eshop \ Core \ Registry :: getLang ( ) ; $ aConfLanguages = $ myLang -> getLanguageIds ( ) ; $ oAttr = oxNew ( \ OxidEsales \ Eshop \ Core \ Model \ MultiLanguageModel :: class ) ; $ oAttr -> setEnableMultilang ( false ) ; $ oAttr -> init ( 'oxattribute' ) ; foreach ( $ aConfLanguages as $ sKey => $ sLang ) { $ sPrefix = $ myLang -> getLanguageTag ( $ sKey ) ; $ oAttr -> { 'oxattribute__oxtitle' . $ sPrefix } = new \ OxidEsales \ Eshop \ Core \ Field ( $ aSelTitle [ $ sKey ] ) ; } $ oAttr -> save ( ) ; return $ oAttr -> getId ( ) ; }
Checks if attribute exists

@param array $aSelTitle selection list title

@return string attribute id
Checks if attribute exists