Пример #1
0
 static function createLocale()
 {
     $locales = LocaleManager::getLocales();
     $locale = new StageL10n();
     foreach (array_keys($locales) as $localeId) {
         $l10n[$localeId] = (object) ['name' => 'name_' . rand() . '_' . $localeId, 'brief' => 'brief_' . rand() . '_' . $localeId, 'description' => 'unitTest_description_' . rand() . '_' . $localeId, 'meta' => 'meta_' . rand() . '_' . $localeId, 'title' => 'title_' . rand() . '_' . $localeId, 'url' => 'url_' . rand() . ' ' . $localeId];
         $locale->load($localeId, $l10n[$localeId]);
     }
     return $locale;
 }
Пример #2
0
 static function delete($stageId)
 {
     StageL10n::deleteAll($stageId);
     parent::delete($stageId);
 }