예제 #1
0
파일: GMaps.php 프로젝트: laiello/resmania
 /**
  * This method will invoke while plugin installation process.
  */
 public function uninstall()
 {
     parent::uninstall();
     //1. remove template for advanced search panel
     $rootPath = RM_Environment::getConnector()->getRootPath();
     $file = implode(DIRECTORY_SEPARATOR, array($rootPath, 'RM', 'userdata', 'views', 'user', 'scripts', 'Search', 'advanced', 'map_advanced.phtml'));
     RM_Filesystem::deleteFile($file);
     //2. remove information about this panel from database in form->state field
     $formModel = new RM_Forms();
     $form = $formModel->find('advancedsearch')->current();
     $deleted = $form->deletePanel('map_advancedsearch');
     if ($deleted) {
         $form->save();
     }
 }
예제 #2
0
파일: Taxes.php 프로젝트: laiello/resmania
 /**
  * Invokes after user delete language, make some changes for price module
  *
  * @param string $iso ISO language code
  * @return null
  */
 public function deleteLanguage($iso)
 {
     parent::deleteLanguage($iso);
     $model = new RM_Taxes();
     $model->deleteLanguage($iso);
 }
예제 #3
0
 public function uninstall()
 {
     parent::uninstall();
     $unitModel = new RM_Units();
     $unitModel->update(array('type_id' => RM_UnitTypes::DEFAULT_TYPE, 'published' => 0), 'type_id=2');
 }