Beispiel #1
0
 /**
  * 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();
     }
 }
Beispiel #2
0
 /**
  * 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);
 }
Beispiel #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');
 }