예제 #1
0
파일: Extras.php 프로젝트: laiello/resmania
 public function install()
 {
     parent::install();
     //Add iso columns into rm_extras table for each already installed language
     $languageModule = new RM_Languages();
     $languages = $languageModule->fetchAll();
     require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'Extras.php';
     $extrasModule = new RM_Extras();
     foreach ($languages as $language) {
         $extrasModule->addLanguage($language->iso);
     }
 }
예제 #2
0
 /**
  * Invokes after user delete language, make some changes for price module
  *
  * @param string $iso
  */
 public function deleteLanguage($iso)
 {
     parent::deleteLanguage($iso);
     $model = new RM_Categories();
     $model->deleteLanguage($iso);
 }
예제 #3
0
 public function install()
 {
     parent::install();
     $languageModule = new RM_Languages();
     $languages = $languageModule->fetchAll();
     require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'EmailNotifications.php';
     $model = new RM_EmailNotifications();
     foreach ($languages as $language) {
         if ($language->iso !== 'en_GB') {
             $model->addLanguage($language->iso);
         }
     }
     //Currently we just added extra columns and need to clean cache
     Zend_Db_Table_Abstract::getDefaultMetadataCache()->clean();
     //Copy en_GB default value to all other languages
     $emailNotification = $model->fetchByName('ReservationCompleteSuccessful', RM_EmailNotifications::REGULAR_USER);
     foreach ($languages as $language) {
         $iso = $language->iso;
         if ($iso !== 'en_GB') {
             $emailNotification->{$iso} = $emailNotification->en_GB;
         }
     }
     $emailNotification->save();
 }