protected function save($data)
 {
     $model = new shopLangPluginFeatureModel();
     foreach ($data as $lang => $dat) {
         foreach ($dat as $type => $da) {
             foreach ($da as $id => $value) {
                 $model->insert(array('id' => $id, 'lang' => $lang, 'type' => $type, 'value' => $value), 1);
             }
         }
     }
 }
Beispiel #2
0
 public static function frontendFeatureList(&$features)
 {
     $plugin = wa('shop')->getPlugin('lang');
     $main = $plugin->getSettings('main');
     if (self::currentLang() !== $main) {
         $fm = new shopLangPluginFeatureModel();
         $features = $fm->getFeatures($features, self::currentLang());
     }
 }