Пример #1
0
 public static function createWriteFileEvent($translationFilePath, $translatableStrings, $translatedStrings, $createFileIfNotExists)
 {
     $event = new TranslationEvent();
     $event->setTranslatableStrings($translatableStrings);
     $event->setTranslatedStrings($translatedStrings);
     $event->setCreateFileIfNotExists($createFileIfNotExists);
     $event->setTranslationFilePath($translationFilePath);
     return $event;
 }
Пример #2
0
 public function getTranslatableStrings(TranslationEvent $event)
 {
     $stringCount = $this->walkDir($event->getDirectory(), $event->getMode(), $event->getLocale(), $event->getDomain(), $strings);
     $event->setTranslatableStrings($strings)->setTranslatableStringCount($stringCount);
 }