Пример #1
0
 static function delete($materialId)
 {
     MaterialL10n::deleteAll($materialId);
     parent::delete($materialId);
 }
Пример #2
0
 static function createLocale($sourceFile)
 {
     $locales = LocaleManager::getLocales();
     $locale = new MaterialL10n();
     $extension = pathinfo($sourceFile, PATHINFO_EXTENSION);
     $path = pathinfo($sourceFile, PATHINFO_DIRNAME) . DIRECTORY_SEPARATOR;
     foreach (array_keys($locales) as $localeId) {
         $localeFileName = $path . "unitTest_" . $localeId . '.' . $extension;
         copy($sourceFile, $localeFileName);
         $locale->prepareToReceiveFile($localeFileName, basename($sourceFile), $localeId);
     }
     #print_r($locale);
     #echo PHP_EOL . self::getTestFileSpec() . PHP_EOL;
     return $locale;
 }